Error Catalog
Comprehensive catalog of all errors you may encounter when using the Sent API v3, including their causes and step-by-step remediation steps.
Authentication Errors
AUTH_001: User is not authenticated
Error Message: "User is not authenticated"
HTTP Status: 401 Unauthorized
Cause: The request is missing the required x-api-key header.
Remediation:
- Ensure you're including the
x-api-keyheader in all API requests - Verify the header name is exactly
x-api-key(case-sensitive) - Check that your API key is being loaded from environment variables correctly
Example Fix:
# ❌ Missing header
curl -X GET https://api.sent.dm/v3/me
# ✅ Correct
curl -X GET https://api.sent.dm/v3/me \
-H "x-api-key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"AUTH_002: Invalid or expired API key
Error Message: "Invalid or expired API key"
HTTP Status: 401 Unauthorized
Cause: The provided API key is invalid, expired, or has been revoked.
Remediation:
- Verify your API key is correct and complete
- Check that you're using the correct key type (live vs test)
- Log into your Sent Dashboard and verify the key is active
- Generate a new API key if the current one was revoked
AUTH_004: Insufficient permissions
Error Message: "Insufficient permissions for this operation"
HTTP Status: 403 Forbidden
Cause: Your user role doesn't have permission to perform this operation.
Remediation:
- Check your organization role (owner, admin, developer, billing)
- Contact your organization owner to request additional permissions
- Some operations require owner or admin privileges
Validation Errors
VALIDATION_001: Request validation failed
Error Message: "Request validation failed"
HTTP Status: 400 Bad Request
Cause: The request body or parameters failed validation. Check the details field for specific field-level errors.
Remediation:
- Review the
error.detailsobject for field-specific error messages - Ensure all required fields are provided
- Verify data types match the schema (e.g., strings vs numbers)
Example:
{
"error": {
"code": "VALIDATION_001",
"message": "Request validation failed",
"details": {
"phone_number": ["Phone number is required"],
"template_id": ["Invalid UUID format"]
}
}
}VALIDATION_002: Invalid phone number format
Error Message: "Invalid phone number format"
HTTP Status: 400 Bad Request
Cause: The phone number is not in a valid format.
Remediation:
- Use E.164 format:
+1234567890 - Include the country code (e.g.,
+1for US) - Remove any non-numeric characters except the leading
+
Valid Examples:
+1234567890(US)+447911123456(UK)+919876543210(India)
VALIDATION_003: Invalid GUID format
Error Message: "Invalid GUID format"
HTTP Status: 400 Bad Request
Cause: A UUID field contains an invalid format.
Remediation:
- Ensure UUIDs follow the format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Verify the UUID is complete (36 characters including hyphens)
- Check that you're not passing an empty string or null
Valid Example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
VALIDATION_004: Required field is missing
Error Message: "Required field is missing"
HTTP Status: 400 Bad Request
Cause: A required field is not present in the request body.
Remediation:
- Check the API documentation for required fields
- Ensure the field name is spelled correctly (snake_case)
- Verify the field is not null or undefined
VALIDATION_005: Field value out of valid range
Error Message: "Field value out of valid range"
HTTP Status: 400 Bad Request
Cause: A numeric field value is outside the allowed minimum/maximum range.
Remediation:
- Check the API documentation for valid ranges
- For
retry_count: must be between 1 and 5 - For
timeout_seconds: must be between 5 and 120 - Ensure integer values are not negative where prohibited
Example:
{
"error": {
"code": "VALIDATION_005",
"message": "Field value out of valid range",
"details": {
"retry_count": ["Value must be between 1 and 5"]
}
}
}VALIDATION_006: Invalid enum value
Error Message: "Invalid enum value"
HTTP Status: 400 Bad Request
Cause: A field value is not one of the allowed enum values.
Remediation:
- Check the API documentation for allowed values
- Verify the value matches exactly (case-sensitive)
- Common enums: channel (
sms,whatsapp), template category (MARKETING,UTILITY,AUTHENTICATION)
VALIDATION_007: Invalid Idempotency-Key format
Error Message: "Invalid Idempotency-Key format"
HTTP Status: 400 Bad Request
Cause: The idempotency key doesn't meet the format requirements.
Remediation:
- Use only alphanumeric characters, hyphens, and underscores
- Keep the key between 1-255 characters
- Avoid special characters like spaces,
@,#, etc.
Valid Examples:
req-abc-123send_msg_001webhook_retry_1
Resource Errors
RESOURCE_001: Contact not found
Error Message: "Contact not found"
HTTP Status: 404 Not Found
Cause: The specified contact ID doesn't exist or doesn't belong to your account.
Remediation:
- Verify the contact ID is correct
- List all contacts to find the correct ID:
GET /v3/contacts - Check that you're using the correct API key for the account that owns the contact
Debug Steps:
# List contacts to find valid IDs
curl -X GET https://api.sent.dm/v3/contacts \
-H "x-api-key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"RESOURCE_002: Template not found
Error Message: "Template not found"
HTTP Status: 404 Not Found
Cause: The specified template ID doesn't exist.
Remediation:
- Verify the template ID is correct
- List all templates:
GET /v3/templates - Ensure the template hasn't been deleted
RESOURCE_003: Message not found
Error Message: "Message not found"
HTTP Status: 404 Not Found
Cause: The specified message ID doesn't exist.
Remediation:
- Verify the message ID is correct
- Note that message IDs are only available after sending
- Messages may be purged after retention period
RESOURCE_004: Customer not found
Error Message: "Customer not found"
HTTP Status: 404 Not Found
Cause: The specified customer ID doesn't exist or is not accessible.
Remediation:
- Verify the customer ID is correct
- Check that your API key has access to this customer
- Contact support if the customer should exist
RESOURCE_005: Organization not found
Error Message: "Organization not found"
HTTP Status: 404 Not Found
Cause: The specified organization ID doesn't exist or you don't have access.
Remediation:
- Verify the organization ID is correct
- Ensure you're using an organization-level API key
- Check that your account is a member of the organization
RESOURCE_006: User not found
Error Message: "User not found"
HTTP Status: 404 Not Found
Cause: The specified user ID doesn't exist in your organization.
Remediation:
- Verify the user ID is correct
- List organization users to find valid IDs
- The user may have been removed from the organization
RESOURCE_007: Resource already exists
Error Message: "Resource already exists"
HTTP Status: 409 Conflict
Cause: Attempting to create a resource that already exists (e.g., duplicate contact).
Remediation:
- Check if the resource already exists using a list or get endpoint
- Update the existing resource instead of creating
- Use a unique identifier for your idempotency key
RESOURCE_008: Webhook not found
Error Message: "Webhook not found"
HTTP Status: 404 Not Found
Cause: The specified webhook ID doesn't exist.
Remediation:
- Verify the webhook ID is correct
- List all webhooks:
GET /v3/webhooks - Check if the webhook was deleted
Business Logic Errors
BUSINESS_001: Cannot modify inherited contact
Error Message: "Cannot modify inherited contact"
HTTP Status: 422 Unprocessable Entity
Cause: You're attempting to modify a contact that was inherited from a parent organization or shared profile.
Remediation:
- Create a new contact with the desired phone number
- Contacts inherited from parent organizations are read-only
- Use your own profile-scoped API key for contact modifications
BUSINESS_002: Rate limit exceeded
Error Message: "Rate limit exceeded"
HTTP Status: 429 Too Many Requests
Cause: You've exceeded the allowed number of requests per minute.
Remediation:
- Check the
Retry-Afterheader for wait time - Implement exponential backoff in your code
- Consider using webhooks instead of polling
- Contact support if you need higher limits
See: Rate Limits Documentation
BUSINESS_003: Insufficient account balance
Error Message: "Insufficient account balance"
HTTP Status: 422 Unprocessable Entity
Cause: Your account doesn't have enough credit to complete the operation.
Remediation:
- Add funds to your account in the Dashboard
- Check your current balance:
GET /v3/me - Review pricing for the operation you're attempting
BUSINESS_004: Contact has opted out
Error Message: "Contact has opted out of messaging"
HTTP Status: 422 Unprocessable Entity
Cause: The contact has opted out of receiving messages.
Remediation:
- Remove the contact from your messaging lists
- Do not attempt to message opted-out contacts
- Respect the contact's preferences per compliance requirements
BUSINESS_005: Template not approved
Error Message: "Template not approved for sending"
HTTP Status: 422 Unprocessable Entity
Cause: The WhatsApp template hasn't been approved yet.
Remediation:
- Check template status:
GET /v3/templates/{id} - Wait for WhatsApp/Meta approval (typically 24-48 hours)
- For urgent needs, use SMS channel instead
- Review template guidelines to ensure approval
BUSINESS_006: Message cannot be modified in current state
Error Message: "Message cannot be modified in current state"
HTTP Status: 422 Unprocessable Entity
Cause: The message has already been sent or is in a final state that prevents modification.
Remediation:
- Messages can only be modified while in
QUEUEDorACCEPTEDstatus - Once a message is
SENT,DELIVERED,READ, orFAILED, it cannot be modified - Send a new message if you need to make changes
BUSINESS_007: Channel not available
Error Message: "Channel not available for this contact"
HTTP Status: 422 Unprocessable Entity
Cause: The requested messaging channel (SMS/WhatsApp) isn't available for this phone number.
Remediation:
- Check available channels for the contact:
curl -X GET https://api.sent.dm/v3/contacts/{id} \ -H "x-api-key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" - Use an available channel from
available_channels - Don't specify a channel to let the API choose automatically
BUSINESS_008: Operation would exceed quota
Error Message: "Operation would exceed quota"
HTTP Status: 422 Unprocessable Entity
Cause: The operation would exceed your account's quota limits (messages, contacts, templates, etc.).
Remediation:
- Check your current usage in the Dashboard
- Upgrade your plan to increase quotas
- Delete unused resources to free up quota
- Contact support for temporary quota increases
Conflict Errors
CONFLICT_001: Concurrent idempotent request
Error Message: "Concurrent idempotent request in progress"
HTTP Status: 409 Conflict
Cause: Another request with the same idempotency key is currently being processed.
Remediation:
- Wait for the original request to complete
- Use a unique idempotency key for each distinct operation
- Don't reuse idempotency keys across different operations
Internal Errors
INTERNAL_001: Unexpected internal server error
Error Message: "Unexpected internal server error"
HTTP Status: 500 Internal Server Error
Cause: An unexpected error occurred on the server.
Remediation:
- Retry the request after a short delay
- If the error persists, contact support with:
- The
request_idfrom the response - Timestamp of the error
- The operation you were attempting
- The
INTERNAL_003: External service error
Error Message: "External service error (SMS/WhatsApp provider)"
HTTP Status: 502 Bad Gateway
Cause: The upstream messaging provider (Twilio, Meta) is experiencing issues.
Remediation:
- Wait a few minutes and retry
- Check API Status for known issues
- The message will be queued and retried automatically
INTERNAL_002: Database operation failed
Error Message: "Database operation failed"
HTTP Status: 500 Internal Server Error
Cause: An unexpected database error occurred while processing your request.
Remediation:
- Retry the request after a short delay
- If the error persists, contact support with the request ID
- This is typically a transient issue
INTERNAL_004: Timeout waiting for operation
Error Message: "Timeout waiting for operation"
HTTP Status: 504 Gateway Timeout
Cause: The operation timed out while waiting for an external service or internal processing.
Remediation:
- The operation may still be in progress - check the resource status
- Retry the request with the same idempotency key
- Contact support if timeouts persist
INTERNAL_005: Service temporarily unavailable
Error Message: "Service temporarily unavailable"
HTTP Status: 503 Service Unavailable
Cause: The API is temporarily unavailable due to maintenance or high load.
Remediation:
- Retry with exponential backoff
- Check API Status
- Wait for service restoration
Troubleshooting Guide
General Troubleshooting Steps
- Check the Error Code: Use the error code to find specific guidance above
- Review Request ID: Include
meta.request_idwhen contacting support - Verify API Version: Ensure you're using v3 endpoints (
/v3/) - Test in Sandbox Mode: Use
sandbox: trueto validate without side effects
Getting Help
If you can't resolve an error:
- Documentation: Check this catalog and the Error Handling guide
- Support Email: support@sent.dm
- Include in Support Request:
- Request ID (
meta.request_id) - Error code and message
- Timestamp of occurrence
- Endpoint and method
- Request payload (sanitized)
- Request ID (
Error Code Quick Reference
| Code | Category | HTTP Status | Quick Fix |
|---|---|---|---|
| AUTH_001 | Authentication | 401 | Add x-api-key header |
| AUTH_002 | Authentication | 401 | Verify/regenerate API key |
| AUTH_004 | Authorization | 403 | Check user permissions |
| VALIDATION_001 | Validation | 400 | Check error.details |
| VALIDATION_002 | Validation | 400 | Use E.164 phone format |
| VALIDATION_003 | Validation | 400 | Check UUID format |
| VALIDATION_005 | Validation | 400 | Check value is within range |
| VALIDATION_006 | Validation | 400 | Check enum values |
| RESOURCE_001 | Resource | 404 | Verify contact ID exists |
| RESOURCE_002 | Resource | 404 | Verify template ID exists |
| RESOURCE_004 | Resource | 404 | Verify customer ID exists |
| RESOURCE_005 | Resource | 404 | Verify organization ID |
| RESOURCE_006 | Resource | 404 | Verify user ID exists |
| BUSINESS_001 | Business Logic | 422 | Create new contact instead |
| BUSINESS_002 | Rate Limit | 429 | Implement backoff |
| BUSINESS_003 | Billing | 422 | Add account funds |
| BUSINESS_006 | Business Logic | 422 | Message already sent |
| BUSINESS_008 | Business Logic | 422 | Check quota limits |
| INTERNAL_001 | Server | 500 | Retry or contact support |
| INTERNAL_002 | Server | 500 | Retry or contact support |
| INTERNAL_004 | Server | 504 | Retry or contact support |
Need More Help? Contact support@sent.dm with your request ID for personalized assistance.