Giveaways

One giveaway with its entry counts, escrow and funding state, and the frozen conditions. Another tenant's id (or an unknown id) is 404.

get/v1/giveaways/{id}

Request

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

Path parameters

idstring uuid required

The giveaway id (UUID).

Response

The giveaway.

idstring uuid required
public_idstring required
status'draft' | 'awaiting_funding' | 'open' | 'closed' | 'drawn' | 'settling' | 'settled' | 'cancelled' required

draft → awaiting_funding (the first fund opened its funding order) → open (paid and public) → closed (entrant list frozen) → drawn (winners picked from a TON block beacon) → settling (prizes being delivered) → settled. cancelled only from draft or awaiting_funding: by you, an expired draft (a draft never funded is cancelled 72 hours after its creation), or a funding order that expired unpaid after its 2-hour window or was reversed (giveaway.cancelled reason cancelled, draft_expired or funding_expired). An open giveaway always runs on to settled; it ends with close, never cancel. Fund and cancel apply in draft and awaiting_funding, close in open, attestations in draft, awaiting_funding and open. Terminal: settled, cancelled.

external_refstring nullable required
listedboolean
entries_eventsboolean
titlestring nullable
prize_type'stars' | 'premium' | 'gift' required

stars (Stars per winner), premium (Premium months per winner) or gift (one star gift per winner).

prize_quantity_per_winnerinteger required
winner_countinteger required
channel_idstring uuid nullable
series_idstring uuid nullable
series_indexinteger nullable
duration_secinteger nullable
created_atstring date-time nullable
opens_atstring date-time nullable
closes_atstring date-time nullable
closed_atstring date-time nullable
commit_hashstring nullable

The provably-fair commitment, set when the giveaway opens.

entry_urlstring nullable required

The link entrants open.

proof_urlstring required

The public verification page.

conditions_format'v1' | 'v2' required

v2 when an attestation condition is part of the commitment.

Changes