Download Markdown

Error Codes

Every endpoint returns errors in the same JSON shape. This page lists what each status and error code means and what to do about it.

Error response format

JSON
{
  "code": "entitlement_denied",
  "message": "platform xiaohongshu is not in the application policy",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
FieldMeaning
codeThe error code. Branch on this in your code
messageA human-readable explanation. Its wording may change, so don’t parse it
trace_idTrace ID for support
violationsFor validation errors, one entry per invalid field

The X-Request-ID response header identifies the request. Use it to find the call in the console’s request log.

Handle by status code

StatusMeaningRetry?What to do
400The request is invalidNoFix the request using code and violations
401The API key is missing, invalid, expired or revokedNoCheck the Authorization header and the key
402The organization is out of creditsNoTop up in the console or check billing
403The request is outside the application’s accessNoNarrow the request, or ask your organization admin to request access. A new key does not widen access
404The ID does not exist or does not belong to your applicationNoCheck the ID
409The result is not ready, or conflicts with an earlier requestDepends on the codeSee the codes below
410The cursor is past its retention windowNoStart reading again; see change feed
429Rate limit or daily quota exceededYesWait for Retry-After, then retry
502, 503, 504The service is temporarily unavailableYesRetry with exponential backoff. For create requests, first check whether the resource was created

Common codes

StatuscodeMeaningWhat to do
401unauthorizedThe key is missing, invalid, expired or revokedStop retrying and check the key
402credit_insufficientThe organization is out of creditsTop up, then retry
403entitlement_deniedThe platform, field or feature is outside your accessNarrow the request, or request access
429rate_limit_exceededRequests per second, concurrency or daily allowance exceeded; message says whichRetry after Retry-After; daily allowances reset at 00:00 UTC
429quota_exceededThe daily quota for this operation is used upWait for the 00:00 UTC reset, or request an increase
StatuscodeMeaningWhat to do
400invalid_queryInvalid search parameters or modeFix the request; new integrations use mode: keyword
400invalid_document_queryInvalid time or paging parameters, an unknown parameter, or an author query without a platformFix the request
400invalid_classification_queryInvalid source_platform, limit or after_code in a category queryFix the request
404user_not_foundNo documents from this user within your access and time windowWiden the window (up to 31 days), or collect with a live query
503search_backend_unavailableSearch is temporarily unavailableRetry with exponential backoff
503document_query_timeoutThe query timed outRetry later with the same cursor; don’t restart with a smaller window
503catalog_unavailableBrowsing is temporarily unavailableNarrow the window and retry with backoff
503catalog_tags_pausedFiltering by native tags is pausedDon’t retry in a loop; drop tags if results without tag filtering are acceptable
503vector_search_disabledVector search has been retiredDon’t retry; use mode: keyword

Documents

StatuscodeMeaningWhat to do
400invalid_requestInvalid parameters, for example more than 50 IDs in a batch readFix the request
403forbiddenThe document or a field is outside your accessRequest access
404not_foundThe document doesn’t existCheck the ID

In a batch read, a failed document carries its own error (not_found or forbidden); the request still returns 200.

Attachments

StatuscodeMeaningWhat to do
403forbiddenNo access to the document or to the assets fieldRequest access
404not_foundThe document doesn’t exist or isn’t stored yetCheck the ID
404attachment_not_foundThe attachment doesn’t exist or belongs to another documentCheck asset_id
409attachment_incompleteThe attachment isn’t fully stored yetRetry later
503attachment_unavailableThe attachment service is temporarily unavailableRetry later

Analytics

StatuscodeMeaningWhat to do
400invalid_queryInvalid query shape, limits or member names, or too long a range for a directly computed sourceFix the request; don’t retry automatically
422analytics_not_answerableThe combination can’t be answered from the existing rollups, for example hourly totalsChange dimensions or granularity; see /v1/analytics/meta
503analytics_unavailableTemporarily unavailable, rollups still building, or a direct computation timed outRetry a few times with backoff; for timeouts, shorten the range or add filters

Live queries

StatuscodeMeaningWhat to do
400live_query_invalidInvalid parameters, for example a platform that can’t filter by publish time, or a repeated conditionFix the request per message, or choose another platform
404live_query_not_foundThe query doesn’t exist or belongs to another applicationCheck the ID
409live_query_results_not_readyResults are not ready yetKeep polling the status
409idempotency_key_conflictThe same Idempotency-Key was sent with different parametersUse a new Idempotency-Key for a new request
409platform_dataset_route_missingLive queries are not yet available for this platformContact us to enable it

Monitoring subscriptions

StatuscodeMeaningWhat to do
400invalid_jsonThe request body isn’t valid JSONFix the request
400collection_request_failedValidation failed, for example a missing user or channel identifier, or an out-of-range intervalFix the request per message
400dataset_id_not_allowedThe request includes dataset_idRemove the field
403collection_request_failedMonitoring isn’t enabled, the platform is outside your access, or monitoring is unavailable for itRequest access or contact us
404collection_request_failedThe subscription doesn’t exist or belongs to another applicationCheck the ID
409keyword_subscription_limit_reachedToo many active keyword subscriptionsPause subscriptions you no longer need
409platform_dataset_route_missingMonitoring is not yet available for this platformContact us to enable it
503collection_request_failedTemporarily unavailableRetry later

Bulk exports

StatuscodeMeaningWhat to do
400invalid_export_requestMalformed request bodyFix the request
400export_create_failedValidation failed, for example a format/compression mismatch, start after end, partial fields for parquet, or the daily export limitFix the request per message
400invalid_export_filesequence is not a non-negative integerUse the sequence from the file list
403export_forbiddenExports are not enabled, or a platform or field is outside your accessAsk your organization admin to request access, or request fewer fields
404export_not_found, export_file_not_foundThe job or file doesn’t exist, belongs to another application, or has expiredExpired exports must be recreated

Console

StatuscodeMeaningWhat to do
409application_limit_reachedThe organization reached its application limit (10 by default)Contact us to raise it

Change feed

StatuscodeMeaningWhat to do
410—The cursor is older than the 30-day retention windowRead again without a cursor, and fill the gap with a bulk export
503changes_timeout, changes_unavailableThe service is temporarily unavailableRetry after Retry-After

Retry guidance

  • Retry only 429 and 5xx.
  • Use exponential backoff with jitter, starting at 500 ms.
  • When Retry-After is present, wait at least that long.
  • When retrying a live query creation, send the same Idempotency-Key to avoid creating it twice.

More production guidance: Limits, Retries & Troubleshooting.