Skip to the page

API reference

Every operation an API key can call in version 1, generated from the OpenAPI specification. The base URL is https://a7reports.com/api/clist/v1; send the key as Authorization: Bearer clk_….

Error format

Every response that is not a success has this body. Match on error.code and, for the reason, on error.details[0].code; the message is for people and is translated. Quote request_id (also in the x-request-id header) when you ask for help.

  • error object required
    • code string, one of: "bad_request", "validation_failed", "unauthorized", "invalid_credentials", "forbidden", "not_found", "conflict", "item_removed", "expired", "email_not_verified", "payload_too_large", "unsupported_media_type", "rate_limited", "limit_exceeded", "internal_error", "not_implemented", "service_unavailable", "ceiling_reached", "channel_paused", "gone", "token_expired", "session_revoked", "session_expired", "precondition_failed", "app_update_required" required
    • message string required Human-readable, localized. Do not match on it; use code.
    • request_id string required Also returned in the x-request-id response header.
    • details array of object
      • path string required
      • code string (up to 200 characters) required A validation keyword; csrf_invalid on forbidden when a cookie-authenticated state-changing request fails the Origin, Sec-Fetch-Site or x-csrf-token check; last_owner / personal_workspace_owner on conflict for a workspace membership change that would remove a workspace's only owner or change a personal workspace's owner; oauth_email_registered on conflict when an OAuth sign-in's unverified email already belongs to another account; or, on limit_exceeded, the entitlement key and the limit or rejected value, in two entries: {path: '/entitlement', code: <entitlement key>} and {path: '/limit', code: <the limit or the rejected value, as a string>} (the rejected value is truncated to 100 characters before it ever reaches this field).
      • site_id string (uuid) On site_delete_unconfirmed, the stored site’s id (the same as in path). Other details may carry fields of their own; a client ignores those it does not know.
      • valid_from string (date-time) or null On event_id_expired, when the server first received the move key; null for a key it never received (refused for its moved_at). UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.
      • valid_until string (date-time) On event_id_expired, when the move key’s validity period ended (90 days after valid_from, or after moved_at for a key never received). UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.
      • confirming_until string (date-time) On intent_closed while an entry file’s confirmation runs, the instant (UTC) its mark lapses at the latest; the answer then carries Retry-After too. UTC instant (ISO 8601, ending in Z). Nothing in the API is a local time.
      • alternative one of: "kiosk_pin", "none" On a phone punch refused for its location (location_consent_required, location_required, location_declined), where the worker can mark instead: kiosk_pin (a clock or kiosk at the workplace, with their PIN) or none (they ask their employer; a supervisor can record the time). The error’s message says it in the person’s language.
  • project object Only on a project write’s 412 precondition_failed / stale_project: the project as the caller reads it now (what its GET answers, ProjectDetail), with its ETag in the response header, so a client merges without reading it again.
  • entry object Only on an entry move’s 409 conflict / event_id_expired: the entry as the caller reads it now, with its trail (what the move answers, EntryWithTrail). No move was made.
  • key object Only on event_id_expired: the move key as a move’s answer names it (EntryMoveKey), with status: "expired".
{
  "error": {
    "code": "validation_failed",
    "message": "Some fields are not valid.",
    "request_id": "6f1c0e1e-8d3b-4c55-9f3a-0b1d2c3e4f5a",
    "details": [
      {
        "path": "/name",
        "code": "maxLength"
      }
    ]
  }
}

The specification

The whole specification, with every operation of the platform, is served as JSON at GET /api/clist/v1/openapi.json. This reference shows only the operations an API key can call.