Errors

The API uses standard HTTP status codes and RFC 7807 Problem Details for error responses.

Error Format #

All error responses follow the RFC 7807 Problem Details format with Content-Type: application/problem+json:

json
{
  "status": 400,
  "title": "Bad Request",
  "detail": "The FirstName field is required."
}

Status Codes #

The API uses the following HTTP status codes:

Status Description
200 OKRequest succeeded
201 CreatedResource created successfully
204 No ContentRequest succeeded, no content returned (e.g. delete)
400 Bad RequestInvalid request — missing or invalid parameters
401 UnauthorizedAuthentication failed — missing or invalid API key
403 ForbiddenForbidden — the API key does not have permission for this action
404 Not FoundResource not found
409 ConflictConflict — the request conflicts with existing data
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorInternal server error

Error Examples #

Validation Error (400)

json
{
  "status": 400,
  "title": "Bad Request",
  "detail": "The FirstName field is required."
}

Not Found (404)

json
{
  "status": 404,
  "title": "Not Found",
  "detail": "Firefighter with ID '3fa85f64-5717-4562-b3fc-2c963f66afa6' was not found."
}

Conflict (409)

json
{
  "status": 409,
  "title": "Conflict",
  "detail": "A firefighter with this email already exists."
}