Always check the HTTP status code first, then parse the
detail field for specific error information.HTTP Status Codes
Error Response Format
All errors return adetail field:
Simple error:
detail field contains either a simple string or an array of validation failures with loc (field path), msg (human-readable), and type (error category).
Authentication Errors
Missing API Key
Status:401 Unauthorized
X-API-Key: cs_live_your_key in every request.
Invalid or Revoked Key
Status:401 Unauthorized
Insufficient Permissions
Status:403 Forbidden
Validation Errors
Field Required
Status:422 Unprocessable Entity (via FastAPI) or 400 Bad Request
Value Constraint Violated
- Campaign name: 8-255 characters
- Daily limit per inbox: 1-100
- Variant distribution: must sum to 100%
Invalid Format
Campaign Errors
Campaign Not Found
Status:404 Not Found
- Campaign ID is a valid UUID
- Campaign belongs to your team
- Campaign hasn’t been deleted
Campaign Not Modifiable
Status:400 Bad Request
POST /api/public/v1/campaigns/{id}/pause, then make updates.
Missing Launch Requirements
When you setlaunch: true, the API validates and may return:
Variant Distribution Mismatch
distribution_percent values must sum to exactly 100.
Sender Account Errors
Inbox Already Exists
Status:409 Conflict
Connection Failed
Status:400 Bad Request
- Verify SMTP/IMAP hostnames and ports match your provider’s config
- Check credentials — use app-specific passwords, not main passwords
- See Provider Configuration for recommended settings
Inbox In Use
Status:400 Bad Request
Direct Email Errors
Returned byPOST /api/public/v1/contacts/{contact_id}/send-email, the only public endpoint that spends credits. See Direct Email.
Insufficient Credits
Status:402 Payment Required
required and available counts let you decide whether to top up or skip.
Fix: Add credits in the dashboard, then retry. A direct email costs 1 credit per send.
402 is new to the public API surface and currently only reachable from this endpoint. Every other public route is free of credit cost.
Suppressed Contact
Status:409 Conflict
reason is one of:
The suppression check runs before the credit is deducted, so a refused send costs nothing.
Fix: This is a compliance control, not a transient failure — do not retry. Remove the address from the blocklist in the dashboard only if you are sure you may contact them.
Sending Inbox Unavailable
Status:404 Not Found when the inbox does not exist in your team, 400 Bad Request when it exists but cannot send (not ACTIVE, or has no sender address):
GET /api/public/v1/sender-accounts?status=ACTIVE and pass one of the returned inbox_id values.
Rate Limit Error
Status:429 Too Many Requests
Best Practices
- Check status codes — Differentiate 4xx (client errors, fix the request) from 5xx (server errors, retry with backoff).
- Implement retry logic — Retry on 429 and 5xx with exponential backoff. Don’t retry 4xx errors (except 409/422 with fixes).
- Log errors — Include timestamps, request IDs, and context in your logs.
- Display user-friendly messages — Convert technical errors into actionable guidance.
- Use separate keys per integration — Makes debugging scope issues easier.
Next Steps
Authentication
API keys and security.
Rate Limits
Learn about rate limiting and retry strategies.

