Error Code Reference

Understand common API errors, account restrictions, and the steps needed to resolve them.

Understand common API request errors, identify the field containing the error, and choose the next action.

Read the HTTP status and response body together

An HTTP status describes the request outcome. A response field such as errorCode or code can identify a more specific error. These values are different: for example, HTTP 400 can contain errorCode: 1401.

Error bodies are not identical across endpoints. They can contain errorCode, code and message, Message, error, or a JSON string. A body can also be empty. Check the HTTP status first and allow the response formats documented for the operation.

An API request error is also separate from a message delivery result. A message can be accepted and later fail delivery. See Delivery Status Reference for message states and descriptions returned in records and callbacks.

Account access errors

HTTP statusResponse valueMeaningWhat to do
400errorCode: 1401The requested API operation is not enabled for the GHL-connected account or agency.Confirm you are using the intended account. Contact TextGrid Support to review API access for the GHL connection. Repeating the request with the same configuration will not enable it.
400errorCode: 1402Direct API messaging is restricted for the GHL-connected account.Contact TextGrid Support to review API messaging access for that account.
401Body can vary or be empty.Authentication failed, or an operation requiring additional account permission is not authorized.Verify the credentials and account, then check whether the operation requires separate access. A 401 is not always resolved by replacing otherwise valid credentials.

For example:

{
  "errorCode": 1401
}

Use TextGrid credentials for the account performing the operation. See Getting Started with TextGrid and Twilio Compatibility and Migration.

Messaging error codes

These messaging request errors use the code field. In the JSON examples below, code and status are strings.

HTTP statusCodeMeaningWhat to do
40021606The From value is not a valid, SMS-capable sending number or short code for the account.Check the sender, its capabilities, and which account owns it. Use the correct account credentials and an eligible sender.
40021610Sending is blocked by an opt-out or blacklist restriction for the sender/recipient pair.Stop sending to the recipient while the restriction applies. Check the recipient's preference and resolve the restriction; do not switch senders to bypass it.
4004403MMS is not enabled for the sending number.Check the number's MMS capability and configuration. Contact support if MMS needs to be enabled, or use an eligible MMS sender.
4004303The recipient number is empty.Supply a valid recipient phone number in the documented format.

Example opt-out error:

{
  "code": "21610",
  "status": "400",
  "message": "The message From/To pair violates a blacklist rule."
}

Error text can include the affected number or additional context. Do not require an exact match to the complete message text when a specific code is available.

See Managing Opt-ins and Opt-outs and Sending SMS and MMS.

Sending restrictions and limits

HTTP statusMessage or conditionMeaningWhat to do
403SMS Sending Limit reached. Please contact supportThe account's applicable sending allowance has been reached.Pause sends and contact support to review the allowance. Do not keep retrying while the restriction remains.
400SMS Sending Limit reached or will be reached by sending this bulk messageThe requested batch would exceed the applicable allowance. The response can include additional text.Review the batch and account allowance. Submit only an eligible batch after resolving the limit.
403International traffic is not allowedInternational messaging is not supported.International messaging is not supported. Check the destination number; retrying will not enable international delivery.
400Your account is sms limited. Please contact supportSMS sending is disabled or restricted for the account.Contact support to review account activation and sending access.

For example, a sending-limit error can be returned as:

{
  "Message": "SMS Sending Limit reached. Please contact support"
}

Limits depend on the applicable account configuration. Do not infer an account's daily allowance or reset time from an error message alone.

Check Overview → Messaging limits in the TextGrid Dashboard to see your usage, allowance, and its scope. Use the Email us link beneath that card to request an increase. See Messaging Limits.

HTTP 429 and queue-capacity errors

If you receive HTTP 429, reduce request volume and use delayed retries with an increasing delay and a maximum attempt count. Honor Retry-After when supplied; do not assume every response includes that header.

Distinguish an actual HTTP 429 response from a queue-capacity description shown in a message record or delivery notification. A description containing 429 does not mean the original API request returned HTTP 429.

Before resending a message with an uncertain outcome, check the existing message record and callbacks. A retry can create another message and additional charges. See Troubleshooting Messages and Calls.

Other common request errors

HTTP statusMessageMeaningWhat to do
400Email is disabled for this account. Please contact supportThe account is not enabled for the Email API.Contact support to request email access before retrying.
400Account Limited to 5 numbersThe account is subject to a five-number purchase limit. Related accounts can count toward that limit.Check existing numbers and contact support to review the applicable limit before another purchase.
400Account Limited to … numbers. Please contact [email protected]The configured number-purchase limit has been reached. The number in the message can vary.Contact support to review the limit.
400Balance is below 0. Please Add Funds and try againFunding requirements prevent the requested operation.Review the account balance and funding requirements before resubmitting.
400Invalid Parameter values.Required input is missing or invalid.Check the endpoint's required fields and request content type.
401Not authorized to use Bulk SMS. Please contact Textgrid SupportBulk messaging is not enabled for the account.Request bulk messaging access from support.

The five-number limit can be returned as a JSON string rather than an object:

"Account Limited to 5 numbers"

Sender errors reported after submission

Descriptions such as 'From' number not found can appear in message results or delivery details. They indicate that the sender needs to be checked against the sending account and its available numbers.

Do not treat a delivery description as an HTTP status or assume it will appear in a code field. Check the message's status, or the callback's MessageStatus and SmsStatusDetail, as described in Delivery Status Reference.

Retry only when appropriate

Correct invalid input, opt-outs, permissions, registration, account limits, or funding issues before another attempt. Immediate retries do not resolve those conditions.

For temporary capacity issues, reduce concurrency and retry with a delay. For a timeout or disconnected request, establish whether the original operation succeeded before repeating a send, call, purchase, or registration request.

When contacting support, include the endpoint, HTTP status, error field and value, approximate time and time zone, and relevant resource identifier. Remove credentials and unnecessary customer information from logs.


Did this page help you?