Skip to navigation

Errors & Status Codes

View as Markdown

The Hive API returns these status codes:

CodeMeaning
200 OKRequest succeeded; the response body contains the requested data
201 CreatedResource created; the response body contains it
202 AcceptedRequest received and queued for processing
204 No ContentRequest succeeded (for example, a delete) with no response body
400 Bad RequestMalformed request (for example, invalid JSON)
401 UnauthorizedMissing or invalid authentication, including expired access tokens
403 ForbiddenValid authentication, but not authorized for this resource
404 Not FoundThe resource doesn’t exist for the authorized brand
409 ConflictThe request conflicts with the resource’s current state (for example, a duplicate name)
413 Payload Too LargeRequest body exceeds 1 MB
415 Unsupported Media TypeThe request body isn’t sent as application/json
422 Unprocessable EntityValid JSON, but fails validation
429 Too Many RequestsRate limit exceeded. See Rate Limits.
500 Internal Server ErrorUnexpected server error. Safe to retry with backoff for idempotent requests

Error response bodies

Error bodies use one of these shapes, depending on the endpoint and error:

ShapeReturned for
{"detail": "..."}Authentication and permission errors (401, 403), and some 404 and 409 responses
{"errors": ["..."]}Segment, campaign, and custom event property errors
Field-keyed object, for example {"limit": ["..."]}422 validation errors on single objects and query parameters
Resource → index → field object (see below)422 validation errors on batch writes

Check the HTTP status code first, then read the body for details.

Validation errors

Batch writes use all-or-nothing validation: if any item in a batch is invalid, the whole request is rejected with 422 and nothing is written. Errors are keyed by resource name, then item index, then field path. Fix the failing record and resubmit the full batch.

{
"orders": {
"0": {
"user": { "email": ["Enter a valid email address."] }
}
}
}

See How It Works for retry guidance.