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

# Run giveaway draw

`POST /api/v1/draws`

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

## Request body

- object
  - `tweetUrl` string, uri, required
  - `winnerCount` integer
  - `backupCount` integer
  - `uniqueAuthorsOnly` boolean
  - `mustRetweet` boolean
  - `mustFollowUsername` string
  - `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 — Candidate entries inspected for this draw after the credit-derived cap. This may be lower than the source tweet's full reply count.
  - `validEntries` integer, required — Entries from the inspected candidate set that passed all filters. This is not necessarily every valid reply on the source tweet when credits cap inspection.
  - `winners` Winner[], required
    - `authorUsername` string, required
    - `tweetId` string, required
    - `position` integer, required
    - `isBackup` boolean, required

## Other responses

- `400` — Invalid input
- `401` — Unauthenticated
- `402` — Insufficient usable credits. Draws can fail before execution when the available balance cannot cover the minimum draw cost. A draw can also fail after execution when its final computed cost cannot be deducted.
- `404` — Not found
- `424` — Dependency unavailable, unauthorized, or rate limited. Default v1 returns 502. The best-practice response contract returns 424 for transparent dependency failures.
- `429` — Xquik tier rate limit exceeded. The response includes a `Retry-After` header with the number of seconds to wait before retrying.
- `502` — Dependency unavailable, unauthorized, or rate limited. Default v1 returns 502. The best-practice response contract returns 424 for transparent dependency failures.
- `default` — Unexpected error.

## Changes

- **2026-08-12** `5d4938bb7de3` — 144 warning
  - added the new `closed` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `closed` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `closed` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `closed` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …140 more
- **2026-08-12** `4da209b29df8` — 48 warning
  - added the new `coverage_cursor_gone` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `429`
  - added the new `coverage_cursor_gone` enum value to the `allOf[#/components/schemas/Error]/error/oneOf[subschema #2: StructuredError]/code` response property for the response status `429`
  - added the new `coverage_cursor_gone` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `400`
  - added the new `coverage_cursor_gone` enum value to the `error/oneOf[subschema #1: LegacyErrorCode]/` response property for the response status `401`
  - …44 more

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

---

[API](https://skmtc.dev/xquik-dev/apis/xquik-api-2.md) · [All operations](https://skmtc.dev/xquik-dev/apis/xquik-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xquik-dev/xquik-api-2/revisions/834c16fa45e8/schema)
