error code.
Quick reference
Start with HTTP status. Retry only when stated.400 request validation
invalid_json, invalid_id, invalid_tweet_url, invalid_tweet_id.401 authentication
x-api-key, regenerate revoked keys, or re-authenticate
the connected X account. Covers unauthenticated and x_auth_failure.402 billing and credits
payment_options, then get explicit user confirmation.
Covers no_subscription, subscription_inactive, payment_failed,
no_credits, and insufficient_credits.403 permissions and account health
api_key_limit_reached, dm_not_permitted,
account_needs_reauth, and account_restricted. For x_account_protected,
choose a public timeline.404 missing resource
account_not_found, user_not_found, tweet_not_found, no_media,
and other missing resources.409 or 410 cursor state
Retry-After and retry once. Gone cursor: restart
cursorless and deduplicate IDs.422 write validation
x_automation_refused. Fix the account capability,
target, content, DM permissions, or media URL before sending again.
Covers x_dm_not_allowed, x_reply_not_allowed, x_target_not_found, x_content_too_long,
and the other 422 codes.202 active write
statusUrl while terminal is
false. Follow Retry-After, pollAfterMs, and nextAction.429 rate limit or cooldown
rate_limit_exceeded and x_rate_limited after
Retry-After or exponential backoff. Wait out login_cooldown via
retryAfterMs. Do not retry x_daily_limit on the same X account for 24
hours.500, 502, and 503 transient failures
internal_error, x_api_rate_limited,
x_api_unavailable and x_api_unauthorized. For writes, retry only when
safeToRetry is true, using a new Idempotency-Key.
Retry pagination_stalled once after 30 seconds. Keep returned results.Common error codes
The OpenAPIError schema lists every public code.
Default response.
xquik-api-contract: 2026-04-29 for a structured error object. Some
responses also include message, reason, retryAfter, or retryAfterMs.
Validation errors (400)
Validation errors (400)
invalid_input
invalid_json
invalid_id
invalid_tweet_url
https://x.com/user/status/ID.invalid_tweet_id
x.com/nasa/status/20.invalid_username
@ prefix.invalid_user_id
@username or profile URL, such as x.com/nasa.invalid_message_id
account_required
?account=@nasa.invalid_tool_type
invalid_format
csv, json, md, md-document,
pdf, txt, or xlsx.invalid_params
format and type values.missing_query
q parameter to search & community calls.missing_ids
ids.missing_params
too_many_ids
invalid_media_url
media entry as an HTTP or HTTPS URL.unsupported_media_combination
unsupported_field
media, not uploaded media IDs.missing_idempotency_key
Idempotency-Key header. Send 1 unique key per
intended write, and reuse it only to retry that write.invalid_idempotency_key
Idempotency-Key doesn’t match the endpoint’s format. Send a random UUID
v4, which every endpoint accepts.invalid_coverage_cursor
invalid_community_topic
invalid_cursor
cursor,
then use next_cursor. It costs nothing.Authentication errors (401)
Authentication errors (401)
unauthenticated
x-api-key or
regenerate a revoked key.x_auth_failure
Anonymous paid-read authentication (401)
Anonymous paid-read authentication (401)
401 with WWW-Authenticate: Bearer and a guest wallet action. This is not a Payment challenge. Authenticate or get confirmation before calling the action.Billing & credit errors (402)
Billing & credit errors (402)
402 creates no checkout. Account and OAuth responses advertise account billing actions. Guest responses advertise only POST /api/v1/guest-wallets/topups. Direct MPP responses include a Payment challenge and guest option. Get confirmation before calling any action. A write’s 402 adds top_up_url & dashboard.subscription_inactive
payment_failed
no_credits
insufficient_credits
Permission errors (403)
Permission errors (403)
api_key_limit_reached
dm_not_permitted
account_needs_reauth
account_restricted
Not found errors (404)
Not found errors (404)
not_found
account_not_found
user_not_found
reason says why:
not_found or suspended. Confirm the handle, or choose another
account when X suspended it.tweet_not_found
no_media
article_not_found
draft_not_found
style_not_found
no_cached_style
Conflict and cursor errors (409/410)
Conflict and cursor errors (409/410)
monitor_already_exists
coverage_cursor_unavailable
Retry-After seconds. Retry the same cursor once.
Repeated busy responses never authorize a fresh extraction.coverage_cursor_gone
Retry-After. Restart cursorless and deduplicate IDs.
Keep received results. Restarting creates a separate extraction.Media errors (413/415)
Media errors (413/415)
unsupported_media_type
Content-Type. Send a valid, supported file.media_too_large
Validation errors (422)
Validation errors (422)
x_account_feature_required
x_account_suspended
x_account_protected
x_duplicate_action
x_dm_not_allowed
x_dm_not_deleted
Idempotency-Key.x_target_not_found
x_reply_not_allowed
x_reply_target_unavailable
x_content_too_long
x_rejected
x_automation_refused
Idempotency-Key.
Waiting does not help. If X keeps refusing, check the account on x.com.
Vary your text or pace.x_media_rejected
x_image_invalid
media_download_failed
Active write lifecycle (202)
Active write lifecycle (202)
accepted, dispatching,
or pending_confirmation. Follow
write lifecycle recovery.x_post_not_sent
Idempotency-Key.Rate limit errors (429)
Rate limit errors (429)
rate_limit_exceeded
Retry-After seconds
from the response. JSON also includes retryAfter when available.login_cooldown
retryAfterMs or the
Retry-After header before reconnecting or reauthenticating.x_rate_limited
Retry-After, then retry with backoff.x_daily_limit
Server & service errors (500/502/503)
Server & service errors (500/502/503)
internal_error
x_api_rate_limited
x_api_unavailable
Retry-After
when present, otherwise retry with backoff.pagination_stalled
x_api_unauthorized
x_write_failed
safeToRetry &
nextAction. Contact support if it stays unsafe to retry.x_write_ambiguous
x_transient_error
safeToRetry is true.Write lifecycle recovery
Writes can return durable actions. Check their lifecycle fields first.Store the action
id, status, request.hash, account, target, billing, and
statusUrl.Poll the write action
statusUrl while terminal is false. Respect Retry-After and
pollAfterMs.Store the outcome
result and settled billing after terminal becomes true.Follow retry safety
safeToRetry is true, using a new Idempotency-Key.
Verify the result when nextAction.type is verify_result.Retry with exponential backoff
For reads, retrypagination_stalled once. Otherwise retry 429 and 5xx. Use Retry-After, then
exponential backoff with jitter. For writes, follow the durable action’s
safeToRetry and nextAction fields instead.
Formula. delay = baseDelay * 2^attempt + random(0, jitter)
Rate limit handling
HTTP status
429 Too Many Requests signals a rate limit or account cooldown.Retry-After header
Retry-After gives the seconds to wait before resending.Retry-After, read retryAfter or retryAfterMs from the JSON body.
After another 429, back off and stop after 3 attempts.
Best practices
Log status & error codes without credentials or private payloads. Set request timeouts & poll long-running jobs. Deleting missing resources returns404. Repeating deletion is safe.