HTTP status codes overview
Authentication errors (401)
Missing API token
- Query parameter:
?auth_token=YOUR_TOKEN - Authorization header:
Authorization: Token YOUR_TOKEN
Invalid API token
- Go to Settings > General in your dashboard
- Copy the correct Read API Token from the API Tokens section
- Ensure there are no extra spaces or characters
Write token required (403 Forbidden)
Bad request errors (400)
Invalid query parameters
levels: Integer 1-5page: Positive integerpage_size: Integer 1-100
Invalid locale parameter
The exact message depends on the endpoint:- Go to Settings > Localization in your dashboard
- Verify the locale slug matches your API request
- Locale slugs are typically lowercase (e.g.,
en,es,fr-ca)
Invalid search parameters
- Don’t exceed 100 characters
- Are URL-encoded if containing special characters
Invalid field filter (404 on Pages, 403 on Collections)
Filtering by a field uses dot notation, e.g.fields.hero.title=value. On Pages, an invalid filter returns a 404:
fields. doesn’t exist in your content schema.
Solution: Check that:
- Field names match your content schema exactly
- You’re using dot notation:
fields.hero.title
Forbidden errors (403)
Multiple pages found
page_type=*, multiple pages share the same slug.
Solution:
- Specify a page type instead of
*:/pages/landing_page/homepage - Or ensure slugs are unique across all page types
Access Denied
- Verify you’re using the correct account’s API token
- Check if your plan includes access to this feature
- Contact support if you believe this is an error
Not found errors (404)
Page not found
- Verify the page is published (not draft)
- Check the slug matches exactly (case-sensitive)
- Confirm the page type key is correct
- Verify the page exists in the dashboard
{"detail": "Not found."} instead, so you can’t tell those two apart by message text. Check the URL path you called.
Collection not found
- Check the collection key in Content Types > Collections
- Collection keys may contain letters, numbers, hyphens, and underscores
- Keys are case-sensitive
Blog Post not found
- Verify the post is published
- Check the slug is correct
- Ensure you’re not including
/blog/prefix in the slug
Method not allowed errors (405)
Unsupported HTTP method
DELETE to a Pages or Collections endpoint, neither of which supports deleting via the API.
Solution: Check the API reference for the methods an endpoint supports.
Rate limit errors (429)
Too Many Requests
- Check usage: Review API calls on the Home dashboard Usage card or the Analytics page
- Reduce calls: Cache responses and avoid polling
- Wait for reset: The block lifts at the start of the next UTC calendar month
- Upgrade if needed: Paid plans are not blocked for monthly API overages
When you exceed your plan’s monthly API call limit, the
Retry-After value indicates the seconds remaining until the end of the current billing month when your limit resets.Validation Errors
Content validation failed
For blog posts, each invalid field is reported under its own key (there’s nofields wrapper):
title field, so their validation errors are reported under the page type’s own field keys instead.
Cause: Content being created/updated fails validation rules.
Solution: Check each field mentioned in the error:
- Ensure required fields are provided
- Verify slugs are unique
- Check field values meet validation rules (min/max length, format)
Schema Mismatch
On Pages, submitting a field key that isn’t defined in the page type’s schema is dropped without an error. On Collections, the same situation returns a 400:- Check the page type or collection schema in Content Types
- Ensure field names match exactly
- For Collections, remove any fields not defined in the schema
Server errors (500)
Internal Server Error
An unhandled 500 on the API returns an HTML error page, not a JSON body, so don’t try to parseresponse.json() for a 500.
Cause: An unexpected error on ButterCMS servers.
Solution:
- Wait a few minutes and retry
- Check the API Status Page
- If persistent, contact support with:
- The exact endpoint you’re calling
- Request parameters
- Timestamp of the error
Error handling best practices
JavaScript/TypeScript
Python
Quick reference table
Related resources
Common Errors
Step-by-step solutions for common issues
Debugging Guide
How to debug your integration
API Reference
Full API documentation
Contact Support
Get help from our team