Errors

All API errors follow a consistent shape. Use the error.code field to handle specific failure modes — don't rely on the HTTP status code alone.

Error object

json
{
  "error": {
    "code": "resource_not_found",
    "message": "No device with id dev_01hxyz was found in this tenant.",
    "request_id": "req_01hxyz",
    "docs_url": "https://hldgroup.org/docs/reference/errors#resource_not_found"
  }
}

HTTP status codes

NameTypeRequiredDescription
200 OKsuccessNoRequest succeeded.
201 CreatedsuccessNoResource was created.
204 No ContentsuccessNoRequest succeeded with no response body (e.g. DELETE).
400 Bad RequesterrorNoRequest body or parameters are malformed or missing required fields.
401 UnauthorizederrorNoMissing, invalid, or expired API key.
403 ForbiddenerrorNoValid key but insufficient scope for this operation.
404 Not FounderrorNoResource does not exist or is not accessible to this key.
409 ConflicterrorNoResource already exists or a conflicting state prevents the operation.
422 UnprocessableerrorNoRequest is well-formed but fails validation (e.g. invalid email, unknown region).
429 Too Many RequestserrorNoRate limit exceeded. Check Retry-After header.
500 Internal Server ErrorerrorNoUnexpected server error. Retry with backoff. If persistent, contact support with the request_id.

Error codes

NameTypeRequiredDescription
unauthorizedstringNoInvalid or missing API key.
forbiddenstringNoInsufficient scope.
resource_not_foundstringNoThe requested resource does not exist.
validation_errorstringNoOne or more fields failed validation. Check error.fields for detail.
resource_conflictstringNoA resource with this identity already exists.
tenant_suspendedstringNoThe target tenant is suspended. No operations are permitted.
rate_limitedstringNoToo many requests. Back off and retry.
integration_unavailablestringNoThe target integration is offline or misconfigured.
action_not_reversiblestringNoThe requested action cannot be reversed.
internal_errorstringNoUnexpected error. Include request_id when contacting support.

Validation errors

For validation errors, the response includes a fields array:

json
{
  "error": {
    "code": "validation_error",
    "message": "Request validation failed.",
    "request_id": "req_01hxyz",
    "fields": [
      { "field": "contact_email", "message": "Must be a valid email address." },
      { "field": "region", "message": "Must be one of: ap-southeast-2, us-east-1, eu-west-1." }
    ]
  }
}