Error codes
All Sluice REST API errors return a JSON response with a consistent shape:
Error reference
| Status | Name | When |
|---|---|---|
401 | unauthorized | Missing or invalid API key |
413 | payload_too_large | Request body exceeds 10 MB |
422 | validation_error | Missing required fields or invalid format |
429 | rate_limit_exceeded | Organization rate limit hit |
401 — unauthorized
Missing or invalid API key. Check that your Authorization header includes a valid Bearer token.
Fix: Include a valid API key in the Authorization header:
See API keys for key management.
413 — payload_too_large
The total request body exceeds 10 MB. This typically happens with large attachments.
Fix: Reduce attachment size or host large files externally and include a download link in the email body instead.
422 — validation_error
The request is missing required fields or contains invalid data.
Required fields: from, to, subject, and at least one of text or html.
Common validation errors:
| Message | Cause |
|---|---|
Missing required field: to | No to field in request body |
Missing required field: from | No from field in request body |
Missing required field: subject | No subject field in request body |
Must include text or html body | Neither text nor html provided |
Invalid email address | from or to is not a valid email address |
429 — rate_limit_exceeded
Your organization has hit its rate limit. Rate limits apply across all API keys in the organization.
Fix: Wait for the cooldown period indicated in the response, then retry. If you consistently hit rate limits, contact support to discuss increasing your quota.