Skip to main content

Error Reference

This is the single canonical catalog of error codes returned by the Prezent Platform API. Every documented endpoint (except SCIM, which follows RFC 7644 and is documented separately) reports failures using the same uniform error envelope and draws error.code from the stable catalog below.

For rate-limit specifics and the two distinct 429 surfaces, see the Developer Guide → Rate limits. For the full interactive endpoint reference, see the API Reference.

The error envelope

On failure, every endpoint returns the uniform error envelope:

{
"success": false,
"data": null,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Company rate limit exceeded. Please try again later.",
"details": { "category": "autogenerator" }
}
}
FieldTypeDescription
successbooleanAlways false on error.
datanullAlways null on error.
error.codestringA stable identifier from the catalog below.
error.messagestringA human-readable description (English).
error.detailsobjectOptional structured details (validation failures, downstream-service info, retry hints, etc.). May be absent.

error.code is a stable string: a code never changes its meaning or its HTTP status once published. Branch your error handling on error.code (and on the HTTP status), not on error.message — message text may be refined over time. Handlers may emit additional legacy keys alongside success, data, and error; these are not part of the contract and may change without notice.

Error codes by HTTP status

400 Bad Request

CodeMeaning
BAD_REQUESTGeneric bad request.
INVALID_JSONRequest body is not valid JSON.
MISSING_REQUIRED_FIELDA required field is absent from the request.
MISSING_QUERY_PARAMA required query parameter is absent.
MISSING_CALLBACK_IDcallback_id was not provided.
MISSING_SLIDES_ARRAYThe slides array is missing or invalid.
MISSING_PROMPTThe prompt field is missing.
MISSING_TEMPLATE_IDThe template_id field is missing.
MISSING_FILE_CONTENTFile content or file name is missing.
MISSING_SHARE_DETAILSshareDetails is required when type is feedback.
INVALID_TYPEAn invalid type value was provided.
INVALID_DATA_TYPEA field value has the wrong type.
INVALID_PAYLOADThe payload format is invalid.
INVALID_REQUESTGeneric invalid request.
API_REQUEST_FAILEDA downstream/external API request failed.
FILE_UPLOAD_FAILEDFile upload failed.
INVALID_URL_SCHEMEWebhook target URL must use the https:// scheme.
INVALID_URL_PRIVATE_HOSTWebhook target URL must not resolve to a private, loopback, link-local, or metadata-service address.
INVALID_URL_PORTWebhook target URL uses a disallowed port.
INVALID_EVENT_TYPEOne or more webhook event types are not in the published catalog. Use "*" for all events or a known type name.
INVALID_STREAM_REQUESTThe stream session request was rejected.

401 Unauthorized

CodeMeaning
INVALID_API_KEYAPI key not found or not authorized.
EXPIRED_API_KEYAPI key has expired. Generate a new key.
UNAUTHORIZEDUnauthorized access.

403 Forbidden

CodeMeaning
FORBIDDENAccess to the resource is forbidden.
STREAM_CALLBACK_FORBIDDENThe callback_id is owned by a different API key.

404 Not Found

CodeMeaning
ENDPOINT_NOT_FOUNDThe requested endpoint does not exist or the key is not scoped to it.
RESOURCE_NOT_FOUNDThe requested resource does not exist.
NOT_FOUNDGeneric not-found.
WEBHOOK_SUBSCRIPTION_NOT_FOUNDThe webhook subscription does not exist or is not owned by the calling API key.
STREAM_CALLBACK_NOT_FOUNDNo job with that callback_id was found, or it is not owned by the calling API key.

405 Method Not Allowed

CodeMeaning
METHOD_NOT_ALLOWEDHTTP method not allowed for this endpoint.

409 Conflict

CodeMeaning
IDEMPOTENCY_KEY_REUSED_WITH_DIFFERENT_BODYThis Idempotency-Key was already used with a different request body. Reuse a key only for identical retried requests. See Idempotency.

415 Unsupported Media Type

CodeMeaning
UNSUPPORTED_FILE_TYPEFile extension or MIME type not accepted.

422 Unprocessable Entity

CodeMeaning
INVALID_INPUTInput failed validation.
UNPROCESSABLE_ENTITYRequest is well-formed but semantically invalid.

429 Too Many Requests

CodeMeaning
TOO_MANY_REQUESTSGateway throttle exceeded (10 req/s, 5 burst, 1,000/day per key).
RATE_LIMIT_EXCEEDEDPer-company per-category rate limit hit.
USAGE_LIMIT_EXCEEDEDPlan-level usage cap reached. Contact your CSM to upgrade.
THROTTLEDImage search / replace throttle — slow down and retry.
MAX_RETRIES_EXCEEDEDRetry limit exhausted.

When you receive a 429, honour the Retry-After response header and use jittered exponential backoff. See Developer Guide → Rate limits for the header set emitted by each 429 surface.

5xx Server Errors

CodeHTTPMeaning
INTERNAL_SERVER_ERROR500Unexpected server error.
EXTERNAL_SERVICE_ERROR502A downstream service returned an error.
SERVICE_UNAVAILABLE503Service temporarily unavailable.
GATEWAY_TIMEOUT504Upstream timeout.

Handling errors

A robust integration:

  • Branches on error.code and the HTTP status, never on message text.
  • Retries only idempotent or safely-retryable failures (for example 429, 503, 504) with jittered exponential backoff; pair retries with an Idempotency-Key so a retried write is never processed twice (see Idempotency).
  • Treats 4xx validation errors as terminal — fix the request rather than retrying it.
  • Logs error.details when present; it carries the structured context (which field failed, which category was throttled, retry hints) needed to diagnose the failure.

Where to go next

If you want toGo to
Understand rate limits and quotasDeveloper Guide → Rate limits
Retry safely after a network errorDeveloper Guide → Idempotency
Browse every endpoint interactivelyAPI Reference
Verify webhook deliveriesWebhooks