---
title: "POST /api/v1/draws"
method: POST
path: "/api/v1/draws"
tags: ["Draws"]
---

# POST /api/v1/draws

`POST /api/v1/draws`

## Request

- Base URL: `https://xquik.com`
- URL: `https://xquik.com/api/v1/draws`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Checks credits, then draws winners from inspected replies & reposters. Remaining credits cap the candidates.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `tweetUrl` string, uri, required
  - `winnerCount` integer
  - `backupCount` integer
  - `uniqueAuthorsOnly` boolean
  - `mustRetweet` boolean
  - `mustFollowUsername` string: X username entrants must follow, with or without @, or the account's numeric user ID. A number is a user ID.
  - `filterMinFollowers` integer
  - `filterAccountAgeDays` integer
  - `filterLanguage` string
  - `requiredHashtags` string[]
  - `requiredKeywords` string[]
  - `requiredMentions` string[]

## Response `201`

Draw completed

- object
  - `id` string, required
  - `tweetId` string, required
  - `totalEntries` integer, required: Entries inspected after the credit cap, which can be fewer than the post's replies.
  - `validEntries` integer, required: Inspected entries that passed every filter. A credit cap can leave valid replies uninspected.
  - `winners` Winner[], required
    - `authorUsername` string, required
    - `tweetId` string, required
    - `position` integer, required
    - `isBackup` boolean, required

## Other responses

- `400`: Invalid input. A value past its maxLength gets this answer, & the message names the field & its limit.
- `401`: Unauthenticated
- `402`: Not enough usable credits. A draw fails before it runs when the balance cannot cover the minimum cost. It also fails after it runs when Xquik cannot deduct its final cost. Xquik saves & charges nothing.
- `404`: Not found
- `409`: Idempotency-Key belongs to another draw request, or its first request still runs. Xquik charges nothing for it.
- `424`: X failed or stopped early. Retry after replies_incomplete or retweeters_incomplete. draw_too_large means the post has more entries than 1 draw reads. Contact support. Xquik saves & charges nothing.
- `429`: Too many requests right now. Each user gets 500 reads a second. Each minute allows 120 writes & 60 deletes. `x_api_rate_limited` means X limits this read for now. Neither answer costs anything. Wait for the seconds in `Retry-After`, then retry.
- `500`: Unexpected error.
- `502`: Dependency unavailable, unauthorized, or limited. Default v1 uses 502. Best-practice responses use 424 for transparent dependency failures. Search answers 424 `search_unavailable` when X fails the query itself, or when its filters matched none of the last 3,000 posts read. The message says how far back the search read.
- `default`: Unexpected error.

## Changes

- **2026-10-20** `45942c75fdc2`: 20 warning
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `topup_in_progress` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `topup_in_progress` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …16 more

[Operation history](https://skmtc.dev/xquik-dev/apis/xquik-api/changes/api/v1/draws/post.md)

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xquik-dev/apis/xquik-api/revisions/45942c75fdc2?raw)
