Appearance
Errors
The Ybug API uses standard HTTP status codes and a structured JSON body so failures can be handled predictably.
Status codes
| Status | Meaning | Typical cause |
|---|---|---|
400 Bad Request | The request payload or query parameters are invalid. | Validation errors, missing required fields, malformed JSON. |
401 Unauthorized | The request lacks valid credentials. | Missing or expired bearer token. See Authentication. |
403 Forbidden | The token cannot access the resource. | Insufficient permissions or plan limitations. |
404 Not Found | The requested resource does not exist. | Incorrect IDs or deleted resources. |
409 Conflict | A resource with the same unique identifier already exists. | Duplicate creation. |
429 Too Many Requests | Rate limit exceeded. | More than 100 requests per minute. See Rate limiting. |
500 Internal Server Error | Unexpected server error. | Transient — retry with exponential backoff. |
Response body
All error responses share the same shape:
json
{
"errors": [
"Field name is required"
]
}The errors array contains one or more human-readable messages. Validation failures typically include one entry per failing field.