Errors

Every Clement error response uses the same envelope. Each carries a machine-readable code and a doc_url pointing back here.

Envelope

{
  "error": {
    "type": "invalid_request_error",
    "code": "missing_parameter",
    "message": "Required field 'subject' is missing.",
    "param": "subject",
    "request_id": "req_01HZ8X3J9K7P2QV6R5N4M3T2L1",
    "doc_url": "https://clement.so/docs/errors/missing_parameter"
  }
}

type is one of a small enum that maps cleanly to HTTP status families. code is the precise, stable identifier — branch on this, not message. request_id matches the X-Request-Id header on every response (errored or not) and is the one thing to quote when opening a support ticket.

Codes

400 Invalid request

401 Authentication

  • unauthenticated — No valid bearer key or session cookie was found on the request.

403 Authorization

404 Not found

409 Conflict

422 Unprocessable

429 Rate limit

500 Server error