error.code for programmatic handling; use error.message for logging and display. Some errors include an error.meta object with structured context (for example meta.field for a validation failure, meta.plan and meta.max for billing limits). Codes are stable and namespaced with dot-separated segments, so you can match on a prefix (for example platform.* for any upstream platform failure, or byok.* for any bring-your-own-key issue).
The request_id field is present on every error response. The same value appears in the X-Request-ID response header. Include it when reporting an issue to support. See Debugging with request IDs for details on how to supply your own correlation ID.
Code namespaces
The first segment of the code tells you where the failure originated.Authentication
Accounts
Validation
The
code always starts with validation.. The specific sub-code after the dot identifies the field or rule that failed; error.meta.field in the response points to the offending field name when applicable.
Resources
Invite conflicts and validation
POST /v1/invites returns 409 resource.conflict for two different situations, distinguished by the message:
an active invite already exists for this brand and platformbrand already has a connected account for this platform
resource.conflict code. Note that GET /v1/invites and GET /v1/accounts query different objects, so an empty invite list does not guarantee that a create will succeed: the brand may already have a connected account for that platform. Check both before treating a create as safe.
expires_in_days is required on invite creation and must be one of 1, 3, 7, 14, or 30. Any other value (including omitting it) returns 400 validation.field_invalid with the message expires_in_days must be one of: 1, 3, 7, 14, 30.
Billing and plan limits
Limit responses include
error.meta.plan and error.meta.max so clients can prompt the user to upgrade.
Platform errors
When the upstream platform (Meta, TikTok, Google, etc.) rejects a call, the error code has the formplatform.<name>.<reason>. The HTTP status is forwarded when possible; otherwise it is 502 Bad Gateway.
BYOK (bring-your-own-key)
For platforms that require a customer-supplied OAuth app (currently Twitter / X).Publishing delivery
These are emitted by the post delivery workers and surface in the inbox / events stream rather than as direct HTTP responses, but they appear inevent.error_code for post.failed and post.partial events.
Telegram
System
Handling common cases
Reconnect when a token dies
account.reconnection_required and platform.<name>.auth both mean the stored OAuth token is no longer usable. Send the user back through GET /v1/oauth/url.
Storage quota
billing.storage_quota (HTTP 413) means the upload would push you past your plan’s storage limit. Check current usage with GET /v1/media/storage and delete unused media or upgrade.
Monthly post or interaction limit
billing.post_limit (HTTP 429) means your monthly allowance is exhausted. Limits reset at the start of your next billing period. The free plan uses a rolling 30-day window from your account anniversary.
Platform throttling
platform.<name>.rate_limit (HTTP 429) is the upstream platform throttling you, not SocialAPI. It does not consume your quota. Wait a few minutes and retry with backoff.
Validation failures
Anyvalidation.* code includes an error.meta.field pointing to the offending input. Surface the field name to the user.