Developer Documentation

PickAWin API

REST API for programmatic Instagram and TikTok giveaway draws. Used by agencies and platforms to automate winner selection at scale, with cryptographically verifiable certificates.

REST + JSONWebhooksSHA-256 verifiedIdempotent

Authentication

All API requests require a Bearer token in the Authorization header. Tokens are issued per-account from your dashboard.

curl https://api.pickawin.app/v1/draws \
  -H "Authorization: Bearer pk_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json"

Quick start: run a draw

Submit an Instagram or TikTok URL plus the number of winners. The API returns winners, the SHA-256 verification hash, and a downloadable certificate URL.

curl -X POST https://api.pickawin.app/v1/draws \
  -H "Authorization: Bearer pk_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: draw_2026_04_28_001" \
  -d '{
    "url": "https://www.instagram.com/p/CxxxxxxxxxX/",
    "winners": 3,
    "extras": 2,
    "filters": {
      "require_tag": true,
      "min_tag_count": 1,
      "exclude_duplicates": true
    },
    "tier": "premium",
    "webhook_url": "https://yourapp.com/webhooks/pickawin"
  }'

Response (200 OK):

{
  "id": "drw_01HXYZABC",
  "status": "completed",
  "url": "https://www.instagram.com/p/CxxxxxxxxxX/",
  "comments_processed": 8243,
  "winners": [
    { "username": "@maria_silva", "comment": "Love this! @ana_costa", "drawn_at": "2026-04-28T14:23:11Z" },
    { "username": "@joao_p", "comment": "yes please @luis123", "drawn_at": "2026-04-28T14:23:11Z" },
    { "username": "@carla.dev", "comment": "@bia_xyz this is for us", "drawn_at": "2026-04-28T14:23:11Z" }
  ],
  "extras": [
    { "username": "@bruno_45", "comment": "@matt_y" },
    { "username": "@helena", "comment": "@ana" }
  ],
  "verification": {
    "sha256": "8a3f...c91e",
    "verify_url": "https://pickawin.app/verify/8a3f...c91e",
    "certificate_pdf": "https://pickawin.app/cert/drw_01HXYZABC.pdf"
  },
  "duration_ms": 28412
}

Endpoints

POST
/v1/draws

Run a new draw. Idempotency-Key header recommended.

GET
/v1/draws/:id

Retrieve a draw by ID.

GET
/v1/draws

List draws with pagination (?cursor, ?limit).

POST
/v1/comments/scrape

Scrape comments only (no draw). Useful for previews.

GET
/v1/verify/:hash

Public — verify a SHA-256 hash maps to a real, deterministic draw.

POST
/v1/webhooks

Register a webhook for draw.completed and draw.failed events.

Webhooks

Webhooks fire when a draw completes or fails. Signed with HMAC-SHA256 in the X-PickAWin-Signature header.

POST https://yourapp.com/webhooks/pickawin
X-PickAWin-Signature: sha256=4f8b...a91e
Content-Type: application/json

{
  "event": "draw.completed",
  "draw_id": "drw_01HXYZABC",
  "url": "https://www.instagram.com/p/CxxxxxxxxxX/",
  "winners": [...],
  "verification": { "sha256": "8a3f...c91e" },
  "timestamp": "2026-04-28T14:23:11Z"
}

Rate limits

Free tier: 30 requests/min. Pro: 300 req/min. Enterprise: custom. Limits returned in X-RateLimit-Remaining header.

SDK examples

Node.js:

import { PickAWin } from "@pickawin/node";
const client = new PickAWin({ apiKey: process.env.PICKAWIN_KEY });

const draw = await client.draws.create({
  url: "https://www.instagram.com/p/CxxxxxxxxxX/",
  winners: 3,
});
console.log(draw.winners, draw.verification.sha256);

Python:

from pickawin import Client
client = Client(api_key=os.environ["PICKAWIN_KEY"])

draw = client.draws.create(
  url="https://www.instagram.com/p/CxxxxxxxxxX/",
  winners=3,
)
print(draw.winners, draw.verification.sha256)

Pricing

API draws are billed per successful draw at the same per-tier prices as the dashboard ($2.99 Standard / $7.49 Premium). No monthly minimums. Volume discounts available above 1,000 draws/month — contact sales.

Get an API key

Free trial: 5 draws/month, no credit card required.

Request API access →
API Documentation — Programmatic Instagram Giveaways | PickAWin | SorteioGratis