Campaigns

One campaign with its verdict counts. Campaigns are tenant-isolated: another tenant's id (or an unknown id) is 404. The payment block is present only while the campaign is awaiting_payment.

get/v1/campaigns/{id}

Request

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

Path parameters

idstring uuid required

The campaign id (UUID, also the on-chain payment memo).

Response

The campaign.

campaign_idstring uuid required
status'draft' | 'awaiting_payment' | 'paid' | 'running' | 'paused' | 'cancelling' | 'settling' | 'awaiting_approval' | 'completed' | 'cancelled' | 'expired' | 'failed' required

draft (recipients can be added and are validated) → awaiting_payment (list and price locked by confirm) → paid → running ⇄ paused → settling → completed. Cancelling after payment goes through cancelling → settling → cancelled. awaiting_approval means the settlement owes a reversal that is waiting for review. expired: an unpaid campaign whose payment window ended, or a draft not confirmed within 7 days of its creation (reason: draft_expired). failed: the payment funded no recipient (fully reversed). Terminal: completed, cancelled, expired, failed.

product'stars' | 'premium' | 'star_gift' required

What every recipient receives: stars (quantity Stars), premium (months of Premium) or star_gift (one Telegram star gift, gift_id).

quantityinteger nullable

Stars per recipient (stars).

monthsinteger nullable

Premium months per recipient (premium).

payment_currency'ton' | 'usdt_ton' required

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.

recipient_countinteger nullable

Deliverable recipients locked at confirm.

unit_pricestring nullable

Price per recipient locked at confirm, decimal string in payment_currency.

amountstring nullable

The total to pay (unit_price × recipient_count).

payment_txstring nullable
received_amountstring nullable
max_deliverableinteger nullable

Recipients the payment funds — all of them inside the −1% … +2% tolerance, otherwise floor(received / unit_price).

failure_reasonstring nullable

underpaid (the payment funded no recipient), expired (unpaid in time) or draft_expired (never confirmed).

pause_reason'tenant' | 'cost_guard' | 'null' nullable
reversal_duestring nullable

The value owed back at settlement (received − delivered × unit_price), before the reversal fee.

reversal_amountstring nullable

What the reversal actually sent (due minus the reversal fee — currently 0.01 GRAM, or the USDT value of 0.15 GRAM); null until recorded.

reversal_skip_reason'dust' | 'null' nullable

dust — the amount owed was below the dust threshold (0.1 GRAM or 0.5 USDT) or the fee would consume it, so nothing was sent.

reversal_txstring nullable

The transaction hash of the reversal that returned what the campaign owed you; null while none has gone out, or when it was confirmed without a reference we can show (contact support). Never a placeholder (since 2.1.3).

created_atstring date-time required
updated_atstring date-time required
confirmed_atstring date-time nullable
expires_atstring date-time nullable

The payment deadline, only while awaiting_payment.

paid_atstring date-time nullable
finished_atstring date-time nullable

Example response

{
  "payment": {
    "chain": "ton"
  }
}

Changes