Errors
The Bytes Developer API returns JSON error responses.
Most validation errors use:
422 Unprocessable Content
and include an errors object keyed by field name.
Authentication error
Missing, invalid, revoked or inactive-workspace API keys return:
401 Unauthorized
{
"message": "Unauthenticated."
}
Not found
When a resource does not exist in the workspace attached to your API key:
404 Not Found
{
"message": "Tag not found."
}
or:
{
"message": "Link not found."
}
Validation error
Example:
422 Unprocessable Content
{
"message": "The destination_url field is required.",
"errors": {
"destination_url": [
"The destination_url field is required."
]
}
}
Slug unavailable
422 Unprocessable Content
{
"message": "That slug is not available.",
"errors": {
"slug": [
"That slug is already in use."
]
}
}
The slug may already exist or may be reserved.
Active-link limit reached
422 Unprocessable Content
{
"message": "Active link limit reached for this workspace plan.",
"code": "active_link_limit_reached",
"limit": 100,
"active_links": 100,
"plan": "free"
}
Deactivate unused links or upgrade the workspace plan before creating more active links.
Destination blocked
Bytes checks destinations before creating links.
If a destination is blocked, the response explains that the destination is not allowed. Do not try to bypass destination safety checks.
Rate limit
The Developer API is throttled. If your integration sends too many requests in a short time, it may receive a rate-limit response.
Use sensible retry behaviour and avoid tight retry loops.
Reporting errors safely
When asking for help, include:
- request method and endpoint
- response status
- response body
- approximate time
- workspace name if relevant
Do not include:
- real API keys
- auth cookies
- passwords
- private customer data
- full destination URLs if they contain sensitive information