Giveaway series

Stop spawning occurrences until resumed (paused_reason: requested). Pausing a paused series returns it unchanged; a cancelled or completed one is 409 invalid_state with status. Occurrences already created are not affected. 409 busy if a spawn holds the series (retry in a moment). The body, if any, must be empty ({}): an unknown field is 400. Idempotency-Key is required.

post/v1/giveaways/series/{seriesId}/pause

Request

  • Base URL
    https://api.mystars.tg
  • Auth
    API key in header X-Api-Key

Path parameters

seriesIdstring uuid required

The series id (UUID).

Headers

Idempotency-Keystring required

A unique key for this write, at most 255 characters, scoped to your tenant. Retrying with the same key and the same request returns the original answer instead of acting twice; the same key with a different request is 409 idempotency_conflict while the key is held (its first request still running, or its answer kept). On the giveaway and series writes, while the first request with the key is still running, a retry is 409 idempotency_in_flight with Retry-After: 1 — retry with the same key. A campaign create or recipient append retry waits for the first one and gets its answer. Derive the key from your own record id to stay safe across process restarts.

How long a key is remembered: a campaign create or recipient append key stays bound to what it created, and so does a giveaway or series create key. On the other giveaway and series writes (chat register and re-check, fund, cancel, close, auto-post, attestations, the series pause, resume and cancel) only a 2xx answer is remembered, for 7 days; after that the same key runs the request again. Within those 7 days a same-key retry of a write that timed out or answered 503 gets the first 2xx the write produced, as it was, normally instead of a second run of the write or a state refusal caused by the first attempt having landed. In the rare case that 2xx could not be recorded, the retry answers 409 idempotency_in_flight for up to 5 minutes and then runs the write again; if the first attempt stopped answering altogether, or its 2xx could not be stored by the API, that wait is up to 10 minutes. A refusal (any 4xx) and a 5xx are never kept: after one, the same key runs the request again against the state at that moment, so once you have fixed the cause you may send the corrected request with the same key.

An answer replayed from the API's stored copy of an earlier 2xx carries Idempotent-Replayed: true; a first answer recovered after the API answered 503 or timed out comes without it. Do not use the header to decide whether the write was applied; read the body.

Response

The paused series.

idstring uuid required
status'active' | 'paused' | 'cancelled' | 'completed' required

active ⇄ paused — paused by you (paused_reason: requested) or automatically (spawn_failures, lost_admin, unfunded), active again only by a resume. From either: cancelled (by you) or completed (the last slot passed, also when a resume finds no slot left). Pause applies to active, resume to paused, cancel to both; asking for the status a series already has returns it unchanged, anything else is 409 invalid_state with status. Terminal: cancelled, completed.

paused_reason'requested' | 'spawn_failures' | 'lost_admin' | 'unfunded' | 'null' nullable
interval'day' | 'week' | 'month' required
everyinteger required
starts_atstring date-time required
countinteger nullable
untilstring date-time nullable
last_indexinteger

The slot the series ends with.

on_unfunded'skip' | 'pause'
currency'ton' | 'usdt_ton'

The asset the order is paid in. ton = the native coin GRAM (ex TON), sent as a plain transfer — it is not USDT on TON. usdt_ton = USDT (TON), sent as a jetton transfer. Required on every create and pricing request: a request without it is rejected with 400 bad_request.

next_indexinteger nullable
next_occurrence_atstring date-time nullable
occurrences_createdinteger
consecutive_failuresinteger
consecutive_missesinteger
created_atstring date-time required
updated_atstring date-time nullable
paused_atstring date-time nullable
ended_atstring date-time nullable

Changes