Errors
Status codes
Section titled “Status codes”| Code | Meaning | May charge |
|---|---|---|
200 |
Success. The charge may be 0. |
✅ Yes |
400 |
Bad request. Also returned when balance is insufficient. | ❌ No |
401 |
Invalid Api-Key. |
❌ No |
403 |
Missing Api-Key header or no access to the method. |
❌ No |
404 |
Resource not found. | ❌ No |
405 |
Method not supported, HEAD included: GET only. |
❌ No |
422 |
Request validation failed. | ❌ No |
429 |
A request-per-minute or concurrency limit was exceeded. | ❌ No |
500 |
Internal service error. | ❌ No |
503 |
The service is temporarily unavailable. | ❌ No, except the rare billing 503 |
Error shape
Section titled “Error shape”An error returns detail, a human-readable description, and code, a machine
code to branch on:
{ "detail": "Error description", "code": "not_found" }detail texts do not change, but use code for handling. Exception: 503,
see below.
Exceptions:
401— the description is inmessage, notdetail:{"message": "Not authenticated", "code": "not_authenticated"}.500— the textInternal Server Error(text/plain), not JSON and withoutcode.
Validation errors (422) return a pydantic v2 list in detail:
{ "detail": [ { "type": "missing", "loc": ["query", "name"], "msg": "Field required", "input": null, "url": "https://errors.pydantic.dev/2.11/v/missing" } ], "code": "validation_error"}loc— path to the bad field.msg— human-readable message.type— programmatic error type, e.g.missing,literal_error,bool_parsing,datetime_from_date_parsing.input— the received value;ctxandurlmay also appear.
from not earlier than to in TON feeds:
{ "detail": [ { "loc": ["query", "from"], "msg": "`from` must be earlier than `to`", "type": "value_error", "input": null } ], "code": "validation_error"}A date outside 1970–2106 looks the same: type: value_error, input: null,
no url or ctx. Only msg differs:
"`from` must be between 1970-01-01 and 2106-02-07" (or `to`), and
loc is from or to.
Unknown query parameters are ignored and do not cause 422.
Error codes
Section titled “Error codes”code |
Status | Meaning |
|---|---|---|
insufficient_balance |
400 |
Insufficient balance. |
invalid_identifier |
400 |
Invalid ID or username. |
invalid_address |
400 |
Unreadable TON address. |
testnet_address |
400 |
TON testnet address. |
invalid_tx_hash |
400 |
Transaction hash is neither hex nor base64. |
bad_request |
400 |
Other request errors. |
not_authenticated |
401, 403 |
Missing Api-Key header or invalid token. |
access_denied |
403 |
No access to the method. |
not_found |
404 |
Resource not found. |
method_not_allowed |
405 |
Method not supported. |
validation_error |
422 |
Parameter validation failed. |
rate_limited |
429 |
Rate limit exceeded. |
internal_error |
500 |
Internal service error. |
unavailable |
503 |
The service or part of it is temporarily unavailable. |
New codes may be added: handle an unknown code by its HTTP status.
Examples
Section titled “Examples”401 — invalid token
Section titled “401 — invalid token”{ "message": "Not authenticated", "code": "not_authenticated" }Without the Api-Key header, the response is 403 with the same code:
{ "detail": "Not authenticated", "code": "not_authenticated" }400 — insufficient balance
Section titled “400 — insufficient balance”{ "detail": "Not enough balance to perform this action. Please top up your balance.", "code": "insufficient_balance"}For insufficient balance on a paid endpoint, the response also includes
Telesint-Billing-Charged: 0, Telesint-Billing-Balance, and
Cache-Control: private, no-store. Other error responses (400, 404,
405, 422, 429, 500, 503, including the billing 503) carry no
billing headers.
The balance is checked only for a successful response: with a zero balance,
request errors (400 invalid_*, 404, 422) come as usual, and
400 insufficient_balance comes only in place of a 2xx response.
404 — resource not found
Section titled “404 — resource not found”{ "detail": "User not found", "code": "not_found" }429 — rate limit exceeded
Section titled “429 — rate limit exceeded”{ "detail": "Rate limit exceeded", "code": "rate_limited", "reason": "rpm" }The response includes Retry-After. The reason is either rpm or
concurrency; see Rate limits.
503 — rate limiter unavailable
Section titled “503 — rate limiter unavailable”{ "detail": "Rate limiter is temporarily unavailable", "code": "unavailable" }This response includes Retry-After: 5 and is not charged.
400 — unreadable TON address or hash
Section titled “400 — unreadable TON address or hash”{ "detail": "Invalid TON address", "code": "invalid_address" }{ "detail": "Invalid TON address", "code": "testnet_address" }{ "detail": "Invalid transaction hash", "code": "invalid_tx_hash" }Unreadable and testnet addresses share the same detail and differ by
code. testnet_address applies only to user-friendly forms with the testnet
flag (kQ…/0Q…): the raw form carries no flag and is accepted as a mainnet
address.
503 — blockchain data temporarily unavailable
Section titled “503 — blockchain data temporarily unavailable”{ "detail": "TON data is temporarily unavailable. Please retry later.", "code": "unavailable" }The response contains Retry-After: 5 and is not charged.
Also returned when the request exceeds the server timeout (about 10 s): a
large limit, a deep page, direction=all on a large address. The timeout
covers the data fetch; waiting for the charge is not part of it. A timeout and a
source failure are not distinguished. If a retried feed request returns 503
again, lower limit or narrow the from/to window; start with limit=100
and direction=in/out.
Applies only to TON wallet endpoints. The user profile returns
ton_wallets: null (history not read: failure or timeout) instead of an error.
503 — billing unavailable
Section titled “503 — billing unavailable”{ "detail": "Billing is temporarily unavailable. Please retry later.", "code": "unavailable" }The response contains Retry-After: 5. Possible on any paid endpoint,
including a free (0₽) response: the server could not read the balance for the
Telesint-Billing-Balance header. Never returned by /v1/me/.
In rare cases the charge may have gone through: check the balance in
/v1/me/. Simpler: repeat the same summary or feed request within an hour. If
the charge went through, the retry costs 0₽, otherwise the normal price; it is
never charged twice within the hour. If the charge may have gone through, the
summary or feed hour counts as opened by that request: start the timer from
when it was sent. Repeating other methods is charged again.
All three 503s — rate limiter, blockchain data, billing — have
code: unavailable and Retry-After: 5. They differ only by detail (the
texts are stable), and money may have gone only on the billing 503.
Retry strategy
Section titled “Retry strategy”| Status | Retry? |
|---|---|
2xx |
— |
400, 401, 403, 404, 422 |
No. Fix the request / credentials / balance, then retry. |
429 |
Yes. Wait for the number of seconds in Retry-After. |
5xx |
Yes. Honor Retry-After when present; otherwise use exponential backoff: 1s, 2s, 4s, 8s. |