---
title: "Get campaign statistics"
method: GET
path: "/v1/campaigns/{id}/stats"
tags: ["Campaigns"]
---

# Get campaign statistics

`GET /v1/campaigns/{id}/stats`

## Request

- Base URL: `https://api.mystars.tg`
- URL: `https://api.mystars.tg/v1/campaigns/{id}/stats`
- Auth: API key in header `X-Api-Key`

Counts by verdict and by delivery status, each split by reason (skipped
rows included), the amounts (expected, received, delivered value, the
reversal owed and what was sent), and an ETA in seconds while the
campaign is `paid`, `running` or `paused` (`null` otherwise). A
`star_gift` campaign adds the `gift` block.

## Path parameters

- `id` string, uuid, required

## Response `200`

The campaign statistics.

- CampaignStats
  - `campaign_id` string, 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`.
  - `validation` object, required
    - `total` integer, required
    - `pending` integer, required
    - `ok` integer, required
    - `unverified` integer, required
    - `rejected` integer, required
    - `by_reason` ReasonCounts, required: Count per reason.
  - `delivery` object, required
    - `pending` integer, required
    - `excluded` integer, required
    - `queued` integer, required
    - `delivered` integer, required
    - `failed` integer, required
    - `skipped` integer, required
    - `by_reason` ReasonCounts, required: Count per reason.
  - `amounts` object, required
    - `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`.
    - `unit_price` string, nullable, required
    - `expected` string, nullable, required: The amount quoted at confirm.
    - `received` string, nullable, required
    - `delivered_value` string, nullable, required: `unit_price` × delivered.
    - `reversal_due` string, nullable, required
    - `reversal_amount` string, nullable, required
    - `reversal_skip_reason` 'dust' | 'null', nullable, required
    - `reversal_tx` string, nullable, required: The transaction hash of the reversal; `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).
  - `eta_seconds` integer, nullable, required: Estimated seconds to finish, while `paid`, `running` or `paused`.
  - `gift` CampaignGiftStats, nullable, required
    - `gift_id` string, required
    - `stars_per_gift` string, nullable, required
    - `delivered` integer, required
    - `failed` integer, required
    - `skipped` integer, required
    - `failed_by_reason` ReasonCounts, required: Count per reason.
    - `skipped_by_reason` ReasonCounts, required: Count per reason.
    - `stars_spent` string, nullable, required: Stars of the delivered gifts at the locked gift price.
    - `comment_suppressed` boolean, required

## Other responses

- `401`: Missing or invalid `X-Api-Key`.
- `403`: The API key is valid, but the tenant is suspended (for example after `/api_revoke` — run `/api_rotate` in the bot to restore access) or banned, or the product (campaigns, giveaways) is not enabled for it. Products are enabled per tenant on request. A source address blocked at our edge gets `403 forbidden` with the message `source blocked`, whatever the key.
- `404`: No such resource for this tenant (another tenant's id is also `404`).
- `429`: A rate limit was reached (`rate_limited`). See **Rate limits** in the overview. Which `429`s carry headers: - **Per-minute buckets** — the general request budget, the order-lifecycle bucket, the pricing/recipient-check probe cap (60 req/min), the campaign bucket, and your giveaway read, write, quote and attestation buckets. Every answer metered by one carries `RateLimit-Policy`, `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds); a `429` adds `Retry-After` (seconds). - **Caps, no `Retry-After`** — the daily intake cap and the daily order cap on `POST /v1/orders` (UTC day), the per-recipient guard on unfinished orders to one `@username`, and the cap on live campaigns. These `429`s carry no `Retry-After`, but they do carry the `RateLimit-*` headers of the per-minute bucket the request passed (often with `RateLimit-Remaining` above zero): branch on `Retry-After`, never on `RateLimit-Remaining`. Back off; the daily intake and order caps clear at the next UTC midnight. - **The daily budget of ineligible-recipient refusals** on `POST /v1/orders` — its `429` carries `Retry-After` and `error.retry_after`, both the seconds until 00:00 UTC, when the budget resets, plus the `RateLimit-*` headers of the order bucket it passed. `error.retry_after` is what sets it apart from the other `429`s. While the budget's places are held only by your own checks still running, the create answers a short `429` instead: `Retry-After` of a few seconds and no `error.retry_after` — retry after `Retry-After`. - **The giveaway quote budget shared by all tenants** — its `429` carries `Retry-After` (seconds until the shared budget reopens) and the `RateLimit-*` headers of your own quote bucket, never figures for the shared budget. - **Edge throttle** — a coarse per-IP throttle in front of the API answers the same envelope with `Retry-After: 1` and no `RateLimit-*` headers.

## Changes

- **2026-10-31** `9f589c4dd26b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/changes/v1/campaigns/:id/stats/get.md)

---

[API](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api.md) - [All operations](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/revisions/b6cdc8aff8c2?raw)
