---
title: "Check a recipient"
method: POST
path: "/v1/recipients/check"
tags: ["Recipients"]
---

# Check a recipient

`POST /v1/recipients/check`

## Request

- Base URL: `https://api.mystars.tg`
- URL: `https://api.mystars.tg/v1/recipients/check`
- Auth: API key in header `X-Api-Key`

Resolve a `@username` and check whether they can receive the requested
item, before you create an order. Read-only: nothing is created or
reserved.

**When eligibility cannot be verified.** If the check runs but cannot
reach a verdict in time (a transient upstream problem), it answers a
retryable `503 unavailable` — retry shortly. Only when no check can run
at all does it answer `eligible: true` with `indeterminate: true`: treat
that as "unknown", not as "yes". Either way `POST /v1/orders` runs its
own live check before it creates an order.

`resolved` is always `true`; a handle Telegram does not know is
`eligible: false` with `reason: not_found`.

**Why `type` is required.** The check runs against the very product you
intend to order, so it must know which one. Pass `type: stars` to resolve a
**Stars** recipient, or `type: premium` to resolve a **Premium-gift**
recipient (the Premium path also takes `months` — 3, 6 or 12). Always check
with the same `type` you'll use in `POST /v1/orders`: a Stars check does not
prove a Premium gift will be accepted, and vice-versa.

**Checking the order itself (since 2.3.0).** Fragment refuses some orders
only once the order is opened, and only for some quantities or currencies
(for example "You can buy a minimum of 12,500 stars"). A lookup of the
recipient alone does not see that. Send the order you intend to place —
`quantity` on a Stars check, `payment_currency` on a Premium check (with
`months`) — and the check also opens that order at Fragment (no payment
link, nothing signed) and drops it. Such a refusal comes back as
`eligible: false` with Fragment's text in `telegram_message`. Nothing is
created or reserved on our side either way. Check with the same
`quantity` (or `months`) and `payment_currency` you will order with:
`POST /v1/orders` runs this same check for the order it creates.

> ⚠️ **A recipient who already has an active Premium subscription cannot be
> gifted Premium.** Telegram blocks gifting a Premium subscription to anyone
> whose subscription is still active (for example, an annual plan that has
> not expired yet) — this is **Telegram's restriction, not ours**. The check
> surfaces it as `eligible: false` with `reason: "already_subscribed"` and
> Telegram's verbatim wording in `telegram_message`. The same recipient also
> makes `POST /v1/orders` fail with `422 recipient_ineligible`: no order is
> created and you are not charged. Pre-flighting Premium recipients here is
> the cheapest way to tell your user *before* they pay.

A refusal here does not count toward the daily budget of
ineligible-recipient refusals that `POST /v1/orders` keeps per tenant.

**Rate limit:** this endpoint carries a tighter per-tenant cap of 60
requests/min (in addition to the standard per-tenant budget), because each
call performs a live upstream lookup. If you exceed this,
you receive a `429` and should back off for the remainder of the minute.

## Request body

- RecipientCheckRequest
  - `type` 'stars' | 'premium', required: The product to check — and the product you intend to order. `stars` resolves a Stars recipient; `premium` resolves a Premium-gift recipient and uses `months`. Must match the `type` you pass to `POST /v1/orders`; a Stars check does not prove a Premium gift will be accepted (Premium has extra eligibility rules — see the endpoint description).
  - `recipient` Recipient, required
    - `username` string, required: Telegram @username (the leading `@` is optional, case-insensitive). After canonicalisation (strip `@`, lowercase) must match `[a-z0-9_]{1,32}` — invalid or oversized handles return 400.
  - `months` 3 | 6 | 12: Only meaningful for `type=premium` (defaults to 3). Must be 3, 6, or 12.
  - `quantity` integer: Optional, `type=stars` only: the number of Stars you intend to order (since 2.3.0). Given it, the check also opens that order at Fragment (no payment link, nothing signed), so a refusal that depends on the order rather than on the recipient — for example "You can buy a minimum of 12,500 stars" — comes back as `eligible: false` with Fragment's text in `telegram_message`. A quantity outside [50, 1000000] answers `400`. Ignored for `type=premium`. Without it, a Stars check looks up the recipient only.
  - `payment_currency` 'ton' | 'usdt_ton': Optional: the currency you intend to pay in (since 2.3.0). A Stars check uses it together with `quantity` (`ton` if omitted) and does not open an order on it alone. A Premium check opens the order for `months` when it is given. Send the same value you will pass to `POST /v1/orders`.

## Response `200`

Resolution + eligibility result.

- RecipientCheckResult
  - `resolved` boolean, required: Always `true`: the check formed a verdict. Kept for compatibility; it does NOT say the @username exists. A handle Telegram does not know is `eligible: false` with `reason: not_found`.
  - `eligible` boolean, required: Whether the recipient can receive the item.
  - `recipient_name` string, nullable: The resolved recipient's display name from Fragment, when available (best-effort) — useful to confirm you're sending to the right person. `null` if Fragment returned no name.
  - `reason` 'already_subscribed' | 'not_found' | 'ineligible' | 'null', nullable: Permanent-rejection class, set only when `eligible` is false: `already_subscribed`, `not_found`, or `ineligible`. `null` when eligible.
  - `telegram_message` string, nullable: Fragment's verbatim refusal text, when Fragment gave a refusal we recognise (for example "No Telegram users found." or "You can buy a minimum of 12,500 stars"); `null` otherwise: when eligible, and on a refusal Fragment did not word itself or that we do not recognise (since 2.3.0; earlier versions could pass other text through). Branch on `eligible` and `reason`, never on whether this text is present; show it to the buyer when it is.
  - `indeterminate` boolean: `true` when no eligibility check could run at all (no checking capacity was available) and this endpoint answered `eligible: true` as a permissive default, not a measurement. `false` on every real verdict (eligible or not). When a check runs but cannot reach a verdict, the endpoint answers a retryable `503 unavailable` instead. Treat an indeterminate response as "unknown", never as "yes": the recipient has not been checked. It is safe to proceed to `POST /v1/orders` (which runs its own authoritative check), but do not present it to a buyer as a confirmed-deliverable recipient. Always present since 1.11.0. Clients written against an earlier version saw the field absent; absent and `false` mean the same thing.

## Other responses

- `400`: Malformed request (`bad_request`): a missing or invalid field, header or query parameter (the `message` names it), a malformed `cursor`, a body that is not valid JSON, or a body nested deeper than 64 levels. Send integer query parameters as plain decimal digits: the pricing, order, giveaway and series routes refuse any other spelling (a sign, decimal point, exponent, hex prefix or surrounding spaces) with a `400` naming the parameter. Fix the request; retrying it unchanged gets the same answer.
- `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.
- `413`: The request body is larger than 256 KB (`bad_request`, `request body too large`).
- `415`: A request body was sent with a `Content-Type` other than `application/json` (a missing one included), or with an unsupported charset or `Content-Encoding` (`bad_request`). A POST without a body needs no `Content-Type`.
- `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.
- `503`: A required source was temporarily unavailable (`unavailable`): the price source, recipient eligibility that could not be verified right now, the payment check a cancel runs first, or (order create, rarely) no fulfilment capacity assigned to your tenant right now. The `message` is generic (`internal error`), so it does not say which: treat every `unavailable` as **retryable** — reuse the same `Idempotency-Key` and try again shortly. An app `503 unavailable` creates and cancels nothing and charges nothing. If `503 unavailable` on order create persists, contact support with the `X-Request-ID`. The edge's own `502`, `503` and `504` (the service restarting or timing out) answer the same envelope with `unavailable`, and may follow a request that did land: retry with the same `Idempotency-Key`, and an order create that landed is replayed, never duplicated. On the campaign, gift and giveaway routes a `503` may also be a gift catalog that cannot be read right now (`gift_catalog_unavailable` — retry later) or an option that is not enabled for your tenant yet (`prize_type_unavailable`, `partner_conditions_unavailable`, `antibot_enforce_unavailable`, `autopost_unavailable`, `series_unavailable` — do not retry, ask support); the `code` says which.

## Changes

- **2026-11-01** `b6cdc8aff8c2`: 2 info
  - added the new optional request property `payment_currency`
  - added the new optional request property `quantity`
- **2026-10-31** `9f589c4dd26b`: 93 warning, 37 info
  - added the new `antibot_enforce_unavailable` enum value to the `error/code` response property for the response status `400`
  - added the new `antibot_enforce_unavailable` enum value to the `error/code` response property for the response status `401`
  - added the new `antibot_enforce_unavailable` enum value to the `error/code` response property for the response status `429`
  - added the new `attestation_limit_reached` enum value to the `error/code` response property for the response status `400`
  - …126 more
- **2026-07-31** `b98bd93b6996`: 1 info
  - added the optional property `indeterminate` to the response with the `200` status

[Operation history](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/changes/v1/recipients/check/post.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)
