Documentation Index
Fetch the complete documentation index at: https://docs.unosend.co/llms.txt
Use this file to discover all available pages before exploring further.
Error Response Format
When an error occurs, the API returns a JSON response with the following structure:error-response.json
| Field | Type | Description |
|---|---|---|
code | string | Machine-readable error identifier |
message | string | Human-readable error description |
status | number | HTTP status code |
details | object | Additional context (optional) |
HTTP Status Codes
2xx Success
Request was successful
4xx Client Error
Something was wrong with the request
5xx Server Error
Something went wrong on our end
Authentication Errors
| Code | Status | Description |
|---|---|---|
missing_api_key | 401 | No API key provided in request |
invalid_api_key | 401 | API key is invalid or revoked |
api_key_expired | 401 | API key has expired |
insufficient_permissions | 403 | API key lacks required permissions |
How to Fix
Terminal
Validation Errors
| Code | Status | Description |
|---|---|---|
validation_error | 400 | Request body failed validation |
missing_required_field | 400 | Required field is missing |
invalid_email_address | 400 | Email address format is invalid |
invalid_from_address | 400 | From address domain not verified |
invalid_template_variables | 400 | Template variables don’t match schema |
attachment_too_large | 400 | Attachment exceeds size limit (10MB) |
invalid_json | 400 | Request body is not valid JSON |
Example Validation Error
validation-error.json
Handling Validation Errors
handle-validation.ts
Resource Errors
| Code | Status | Description |
|---|---|---|
not_found | 404 | Resource doesn’t exist |
email_not_found | 404 | Email ID not found |
domain_not_found | 404 | Domain not found in workspace |
template_not_found | 404 | Template ID not found |
audience_not_found | 404 | Audience not found |
contact_not_found | 404 | Contact not found |
webhook_not_found | 404 | Webhook not found |
Example 404 Response
not-found.json
Rate Limit Errors
| Code | Status | Description |
|---|---|---|
rate_limit_exceeded | 429 | Too many requests per second |
daily_limit_exceeded | 429 | Daily email limit reached |
quota_exceeded | 429 | Monthly quota exceeded |
Rate Limit Response
rate-limit.json
See the Rate Limits documentation for handling strategies and retry logic examples.
Domain Errors
| Code | Status | Description |
|---|---|---|
domain_not_verified | 400 | Domain has not been verified yet |
domain_verification_failed | 400 | DNS records not found or incorrect |
domain_already_exists | 409 | Domain already registered in another workspace |
dkim_verification_failed | 400 | DKIM record not found or invalid |
spf_verification_failed | 400 | SPF record not found or invalid |
Server Errors
| Code | Status | Description |
|---|---|---|
internal_server_error | 500 | Unexpected server error |
service_unavailable | 503 | Service temporarily unavailable |
gateway_timeout | 504 | Request timed out |
email_delivery_failed | 500 | Failed to deliver email to mail server |
Complete Error Handling Example
Quick Reference
Retryable Errors
429Rate limit exceeded500Internal server error503Service unavailable504Gateway timeout
Non-Retryable Errors
400Validation error401Authentication error403Permission denied404Resource not found