# Understanding SMS Response Codes

### Responses

We use conventional HTTP response codes to indicate the success or failure of an API request. In general:

**2xx** indicate success.\
**4xx** indicate an error that failed given the information provided (e.g., a required parameter was omitted).\
**5xx** errors indicate an error with ours servers (these are rare).

### Sample Success Response

Upon a successful send request, our server will respond with a 200 (success) HTTP response code, and you will be provided with a message record which includes our ID.

```json
{
   "id":"ef5796ce-e326-4a09-9033-6b457039b1ba",
   "originator":"Test",
   "recipient":"44700011122",
   "body":"This is a test message",
   "routeId":"mglobal",
   "reference":null,
   "campaignId":null
}
```

### Sample Error Response

```json
{
   "code":401,
   "message":"Unauthorized"
}
```

```json
{
   "code":403,
   "message":"Recipient is opted out: 44XXXXXXXX"
}
```

### Response Codes

{% hint style="info" %}
To see a full list of our **Response codes**, please [click here](https://wiki.mobivatebulksms.com/overview/introduction/understanding-response-codes)
{% endhint %}
