Error Codes
Reference for all error responses returned by the YourSend API.
Error Format
All error responses follow a consistent JSON format:
{
"error": "Human-readable error message",
"code": "ERROR_CODE"
}HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 403 | Forbidden — insufficient permissions or plan |
| 404 | Not Found — resource does not exist |
| 429 | Rate Limited — too many requests |
| 500 | Internal Server Error — try again later |
Error Codes
| Code | HTTP | Description |
|---|---|---|
| INVALID_API_KEY | 401 | The API key is invalid or revoked |
| MISSING_API_KEY | 401 | No Authorization header provided |
| MISSING_FIELD | 400 | A required field is missing |
| INVALID_CHANNEL | 400 | Channel must be email, sms, voice, whatsapp, or auto |
| INVALID_RECIPIENT | 400 | Recipient email or phone format is invalid |
| DOMAIN_NOT_VERIFIED | 403 | Sending domain is not verified |
| PLAN_LIMIT_EXCEEDED | 403 | You have exceeded your plan limits |
| AI_NOT_ENABLED | 403 | AI features require Growth plan or higher |
| RATE_LIMITED | 429 | Too many requests, slow down |
| DELIVERY_FAILED | 500 | Message could not be delivered |
| TEMPLATE_NOT_FOUND | 404 | The specified template_id does not exist |
| CONTACT_SUPPRESSED | 400 | The recipient has been suppressed |