Skip to content

API errors

Errors use RFC 9457 Problem Details (application/problem+json). Branch on type, status and structured extensions; detail is for people, not parsing.

{
"type": "https://docs.air-iq.net/reference/errors/#validation-error",
"title": "Request validation failed",
"status": 422,
"detail": "One or more request values are invalid.",
"instance": "/api/v1/devices",
"errors": [
{
"in": "body",
"name": "name",
"code": "required",
"detail": "name is required"
}
]
}
Field Meaning
type Stable identifier; links to its problem type below.
title Short title, the same for every occurrence of that type.
status HTTP status, repeated in the body for stored responses and tooling.
detail Safe, human-readable guidance for this occurrence.
instance Request path for this occurrence, without query string or credentials.
errors Optional list of invalid inputs.

Each errors item has an in location (body, query or path), an input name, a stable code and a human-readable detail. One response can list several fields.

Input problems map to these statuses:

Problem Status
Malformed JSON 400
Oversized content 413
Unsupported media type 415
Well-formed input that violates the endpoint contract 422

Generated from the Go registry that produces runtime responses.

Malformed request

Type
https://docs.air-iq.net/reference/errors/#malformed-request
Default status
400

The request could not be decoded.

Unauthorized

Type
https://docs.air-iq.net/reference/errors/#unauthorized
Default status
401

Valid credentials are required.

Mobile app required

Type
https://docs.air-iq.net/reference/errors/#mobile-app-required
Default status
403

This action is only available in the Open AIQ mobile app.

Resource not found

Type
https://docs.air-iq.net/reference/errors/#not-found
Default status
404

The requested resource was not found.

Method not allowed

Type
https://docs.air-iq.net/reference/errors/#method-not-allowed
Default status
405

The request method is not supported for this resource.

No readings available

Type
https://docs.air-iq.net/reference/errors/#no-readings
Default status
404

The device has not reported any readings.

Conflict

Type
https://docs.air-iq.net/reference/errors/#conflict
Default status
409

The request conflicts with the current state of the resource.

Request content too large

Type
https://docs.air-iq.net/reference/errors/#content-too-large
Default status
413

The request body exceeds the accepted size.

Unsupported media type

Type
https://docs.air-iq.net/reference/errors/#unsupported-media-type
Default status
415

The request uses an unsupported media type.

Too many requests

Type
https://docs.air-iq.net/reference/errors/#too-many-requests
Default status
429

The client sent too many requests; retry later.

Request validation failed

Type
https://docs.air-iq.net/reference/errors/#validation-error
Default status
422

One or more request values are invalid.

Internal server error

Type
https://docs.air-iq.net/reference/errors/#internal-error
Default status
500

The server could not complete the request.