Error Codes
Reference for all error responses returned by the YourSend API.
Error Format
All error responses follow a consistent JSON format:
{
"error": {
"code": "invalid_to",
"message": "Human-readable error message",
"status": 400
}
}HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request — missing or invalid parameters |
| 402 | Payment Required — insufficient wallet balance |
| 403 | Forbidden — invalid/missing API key, suspended, or quota exceeded |
| 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 | 403 | The API key is invalid, revoked, or missing |
| invalid_request | 400 | A required field is missing or malformed |
| invalid_to | 400 | Recipient email or phone format is invalid |
| invalid_channel | 400 | Channel must be email, sms, voice, whatsapp, or auto |
| channel_mismatch | 400 | Recipient address does not match the channel |
| insufficient_balance | 402 | Wallet balance is too low to send |
| quota_exceeded | 403 | You have exceeded your plan quota |
| rate_limited | 429 | Too many requests — slow down |
| not_found | 404 | The requested resource does not exist |
| expired | 400 | The verification code has expired |
| already_verified | 400 | The code has already been used |
| max_attempts | 400 | Too many verification attempts |
| internal_error | 500 | Something went wrong — try again later |