Skip to content
Get started
Overview

Error Codes

Complete reference of Linq API error codes with troubleshooting guides.

All API errors return a consistent JSON envelope with a nested error object, a success: false flag, and a top-level trace_id for debugging. The error object includes a doc_url linking directly to the error code reference page.

{
"success": false,
"error": {
"status": 400,
"code": 1001,
"message": "Missing required field",
"doc_url": "https://docs.linqapp.com/error/codes/1xxx/1001/"
},
"trace_id": "2eff5df5c6f688733c007523c4d61cd9"
}

On 429 responses, error also includes a retry_after integer (seconds to wait before retrying).

Tip: Always include the trace_id from error responses when contacting Linq support. See Debugging for more on trace IDs.

RangeCategoryRetry?
1xxxClient/Request ErrorsNo — fix the request
2xxxResource ErrorsNo — fix auth or resource reference
3xxxServer ErrorsYes — retry with backoff
4xxxDelivery ErrorsSometimes — depends on cause
5xxxAttachment/File ErrorsSometimes — depends on cause
CodeMessageHTTPTroubleshooting
1001Missing required field400Check the API docs for the required fields on the endpoint you are calling
1002Phone number must be in E.164 format400Include the country code with a + prefix (e.g., +14155551234 for a US number)
1003Invalid request body400Validate your JSON syntax using a linter or validator
1004Invalid message content400Ensure the parts array contains valid text, media, or link parts
1005Invalid parameter value400Review the parameter against the API spec to confirm accepted values, formats, and constraints
1006Cannot update direct message chats409Only group chats support updates — verify the chat you are trying to update is a group chat, not a direct message
1007Rate limit exceeded429Respect the Retry-After interval before retrying the request.
1008Invalid iMessage app message400app.name is required, and app.team_id must be 10 uppercase alphanumeric characters
CodeMessageHTTPTroubleshooting
2001Chat not found404Verify the chat ID is a correct UUID returned from POST /v3/chats or GET /v3/chats
2002Message not found404Verify the message ID is correct
2003Attachment not found404Verify the attachment ID is correct
2004Unauthorized401Include a valid Bearer token in the Authorization header (e.g., Authorization: Bearer your-api-key)
2005Access denied403Verify the resource (chat, attachment, subscription) belongs to your partner account.
2006Phone number permission denied403Verify the phone number is assigned to your account
2007Attachment not ready404Wait a few seconds and retry the request
2008Recipient not allowed403In sandbox mode, recipients must message you first before you can send to them
2009The chat is still being created409Wait a few seconds and retry the request
2010Webhook subscription not found404Verify the subscription ID is a correct UUID returned from POST /v3/webhook-subscriptions or GET /v3/webhook-subscriptions
2011Feature not available403Contact support to enable this feature for your account
2012Contact card not found404Verify the phone number is in E.164 format and matches a line assigned to your account.
2013This chat is unavailable409Check the chat status — you cannot interact with or perform actions on a chat after leaving it
2014A contact card already exists for this phone number409Use PATCH /v3/contact_card?phone_number={phone_number} to update the existing card instead of POST to create a new one.
2015Operation conflicts with current state409Refresh the resource before retrying (e.g., re-fetch the chat or message)
2016Operation not supported in group chats409Open the 1:1 chat with the intended recipient and retry there
2017Operation not supported on this chat’s service type409Check service on the chat before calling, and retry on a chat whose service supports the operation
2018iMessage app messages can only be sent over iMessage409Omit preferred_service — it defaults to iMessage for app parts — or set it to iMessage
2019Phone number not found404Verify the phone number ID against GET /v3/phone_numbers — it is the id of the line, not the number itself
2021Payment request not found404Verify the ID against GET /v3/payment_requests — it is the id from the create response, not the Stripe checkout session
2022Contact card setup failed500Retry the same POST or PATCH /v3/contact_card call after a few seconds — this is a transient failure, not a bad request

These are transient errors. Retry with exponential backoff (start at 1 second, max 30 seconds). The official SDKs handle retries automatically.

CodeMessageHTTPTroubleshooting
3001Server connection error500Retry the request after 1-5 seconds
3002Server operation failed500Retry the request after 1-5 seconds
3003Service connection error500Retry the request after 1-5 seconds
3004Service operation failed500Retry the request after 1-5 seconds
3005Network timeout504Retry the request after a short delay
3006Internal server error500If the error persists, contact support with the trace_id from the error response
3007Maximum delivery attempts exceeded500Check recipient availability and try again later
CodeMessageHTTPTroubleshooting
4001Delivery failed500Try sending the message again
4002Phone not available500Check the status of the sender line in your dashboard.
4003Webhook delivery failed500Ensure your endpoint is publicly reachable
4004Service unavailable503Retry the request after 30 seconds
4005Recipient does not support this message type422Confirm the recipient is iMessage-capable before sending app messages — see the iMessage capability check
CodeMessageHTTPTroubleshooting
5001File upload failed500Retry the upload (or the message that contained the attachment)
5002File download failed500Ensure the URL is publicly accessible
5003Failed to generate file URL500Retry the request
5004Invalid file type400Supported file types include JPEG, PNG, GIF, MP4, and PDF
5005File too large400Reduce or compress the file before uploading
5006Content type mismatch400Ensure the URL extension matches the actual file type
5007Failed to download image from the provided URL400Ensure the URL is publicly accessible and returns a valid image