# Error Codes

## API Error Codes

Below you will find the error codes for the SMS API:

* [SMS Sending](#sms)
* [SMS Cancellation](#annulation-des-sms)
* [Status Retrieval](#recuperation-des-statuts)
* [List of Statuses](#recuperation-des-statuts)
* [Status Error Codes](#codes-erreurs-des-statuts)
* [Number Validation](#hlr_code)
* [Location](#location_code)
* [Sub-account](#subaccount_code)
* [Voice Message Sending / VMS](#mail)
* [Email Sending](#mail-1)

### SMS Sending <a href="#sms" id="sms"></a>

| Codes | Message                                                                                            |
| ----- | -------------------------------------------------------------------------------------------------- |
| 1     | API key is required                                                                                |
| 2     | The field phoneNumbers is required                                                                 |
| 4     | Message not found                                                                                  |
| 10    | Incorrect API key                                                                                  |
| 11    | Insufficient credit                                                                                |
| 13    | No default price was found for the following numbers                                               |
| 14    | The number is in the STOP SMS list                                                                 |
| 15    | The number is already in the list                                                                  |
| 20    | Account deactivated                                                                                |
| 22    | SMS Marketing: Sending time is invalid, it must be between 8 AM and 10 PM                          |
| 23    | SMS Marketing: The date \[…] is invalid, sending SMS is not allowed on Sundays and public holidays |
| 30    | Account blocked                                                                                    |
| 40    | API access is denied                                                                               |
| 42    | The number of characters for a Low Cost SMS is 160 characters                                      |
| 43    | Message is required                                                                                |
| 44    | Sender is invalid                                                                                  |
| 45    | Date is required                                                                                   |
| 46    | Time is required                                                                                   |
| 47    | Minute value is invalid                                                                            |
| 48    | Minutes must be between 5 and 55 in 5-minute intervals                                             |
| 49    | Date is invalid                                                                                    |
| 50    | The maximum allowed number of recipients is 500                                                    |
| 51    | The low-cost range is not eligible                                                                 |
| 52    | The number of concatenated SMS cannot exceed 10                                                    |
| 55    | No number to send to                                                                               |
| 90    | Malformed JSON: syntax error                                                                       |
| 96    | IP address is not authorized                                                                       |
| 500   | Error adding the SMS to the sending queue                                                          |
| 992   | Sender not authorized                                                                              |

### SMS Cancellation

| Codes | Message                                         |
| ----- | ----------------------------------------------- |
| 2     | The field phoneNumber is required               |
| 3     | The field MessageId is required                 |
| 4     | This message was not found                      |
| 5     | The list of numbers is empty                    |
| 6     | The format is incorrect                         |
| 9     | Does not appear to be a mobile number           |
| 50    | The maximum allowed number of recipients is 500 |
| 96    | IP address is not authorized                    |

### Status Retrieval

| Codes | Message                                         |
| ----- | ----------------------------------------------- |
| 2     | The `phoneNumber` field is required             |
| 3     | The `MessageId` field is required               |
| 4     | This message cannot be found                    |
| 5     | The list of numbers is empty                    |
| 6     | The format is incorrect                         |
| 9     | Does not appear to be a mobile number           |
| 50    | The maximum allowed number of recipients is 500 |
| 96    | The IP address is not authorized                |

### Status List

| Codes             | Message                                                               |
| ----------------- | --------------------------------------------------------------------- |
| **delivered**     | The SMS was successfully delivered                                    |
| **not delivered** | The SMS was not delivered                                             |
| **waiting**       | The SMS was sent and is pending at the operator                       |
| **ko**            | The SMS was not sent due to an error, please contact customer support |

### Status Error Codes

| SMS Status                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><code>DELIVRD</code></p><ul><li>The message was successfully processed and delivered.</li></ul>                                                                                                           |
| <p><code>PENDING</code></p><ul><li>The message was processed and forwarded to the next instance. The delivery report has not yet been received and is still pending.</li></ul>                               |
| <p><code>UNDELIV</code></p><ul><li>The message was sent to the operator but could not be delivered because a delivery receipt with status "<code>UNDELIV</code>" was canceled by the operator.</li></ul>     |
| <p><code>ACCEPTD</code></p><ul><li>The SMS was accepted and will be sent.</li></ul>                                                                                                                          |
| <p><code>UNKNOWN</code></p><ul><li>An unknown error occurred.</li></ul>                                                                                                                                      |
| <p><code>ENROUTE</code></p><ul><li>The message is on its way.</li></ul>                                                                                                                                      |
| <p><code>EXPIRED</code></p><ul><li>The message was sent but expired due to exceeding its validity period (default is 48 hours), or the operator returned <code>EXPIRED</code> as the final status.</li></ul> |
| <p><code>REJECTD</code></p><ul><li>The message was sent but rejected by the operator, which returned <code>REJECTD</code> as the final status.</li></ul>                                                     |

### Number Verification <a href="#hlr_code" id="hlr_code"></a>

| Codes | Message                                         |
| ----- | ----------------------------------------------- |
| 2     | The phoneNumber field is required               |
| 11    | Insufficient credit                             |
| 13    | No default price found for this destination     |
| 14    | The number is in the STOP SMS list              |
| 19    | Numbers must be separated by a comma            |
| 50    | The maximum number of allowed recipients is 500 |
| 55    | No number to send                               |
| 96    | The IP is not authorized                        |

### Location <a href="#location_code" id="location_code"></a>

| Codes | Message                                                             |
| ----- | ------------------------------------------------------------------- |
| 3     | The parameters field is required                                    |
| 4     | The op parameter is required                                        |
| 5     | The urlNotification parameter is not a valid URL                    |
| 6     | This operation is not allowed                                       |
| 7     | The sexe parameter is required                                      |
| 8     | The sexe parameter must be only m, h or f                           |
| 9     | The minAge parameter is required                                    |
| 11    | Insufficient credit                                                 |
| 12    | The minAge parameter must be greater than 17                        |
| 13    | The maxAge parameter is required                                    |
| 14    | The maxAge parameter must be less than 99                           |
| 15    | The interest parameter must be greater than 0                       |
| 16    | The interest parameter cannot be empty                              |
| 17    | The subInterest parameter must not be empty                         |
| 18    | The subInterest parameter must be greater than 0                    |
| 19    | The interest or subInterest parameters are required                 |
| 22    | The category parameter must not be empty                            |
| 23    | The category parameter must be greater than 0                       |
| 24    | The Type parameter is required                                      |
| 25    | The Localite parameter is required                                  |
| 26    | The Volume parameter is required                                    |
| 27    | The desired volume cannot be greater than the available volume      |
| 28    | The DesiredVolume parameter cannot be greater than the total volume |
| 31    | The token parameter is required                                     |
| 32    | The location request was not found                                  |
| 33    | The location file was not found                                     |
| 34    | The location file has already been used                             |
| 35    | The location file is currently being downloaded                     |
| 36    | The location of the file failed                                     |
| 61    | The request seems invalid and returned no result                    |
| 96    | The IP is not authorized                                            |

### Subaccount <a href="#subaccount_code" id="subaccount_code"></a>

| Codes | Message                                      |
| ----- | -------------------------------------------- |
| 2     | You are not authorized to create subaccounts |
| 3     | The Credit field is required                 |
| 4     | The tokenSubaccount field is required        |
| 5     | The credit must be greater than 0            |
| 6     | The subaccount was not found                 |
| 7     | Insufficient credit for the subaccount       |
| 11    | Insufficient credit                          |
| 96    | The IP is not authorized                     |

### HLR

Status codes: PENDING (statusGrpId: 1)

**The message has been processed and sent to the mobile operator.**

| statusId | Status                                                                                                                                                                                                 |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 3        | <p><code>PENDING\_WAITING\_DELIVERY</code></p><ul><li>The message has been processed and sent. The delivery report has not yet been received and is expected, so the status remains pending.</li></ul> |
| 7        | <p><code>PENDING\_ENROUTE</code></p><ul><li>The message has been processed and sent to the mobile operator.</li></ul>                                                                                  |
| 26       | <p><code>PENDING\_ACCEPTED</code></p><ul><li>The message has been accepted and processed, and is ready to be sent to the operator.</li></ul>                                                           |

#### UNDELIVERABLE (statusGrpId: 2)

**The message was not delivered.**

| statusId | Status                                                                                                                                                                                                        |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 4        | <p><code>UNDELIVERABLE\_REJECTED\_OPERATOR</code></p><ul><li>A message was sent to the operator, and a delivery report with status “REJECTED” was returned.</li></ul>                                         |
| 9        | <p><code>UNDELIVERABLE\_NOT\_DELIVERED</code></p><ul><li>The message was sent to the operator but could not be delivered. A delivery report with status “UNDELIVERED” was returned by the operator.</li></ul> |

#### DELIVERED (statusGrpId: 3)

**The message has been processed and successfully delivered.**

| statusId | Status                                                                                                                             |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| 2        | <p><code>DELIVERED\_TO\_OPERATOR</code></p><ul><li>The message was sent and successfully delivered to the operator.</li></ul>      |
| 5        | <p><code>DELIVERED\_TO\_HANDSET</code></p><ul><li>The message was processed and successfully delivered to the recipient.</li></ul> |

#### EXPIRED (statusGrpId: 4)

The message was sent but expired either because it was pending beyond its validity period (our platform is configured by default for 48 hours), or because the delivery report from the operator returned “`EXPIRED`” as the final status.

| statusId | Status                                                                                                                                                                                                                        |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 15       | <p><code>EXPIRED\_EXPIRED</code></p><ul><li>The message was received and sent to the operator. However, it remained pending until it expired or until the operator returned the EXPIRED status.</li></ul>                     |
| 29       | <p><code>EXPIRED\_DLR\_UNKNOWN</code></p><ul><li>The message was received and sent to the operator for delivery. However, the operator's delivery report was not properly formatted or was not recognized as valid.</li></ul> |

#### REJECTED (statusGrpId: 5)

**The message was received but was rejected by the operator.**

| statusId | Status                                                                                                                                                                                                                                                                   |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 6        | <p><code>REJECTED\_NETWORK</code></p><ul><li>The message was received, but the network is outside our coverage.</li></ul>                                                                                                                                                |
| 8        | <p><code>REJECTED\_PREFIX\_MISSING</code></p><ul><li>The message was received but was rejected because the number is unrecognized due to a missing or incorrect prefix/number length. These details vary by network and are updated regularly.</li></ul>                 |
| 10       | <p><code>REJECTED\_DND</code></p><ul><li>The message was received and rejected because the user is subscribed to DND (Do Not Disturb) services, which block service traffic to their number.</li></ul>                                                                   |
| 11       | <p><code>REJECTED\_SOURCE</code></p><ul><li>Your account is set to only accept registered sender IDs, but the sender ID in the request is not registered on your account.</li></ul>                                                                                      |
| 21       | <p><code>REJECTED\_SYSTEM\_ERROR</code></p><ul><li>The request was rejected due to a system error. Please retry submission or contact our technical support team for more details.</li></ul>                                                                             |
| 52       | <p><code>REJECTED\_DESTINATION</code></p><ul><li>The request was received, but the destination is invalid – the number prefix is incorrect as it does not match any valid mobile operator prefix. The number length is also considered to verify its validity.</li></ul> |

### Error Codes (HLR)

**OK (errorGrpId: 0)**

The request was successfully processed.

| errorId | Permanent | Error                                                                                                                                                                      |
| ------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0       | false     | <p><code>NO\_ERROR</code></p><ul><li>No error description provided. Usually returned for successful delivery or when no error code was returned by the operator.</li></ul> |

#### HANDSET\_ERRORS (errorGrpId: 1)

The request could not be completed due to issues related to the mobile handset.

| errorId  | Permanent | Error                                                                                                                                                                                                           |
| -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1        | true      | <p><code>EC\_UNKNOWN\_SUBSCRIBER</code></p><ul><li>The number does not exist or hasn't been assigned to an active subscriber in the operator's database.</li></ul>                                              |
| 5        | false     | <p><code>EC\_UNIDENTIFIED\_SUBSCRIBER</code></p><ul><li>Unidentified subscriber</li></ul>                                                                                                                       |
| 6        | false     | <p><code>EC\_ABSENT\_SUBSCRIBER\_SM</code></p><ul><li>The subscriber is detected as unavailable, often because the device is off or in a low-signal area. Applies to MAP protocol version 3.</li></ul>          |
| 7        | false     | <p><code>EC\_UNKNOWN\_EQUIPMENT</code></p><ul><li>The handset was not recognized by the EIR (Equipment Identity Register) during MAP-level equipment verification on the operator’s infrastructure.</li></ul>   |
| 8        | false     | <p><code>EC\_ROAMING\_NOT\_ALLOWED</code></p><ul><li>The subscriber is roaming and roaming service is not guaranteed due to lack of agreements between operators.</li></ul>                                     |
| 9        | true      | <p><code>EC\_ILLEGAL\_SUBSCRIBER</code></p><ul><li>Illegal subscriber</li></ul>                                                                                                                                 |
| 11       | true      | <p><code>EC\_TELESERVICE\_NOT\_PROVISIONED</code></p><ul><li>The subscriber’s mobile service was suspended by the operator.</li></ul>                                                                           |
| 12       | true      | <p><code>EC\_ILLEGAL\_EQUIPMENT</code></p><ul><li>Illegal equipment</li></ul>                                                                                                                                   |
| 13       | false     | <p><code>EC\_CALL\_BARRED</code></p><ul><li>The message was rejected due to SMS service being barred, either by the operator or subscriber.</li></ul>                                                           |
| 27       | false     | <p><code>EC\_ABSENT\_SUBSCRIBER</code></p><ul><li>The subscriber is offline, usually because the device is off.</li></ul>                                                                                       |
| 31       | false     | <p><code>EC\_SUBSCRIBER\_BUSY\_FOR\_MT\_SMS</code></p><ul><li>Subscriber busy for MT SMS</li></ul>                                                                                                              |
| 32       | false     | <p><code>EC\_SM\_DELIVERY\_FAILURE</code></p><ul><li>Delivery failure</li></ul>                                                                                                                                 |
| 33       | false     | <p><code>EC\_MESSAGE\_WAITING\_LIST\_FULL</code></p><ul><li>Message waiting list full</li></ul>                                                                                                                 |
| 34       | false     | <p><code>EC\_SYSTEM\_FAILURE</code></p><ul><li>System failure</li></ul>                                                                                                                                         |
| 35       | false     | <p><code>EC\_DATA\_MISSING</code></p><ul><li>Missing data</li></ul>                                                                                                                                             |
| 36       | false     | <p><code>EC\_UNEXPECTED\_DATA\_VALUE</code></p><ul><li>Unexpected data value</li></ul>                                                                                                                          |
| 255      | false     | <p><code>EC\_UNKNOWN\_ERROR</code></p><ul><li>Unknown error</li></ul>                                                                                                                                           |
| 256-1031 | false     | <p><code>\[Multiple Errors]</code></p><ul><li>Various network-level or equipment-related issues (e.g., memory exceeded, congestion, misformatted data, unreachable subscribers, protocol mismatches).</li></ul> |

#### USER\_ERRORS (errorGrpId: 2)

A user-related error occurred.

| errorId   | Permanent | Error                                                                                                                                                                                                      |
| --------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2049      | true      | <p><code>EC\_IMSI\_BLACKLISTED</code></p><ul><li>IMSI blacklisted</li></ul>                                                                                                                                |
| 2052      | true      | <p><code>EC\_BLACKLISTED\_DESTINATIONADDRESS</code></p><ul><li>Destination number blacklisted (either by operator or on your account via SMSPartner portal)</li></ul>                                      |
| 2053      | true      | <p><code>EC\_BLACKLISTED\_SENDERADDRESS</code></p><ul><li>Sender number blacklisted (either by operator or on your account via SMSPartner portal)</li></ul>                                                |
| 2053      | true      | <p><code>EC\_SOURCE\_ADDRESS\_BLACKLISTED</code></p><ul><li>Source address is blacklisted in your SMSPartner account</li></ul>                                                                             |
| 4096–4104 | true      | <p><code>\[Various User Errors]</code></p><ul><li>Issues like invalid PDU format, message canceled, expired validity, SMPP connectivity missing, or flooding detected due to message repetition.</li></ul> |

#### OPERATOR\_ERRORS (errorGrpId: 3)

The request could not be completed due to operator-side issues.

| errorId | Permanent | Error                                                                                                                      |
| ------- | --------- | -------------------------------------------------------------------------------------------------------------------------- |
| 10      | true      | <p><code>EC\_BEARER\_SERVICE\_NOT\_PROVISIONED</code></p><ul><li>Bearer service not provisioned</li></ul>                  |
| 20      | false     | <p><code>EC\_SS\_INCOMPATIBILITY</code></p><ul><li>SS incompatibility</li></ul>                                            |
| 51      | true      | <p><code>EC\_RESOURCE\_LIMITATION</code></p><ul><li>Operation failed due to SS7 network congestion</li></ul>               |
| 71      | false     | <p><code>EC\_UNKNOWN\_ALPHABET</code></p><ul><li>Unknown alphabet</li></ul>                                                |
| 501     | false     | <p><code>EC\_INVALID\_RESPONSE\_RECEIVED</code></p><ul><li>Invalid response received</li></ul>                             |
| 2048    | false     | <p><code>EC\_TIME\_OUT</code></p><ul><li>Timeout occurred</li></ul>                                                        |
| 2050    | true      | <p><code>EC\_DEST\_ADDRESS\_BLACKLISTED</code></p><ul><li>Number is blacklisted by the operator (e.g., DND list)</li></ul> |

### Voice Message Sending / VMS <a href="#mail" id="mail"></a>

| Codes                      | Message                              |
| -------------------------- | ------------------------------------ |
| PHONE\_NUMBER\_REQUIRED    | The phone number is required         |
| PHONE\_NUMBER\_SIZE\_ERROR | The number of recipients exceeds 500 |
| TOKEN\_AUDIO\_REQUIRED     | The audio token is required          |
| NOTIFY\_URL\_INVALID       | The notification URL is invalid      |
| SENDER\_NOT\_AUTHORIZED    | The sender is not authorized         |
| SENDER\_INVALID            | The sender is invalid                |
| AUDIO\_FILE\_NOT\_FOUND    | The audio file could not be found    |
| DESTINATION\_INVALID       | The phone number is not allowed      |
| NOT\_CREDIT                | Insufficient credit                  |

### Email Sending <a href="#mail" id="mail"></a>

| Codes | Message                                                          |
| ----- | ---------------------------------------------------------------- |
| 1     | API key is required                                              |
| 2     | Email content is required                                        |
| 3     | API key is required                                              |
| 4     | Sender email is required                                         |
| 5     | Sender name cannot be empty                                      |
| 8     | Attachment URL is required                                       |
| 9     | Attachment extension is not allowed                              |
| 10    | Invalid API key                                                  |
| 11    | Insufficient credit                                              |
| 14    | Email is on the unsubscribe list                                 |
| 15    | Email is already in the sending list                             |
| 16    | Attachment name cannot be empty                                  |
| 17    | Maximum number of recipients exceeded                            |
| 18    | Recipient's email is required                                    |
| 19    | Recipient's email appears invalid                                |
| 20    | Account is deactivated                                           |
| 21    | Recipient's name cannot be empty                                 |
| 22    | Recipient list is required                                       |
| 23    | Reply-to email is required                                       |
| 24    | Reply-to email appears invalid                                   |
| 25    | Reply-to name cannot be empty                                    |
| 30    | Account is blocked                                               |
| 40    | API access is denied                                             |
| 45    | Date is required                                                 |
| 46    | Time is required                                                 |
| 47    | Minutes value is invalid                                         |
| 48    | Minutes must be between 5 and 55 in a 5-minute interval          |
| 49    | Date is invalid                                                  |
| 50    | Maximum number of allowed emails is 500                          |
| 55    | No default price found                                           |
| 90    | Malformed JSON: syntax error                                     |
| 96    | IP is not authorized                                             |
| 429   | Too many requests in one minute (limit: 2000 requests/minute/IP) |
| 500   | Issue occurred while adding the email to the sending queue       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.docpartner.dev/en/api/error-codes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
