Skip to main content

Response format

Example of a Problem response. Consult the endpoint reference for its HTTP status, media type and response schema:
Read the response schema for the operation you call. Where it is HTTPValidationError, validation details are in a detail array; each entry contains loc (where), msg (what) and type. Other documented 422 responses use Problem and may include a code and extra. Do not assume all 422 responses have the same shape.

Parse validation errors defensively

Accept JSON error bodies with either application/json or application/problem+json. Check the HTTP status first, then inspect the body:
  1. If code is present, use the matching entry on this page to choose the action.
  2. If errors is an array, read its loc, msg and type entries as validation details.
  3. If detail is an array, read it as the HTTPValidationError form. A string detail is an explanation, not a list of field errors.
  4. Preserve the X-Correlation-Id response header, traceId, status and the request URL for support; see Trace a request with X-Correlation-Id for responses that do not carry the header. Do not require code or extra to exist, and do not match human-readable messages as identifiers.
An invalid field and a rule involving several fields need not share a status. The reviewed outbound body rules raise 400 with BRIDGE_CORE_0103 when consent.status is GRANTED without capturedAt, or when template.media supplies both or neither of mediaId and url. Invalid field types or UUIDs can instead produce 422 request-validation details. Handle the status and error body together; do not require an errors array for every invalid request.

Legacy code strings

Some legacy error handlers append a symbolic name to code, for example BRIDGE_PRELOAD_FILE_0002 | PRELOAD_FILE_IS_PENDING. Preserve the complete received value for logs and support. For catalog lookup, accept a known bare code or its explicitly recognized legacy form; do not compare human-readable title or detail, invent an unknown code, or rewrite the response body. The current deployed handler version has not been independently confirmed by this source review.
Validation compatibility: some published OpenAPI responses declare HTTPValidationError.detail[] and application/json, while the shared API error handler reviewed for this documentation returns validation details as Problem.errors[] with application/problem+json. This editorial update preserves those published response definitions. Handle both forms; confirmation against the deployed API remains pending before choosing one as the only accepted form in a strict generated client.

Decide whether to retry

The general retry guidance does not add idempotency to an endpoint. For outbound reuse, recovery and partial writes, see Agent outbound and handoff. Custom Connections has its own error reference and no REST API key.

Message reply errors

For POST .../messages, the reviewed reply checks define these additional legacy forms:
  • BRIDGE_MESSAGE_0001 | MESSAGE_NOT_FOUND (404): the Message named by replyToMessageId was not found.
  • BRIDGE_MESSAGE_0002 | MESSAGE_IS_NOT_ON_CONVERSATION (403): the reply target belongs to another Conversation. Use a target from the Conversation you are sending to.
Preserve the full code string, including its symbolic suffix. These checks concern the reply target, not the attached file’s mediaId.

File upload errors

The reviewed upload flow defines these legacy error strings. Their suffix is part of the received code, not a request field. Consult the operation response contract and keep the compatibility parsing above. The operation determines which file errors apply: POST .../files checks metadata and can return 0003 or 0004 below. POST .../messages can return 0001 or 0002 when an attached mediaId is missing or still pending. Outbound template media has its own error handling; do not substitute these codes for BRIDGE_AI_LEADSCOUT_0016.

Agent Error Codes

Error codes for Agent operations. POST .../agents/{agentId}/outbound returns 0001 and 0004 as 404, 0002 and 0006 as 409, and 0003 and 0005 as 422.
  • 0002: the Agent is a draft or has no line. extra.reason says which; the same reason appears as unavailableReason in GET .../agents.
  • 0006: the Contact’s conversation on the line the request resolved is held by another Agent or by a Bridge User. Nothing was sent. Release it with POST .../conversations/{conversationId}/release, using extra.conversationId, then retry. extra also carries channelId, and controllingAgentId (the Agent holding it) only when an Agent holds it: when a Bridge User does, the key is absent, not null.
GET .../agents returns 0007 as 400 when the cursor is malformed or was issued for another workspace. Start again without a cursor. Keep the same type filter while paging: a cursor issued under one type filter is rejected if the request carries a different type.

Other codes returned by POST .../agents/{agentId}/outbound

For POST .../agents/{agentId}/outbound, 5xx errors carry no code or extra.

LeadScout Error Codes

Additional codes documented for starting a LeadScout outbound conversation with POST .../leadscout/outbound:

Brand Error Codes

Error codes for brand checks when creating a conversation. Returned as 400. Send a brandId or a providerChannelId for every external participant; extra.resources lists the participants that had neither.

Conversation Error Codes

Error codes for conversation operations. When creating a conversation, BRIDGE_CONVERSATION_0105 returns 409 with extra.reason set to PARTICIPANTS_MISMATCH: a released conversation holds the Contact’s line with other Contacts or lines. Request the same Contacts and lines, or use another line. BRIDGE_CONVERSATION_0601 returns 404, 0602 and 0603 return 400, and 0604 to 0608 return 422. See Onboarding template parameters for what each one carries in extra and how to fix it.

External User Error Codes

Error codes for external user (contact) operations.

Internal User Error Codes

Error codes for internal user operations.

Pipeline Error Codes

Error codes for the pipelines and pipeline records operations. See Create and move pipeline records for the full workflow. BRIDGE_PIPELINE_0311 codes in extra.errors[].code: The pipelines operations also return 403 BRIDGE_CORE_0301 when the workspaceId in the path is not the workspace of the API Key, 404 BRIDGE_EXTERNAL_0001 when the Contact does not exist, 404 BRIDGE_WORKSPACE_0001, 400 BRIDGE_CORE_0104 for an invalid cursor, and 429 BRIDGE_RATE_LIMIT_0001.

Provider Channel Error Codes

Error codes for provider channel operations. When creating a conversation, this code is returned as 409 when no WhatsApp line is free for a Contact and there is no released conversation to recover, or when the providerChannelId you named is not available for that Contact.

Rate Limit Error Codes

Error codes returned when a workspace exceeds its request budget. See Rate limits for the budget, the headers and a client that paces itself. This is the only code that should be retried automatically, and only after the delay given in the Retry-After header. Authentication failures are not rate-limit errors and retrying them on a schedule will never succeed.

Request Error Codes

Error codes returned before an operation runs, when the request itself cannot be processed. See Changelog for parameters an endpoint will stop accepting. None of these should be retried unchanged. detail describes what is wrong and, when it can, names the field or parameter at fault; the same request will fail the same way until you change it.

Template Error Codes

Error codes for template operations. Returned as 404 by GET .../templates/{templateId} when the id or name does not match a WhatsApp template in your workspace.

Workspace Error Codes

Error codes for workspace operations.