- Interpret success and error responses from the Send API
- Implement robust error-handling logic in production
- Monitor message status in the Courier dashboard
- Receive real-time delivery updates through webhooks
Response Handling
Success Response
Successful sends return a request ID for tracking:Error Responses
If a request fails, the Courier API returns an error response with an HTTP status code, amessage describing the issue, and a type classifying the error category:
HTTP Status Code Reference
Common Validation Errors
These are the most frequent400 errors on the Send endpoint and how to fix them:
Rate Limits
Courier rate-limits certain management endpoints to protect platform stability. Rate-limited responses includeX-RateLimit-Limit and X-RateLimit-Remaining headers so you can pace requests proactively.
The Send endpoint (
POST /send) is not rate-limited by request count. For volume-based message throttling (per-user, per-topic, per-tenant), see Send Limits.
When you receive a 429, wait before retrying. A simple strategy:
- Read
X-RateLimit-Remainingon every response to detect approaching limits - On
429, wait 60 seconds (the rate limit window) before retrying - For bursts, implement exponential backoff starting at 1 second
Monitoring & Debugging
Message Logs
Message Logs in the Courier dashboard provide real-time visibility into every message your system sends. Each log entry shows the message’s delivery path, status, and any associated errors. This helps you confirm successful sends and troubleshoot failed or delayed deliveries. Common message statuses include:SENT: The message was successfully handed off to the provider.DELIVERED: The provider confirmed successful delivery to the recipient.FAILED: Delivery was not completed. Review error details to identify the cause.THROTTLED: The message was rate limited or blocked by configured guardrails.
Message Status Details: For a full list of message statuses and their definitions, see the Message Logs documentation.
Delivery Status Updates via Webhooks
Use webhooks to receive real-time updates when a message’s delivery status changes. Courier sends amessage:updated event to your configured webhook endpoint each time a message is sent, delivered, failed, or retried.
Webhook events let your application track delivery progress without polling the API. You can use them to update user interfaces, trigger automations, or store delivery data in your own systems.
Webhook Setup: To receive these notifications, you need to configure outbound webhooks in your Courier workspace. Go to Settings → Outbound Webhooks and add your webhook endpoint URL.Implementation: Your webhook endpoint should return a 200 response quickly and handle the event data asynchronously. For complete webhook setup instructions, including signature verification and event handling, see Outbound Webhooks.
Best Practices
Error Handling
Implement proper error handling for production use:What’s Next
Message Logs
Track delivery status and debug failed messages
Outbound Webhooks
Receive real-time delivery status updates