Documentation Index
Fetch the complete documentation index at: https://buttercms.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Status code summary
| Code | Status | Description |
|---|---|---|
200 | OK | Request succeeded |
202 | Accepted | Request accepted for processing (write operations) |
204 | No Content | Request succeeded, no content returned (deletions) |
400 | Bad Request | Invalid request parameters or data |
401 | Unauthorized | Missing or invalid authentication |
403 | Forbidden | Insufficient permissions or invalid collection filter/order |
404 | Not Found | Requested resource does not exist |
405 | Method Not Allowed | HTTP method not supported for endpoint |
429 | Too Many Requests | Monthly API call limit exceeded (Free/Trial) |
500 | Internal Server Error | Server error (contact support) |
Success responses
200 OK
Standard success response for read operations. The response body contains the requested data.202 Accepted
Returned for write operations (POST, PUT, PATCH). The request has been accepted for asynchronous processing, with background tasks handling media uploads, validation, and webhook notifications.204 No Content
Returned for successful DELETE operations. No response body is included.Error responses
All error responses follow a consistent format:400 Bad Request
Indicates invalid request parameters or validation errors. Field-Specific Validation Errors:| Error | Description | Solution |
|---|---|---|
| Invalid locale | Locale not configured on account | Check configured locales in Settings |
| Invalid levels parameter | levels must be 1-5 | Use integer between 1 and 5 |
| Missing required field | Required field not provided | Include all required fields |
| Invalid field format | Field value doesn’t match expected type | Check field type requirements |
401 Unauthorized
Authentication credentials are missing or invalid. Missing token:| Cause | Solution |
|---|---|
Missing auth_token parameter | Add ?auth_token=YOUR_TOKEN to URL |
| Missing Authorization header | Add Authorization: Token YOUR_TOKEN header |
| Invalid API token | Check token in ButterCMS Settings |
| Token inactive or expired | Contact support or generate a new token |
| Using Read token for Write operations | Request a Write API token |
403 Forbidden
The authentication is valid, but the request is not permitted. This includes permission errors and invalid query parameters when filtering or ordering collections.- Using an invalid field name to filter or order collection results
- Attempting to access content from a different organization
- Feature not enabled for your account
404 Not Found
The requested resource doesn’t exist.| Cause | Example | Solution |
|---|---|---|
| Invalid page slug | /pages/blog/nonexistent-post/ | Check slug spelling |
| Invalid page type | /pages/invalid-type/page-slug/ | Verify page type exists |
| Invalid collection key | /content/invalid-collection/ | Check collection key |
| Invalid item ID | /content/artists/99999/ | Verify item ID exists |
| Invalid pagination | ?page=999 (when only 10 pages exist) | Check total page count |
405 Method Not Allowed
The HTTP method is not supported for the endpoint.429 Too Many Requests
Your account has been temporarily blocked after exceeding its monthly API call limit (Free/Trial accounts).500 Internal Server Error
An error occurred on ButterCMS servers.- Wait a moment and retry the request
- Check ButterCMS Status for any incidents
- Contact support@buttercms.com if the issue persists
Error handling best practices
JavaScript / Node.js
Python
Exponential backoff pattern
For transient errors (5xx), implement exponential backoff:Webhook error responses
When your webhook endpoint receives notifications from ButterCMS:| Your Response | ButterCMS Behavior |
|---|---|
2xx | Webhook delivered successfully |
Non-2xx or timeout | Webhook delivery logged as failed |
Webhook endpoints must respond within 5 seconds. Requests that exceed this timeout will be treated as failures.
Next steps
Rate Limits
Learn about API rate limits
Authentication
Fix authentication issues
Request Format
Review request requirements