Capturia measures its ads and site traffic with the Meta pixel and Google Analytics. You can decline at any time. Learn more

FR

Bookings

4 endpoints

get/v1/bookings

List bookings in the schedule

Returns the paginated list (cursor v2) of bookings in the schedule of the key's account: all its calendars, all its hosts. Bookings archived from the dashboard are excluded. Stable sort start_datetime DESC, id DESC — the furthest-out bookings first, then the history. With updated_after or updated_before, the list is sorted by ascending updated_at, broken by id.

Filters

  • ?from (ISO 8601) — start_datetime >= from
  • ?to (ISO 8601) — start_datetime <= to
  • ?status — confirmed, cancelled, completed, or no_show
  • ?event_type_id — a calendar of the account
  • ?contact_id — a contact of the account

An unreadable filter is rejected with 400 validation_error, with details as a list [{ field, reason }] (reasons invalid_datetime, invalid_value, invalid_format); an invalid cursor or limit, 400 invalid_request. An event_type_id or a contact_id from another account returns an empty list.

Required scopes: bookings:read

Query parameters

NameTypeRequiredDescription
cursorstring | nulloptionalOpaque pagination cursor: pass the pagination.next_cursor value from the previous page.
limitintegeroptionalMaximum number of results per page (default 20, max 100). Above that → 400 invalid_request.
updated_afterstringoptionalFilter: only resources modified after this date (inclusive). With an updated_* bound, the list is sorted by ascending updated_at (oldest change first), tie-broken by id. Restart from the updated_at of the last resource you read, minus 2 minutes: a long write can carry a date slightly earlier than the end of your read. Drop duplicates by id. A cursor from another sort is refused (cursor_field_mismatch). A list that leaves archived resources out (bookings, quotes) returns them in this read with their archived_at: that is how a withdrawal is read.
updated_beforestringoptionalFilter: only resources modified before this date (inclusive). Sorts the list like updated_after.
fromstringoptionalOnly bookings where start_datetime >= from.
tostringoptionalOnly bookings where start_datetime <= to.
statusstringoptionalExact match on status.
event_type_idstringoptionalOnly bookings on this calendar.
contact_idstringoptionalOnly bookings for this contact.

Responses

StatusDescription
200

Paginated list of bookings.

400

Invalid request. code tells apart the refusals the operation returns under this status, and each example shows one.

invalid_requestlimit · exceeds_max
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "limit",
      "reason": "exceeds_max",
      "max": 100
    }
  }
}
invalid_requestupdated_after · invalid_value
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "updated_after",
      "reason": "invalid_value"
    }
  }
}
invalid_requestcursor · cursor_field_mismatch
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "cursor",
      "reason": "cursor_field_mismatch"
    }
  }
}
validation_error
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "from",
        "reason": "invalid_datetime"
      }
    ]
  }
}
invalid_requestcursor · cursor_invalid_format
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "cursor",
      "reason": "cursor_invalid_format"
    }
  }
}
401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one. feature_not_available comes from the account, not the key: details.feature is public_api when the plan does not include the API, bookings_module when it does not include bookings.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_availablepublic_api
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
feature_not_availablebookings_module
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "bookings_module"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `bookings:read` scope. Create a new key with the \"Read only\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "bookings:read",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_only"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
503

A service the request depends on didn't respond (reading the key, the account or the plan). The same request will go through once it's back: retry after the Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

Example request

curl -X GET 'https://api.capturia.io/v1/bookings' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json'
post/v1/bookings

Book an appointment

Books an appointment in the account's schedule, on one of its calendars, through the same service as the booking page and the dashboard. The calendar's rules apply: its active hosts, their hours and their Google Calendar, the booking window, the slot cadence, the daily maximum, group sessions, required questions, the access rule, and a single upcoming booking per contact on this calendar. The requested time is honored or rejected with its reason — never replaced with another. The duration is the calendar's; the host receives their notification and the event is added to their calendar as for any booking.

Each successful call creates a booking: don't replay a call that succeeded.

Rejections

The details.reason field states why, in a stable way:

Statuscodedetails.reason
400validation_errorslot_in_past, outside_window, off_cadence (details.field = "start_datetime"), contact_without_email (details.field = "contact_id"), or the code of the failing question (details.field = "form_responses.<id>", or "form_responses" when the rejection concerns the responses as a whole; details.questions: the calendar's questions, when it has any)
404resource_not_found— (details.field: event_type_id, contact_id, or host_id)
409duplicate_resourcealready_booked (details.existing_booking_id, when it is known)
422business_rule_violationcalendar_without_hosts, host_not_on_calendar, host_unavailable (details.causes), slot_unavailable, address_out_of_area, contact_archived, lead_not_qualified
503service_unavailable— (retry after Retry-After)

A field format error (400 validation_error) carries details as a list [{ field, reason }].

Required scopes: bookings:write

Request body

PropertyTypeRequiredDescription
event_type_idstringrequiredActive calendar of the account. An unknown or inactive calendar, or one from another account, is rejected with 404 resource_not_found (details.field = "event_type_id").
start_datetimestringrequiredStart of the booking, ISO 8601. The offset is optional: without an offset, the time is read as UTC. Prefer an explicit offset (2026-11-10T10:00:00-05:00).
contact_idstringoptionalExisting contact of the account. An unknown contact or one from another account is rejected with 404 resource_not_found (details.field = "contact_id"); an archived contact, 422 (contact_archived); a contact without an email and without guest_email, 400 (contact_without_email).
guest_namestringoptionalGuest's full name. Required without contact_id. The text "[object Object]" (a mapping that points to an object instead of a field) is removed from it; a name with nothing left is rejected as missing (400, reason required).
guest_emailstringoptionalGuest's email. Required without contact_id.
guest_phonestring | nulloptionalGuest's phone number (E.164 recommended). Taken into account with guest_name + guest_email.
host_idstringoptionalTeam member who should hold the booking. The requested host is honored or rejected with its reason, never replaced: unknown to the account, 404 resource_not_found (details.field = "host_id"); not a host of this calendar, 422 host_not_on_calendar; busy or outside their hours, 422 host_unavailable. Without host_id: the contact's sales rep if they can take the slot, otherwise the calendar's rotation.
timezonestring | nulloptionalGuest's IANA time zone, naming a place (e.g. America/Toronto). If absent: the contact's, otherwise the calendar's. An unknown time zone, a name without a place (EST, UTC, Etc/GMT+5, US/Eastern) or a bare offset (-04:00) is rejected: 400 validation_error, reason invalid_timezone.
languagestring | nulloptionalLanguage of the guest: the language of the booking notices (confirmation, reminders). Set on the contact when it doesn't have one yet. When absent: the contact's language, otherwise the calendar's. Any other value is rejected: 400 validation_error, reason invalid_choice.

Allowed values: fr, en

notesstring | nulloptionalNotes for the prospect: they read them again in the Google event they're invited to, when the seller's Google Calendar is connected. A note for the seller goes in internal_note.
internal_notestring | nulloptionalThe team's internal note, for the booking's seller: the prospect never sees it. The seller reads it in their prep brief, before the meeting.
form_responsesobjectoptionalAnswers to the calendar's form: one entry per question, under the question's identifier, in the form { "value": ... }. value is text, a number for a numeric question, one of the options for a choice question, or a list of options for a multiple-choice question. A calendar with a required question rejects a booking without its answer: 400 validation_error, details.field = "form_responses.<id>". When the calendar has questions, a form rejection includes details.questions, those questions (id, label, type, required, options).

Responses

StatusDescription
201

Booking created.

400

Invalid request. code tells apart the refusals the operation returns under this status, and each example shows one. validation_error takes two forms: a malformed field carries details as a list [{ field, reason }]; a slot, a form, or a contact the calendar refuses carries details as an object, with the reason in details.reason and the field at fault in details.field.

invalid_request
{
  "error": {
    "type": "validation_error",
    "code": "invalid_request",
    "message": "Request format is invalid.",
    "hint": "Check that headers, body and JSON encoding match the API contract documented in the API Reference.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_request",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_encoding
{
  "error": {
    "type": "validation_error",
    "code": "invalid_encoding",
    "message": "Request encoding must be UTF-8.",
    "hint": "Use Content-Type: application/json; charset=utf-8.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#encoding",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_json
{
  "error": {
    "type": "validation_error",
    "code": "invalid_json",
    "message": "The request body is not valid JSON.",
    "hint": "Check the JSON syntax (quotes, commas, braces) and its UTF-8 encoding.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_json",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_body
{
  "error": {
    "type": "validation_error",
    "code": "invalid_body",
    "message": "The request body must be a JSON object.",
    "hint": "Send an object (`{ ... }`): this endpoint accepts no array, string or number.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_body",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
validation_errorevent_type_id · required
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "event_type_id",
        "reason": "required"
      }
    ]
  }
}
validation_errorstart_datetime · slot_in_past
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "slot_in_past",
      "field": "start_datetime"
    }
  }
}
validation_errorform_responses.budget · MISSING_REQUIRED
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "MISSING_REQUIRED",
      "field": "form_responses.budget",
      "questions": [
        {
          "id": "budget",
          "label": "Quel est ton budget ?",
          "type": "select",
          "required": true,
          "options": [
            "Moins de 10 000 $",
            "10 000 $ à 25 000 $",
            "Plus de 25 000 $"
          ]
        }
      ]
    }
  }
}
validation_errorcontact_id · contact_without_email
{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "Request validation failed.",
    "hint": "`details` names each field to fix and the reason it was refused.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#validation_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "contact_without_email",
      "field": "contact_id"
    }
  }
}
401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one. feature_not_available comes from the account, not the key: details.feature is public_api when the plan does not include the API, bookings_module when it does not include bookings.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_availablepublic_api
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
feature_not_availablebookings_module
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "bookings_module"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `bookings:write` scope. Create a new key with the \"Read + write\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "bookings:write",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_write"
    }
  }
}
404

Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one.

resource_not_foundevent_type_id
{
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "The requested resource was not found.",
    "hint": "Verify the resource ID. It may have been deleted or never existed.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#resource_not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "event_type_id"
    }
  }
}
resource_not_foundcontact_id
{
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "The requested resource was not found.",
    "hint": "Verify the resource ID. It may have been deleted or never existed.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#resource_not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "contact_id"
    }
  }
}
resource_not_foundhost_id
{
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "The requested resource was not found.",
    "hint": "Verify the resource ID. It may have been deleted or never existed.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#resource_not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "field": "host_id"
    }
  }
}
409

The lead already has an upcoming booking on this calendar (duplicate_resource, reason already_booked); details.existing_booking_id names it when it is known.

duplicate_resourcealready_booked · 1
{
  "error": {
    "type": "conflict_error",
    "code": "duplicate_resource",
    "message": "A resource with this unique value already exists.",
    "hint": "See details for the conflicting field.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#duplicate_resource",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "already_booked",
      "existing_booking_id": "7d8e9f0a-1b2c-4d4e-8f6a-7b8c9d0e1f2a"
    }
  }
}
duplicate_resourcealready_booked · 2
{
  "error": {
    "type": "conflict_error",
    "code": "duplicate_resource",
    "message": "A resource with this unique value already exists.",
    "hint": "See details for the conflicting field.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#duplicate_resource",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "already_booked"
    }
  }
}
413

The request body exceeds 1 MB (1,048,576 bytes). details.max_bytes gives the limit, and details.received_bytes the size announced by Content-Length when the request declares it.

payload_too_large
{
  "error": {
    "type": "validation_error",
    "code": "payload_too_large",
    "message": "Request body exceeds the 1 MB limit.",
    "hint": "Split your request into smaller batches.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#body-size",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "max_bytes": 1048576,
      "received_bytes": 1572864
    }
  }
}
415

The Content-Type header is missing, or isn't application/json.

invalid_content_type
{
  "error": {
    "type": "validation_error",
    "code": "invalid_content_type",
    "message": "Unsupported Content-Type.",
    "hint": "Send Content-Type: application/json on POST/PUT/PATCH requests.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#content-type",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
422

The requested time or host can't be honored: calendar without an active host (calendar_without_hosts), host who isn't a host of this calendar (host_not_on_calendar), host unavailable (host_unavailable, causes in details.causes: outside_window, holiday, outside_hours, other_booking, buffer, blocked_time, google_busy, daily_max), slot taken or full (slot_unavailable), home visit at an address no host covers (address_out_of_area), archived contact (contact_archived), lead excluded by the calendar's access rule, disqualified lead, or calendar closed to contacts carrying one of its tags (lead_not_qualified).

business_rule_violationhost_unavailable
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "host_unavailable",
      "causes": [
        "google_busy"
      ]
    }
  }
}
business_rule_violationslot_unavailable
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "slot_unavailable"
    }
  }
}
business_rule_violationhost_id · host_not_on_calendar
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "host_not_on_calendar",
      "field": "host_id"
    }
  }
}
business_rule_violationcontact_id · contact_archived
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "contact_archived",
      "field": "contact_id"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
503

A service the request depends on didn't respond (reading the key, the account or the plan). The same request will go through once it's back: retry after the Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

Example request

curl -X POST 'https://api.capturia.io/v1/bookings' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "event_type_id": "2b3c4d5e-6f7a-4b9c-8d1e-2f3a4b5c6d7e",
  "start_datetime": "2026-11-10T10:00:00-05:00",
  "contact_id": "0a1b2c3d-4e5f-4a7b-8c9d-0e1f2a3b4c5d",
  "notes": "Premier rendez-vous découverte",
  "internal_note": "Chien dans la cour, le conjoint décide."
}'
get/v1/bookings/{id}

Read a booking and its preparation brief

Returns one booking from the account's schedule, with its preparation brief (brief): what the seller receives before the meeting. This is the read that follows a booking_created, booking_rescheduled, booking_cancelled, booking_no_show or booking_brief_ready event, whose data.resource_id is the booking's identifier.

The brief is read the way the account's management reads it. brief.status says whether it is ready (ready), being prepared (pending) or absent (none); until it is ready, its fields are empty.

A booking of another account, or an archived one, is not found (404).

Required scopes: bookings:read

Path parameters

NameTypeRequiredDescription
idstringrequiredUUID of the resource.

Responses

StatusDescription
200

The booking and its preparation brief.

401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one. feature_not_available comes from the account, not the key: details.feature is public_api when the plan does not include the API, bookings_module when it does not include bookings.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_availablepublic_api
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
feature_not_availablebookings_module
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "bookings_module"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `bookings:read` scope. Create a new key with the \"Read only\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "bookings:read",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_only"
    }
  }
}
404

Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one.

resource_not_found
{
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "The requested resource was not found.",
    "hint": "Verify the resource ID. It may have been deleted or never existed.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#resource_not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
503

A service the request depends on didn't respond (reading the key, the account or the plan). The same request will go through once it's back: retry after the Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

Example request

curl -X GET 'https://api.capturia.io/v1/bookings/{id}' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json'
delete/v1/bookings/{id}

Cancel a booking

Soft cancel — the booking is not deleted: its status changes to cancelled and cancelled_at is timestamped, like a cancellation made in the dashboard. The event is removed from the host's calendar, the host is notified, and the cancellation is recorded as made by one of your team's integrations. The 200 response returns these 3 fields (not 204 No Content).

Only a confirmed booking can be cancelled. A booking that is already cancelled returns 422 business_rule_violation (reason already_cancelled); a booking that was held or marked as a no-show, 422 (reason booking_not_cancellable). A booking from another account is not found (404).

To change the time, cancel and book again, or reschedule from the dashboard — there is no PATCH.

Required scopes: bookings:write

Path parameters

NameTypeRequiredDescription
idstringrequiredUUID of the resource.

Responses

StatusDescription
200

Booking cancelled. Returns the cancellation status and timestamp.

401

The API key is missing, unknown or expired. code tells the three causes apart: missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown or revoked key, or invalid format) and expired_api_key (expiration date has passed).

missing_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key was provided.",
    "hint": "Add an Authorization header in the form: Bearer cap_live_<your_key>",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#missing_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is invalid or has been revoked.",
    "hint": "Verify the key in your dashboard or generate a new one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#invalid_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
expired_api_key
{
  "error": {
    "type": "authentication_error",
    "code": "expired_api_key",
    "message": "API key has expired.",
    "hint": "Roll the key from the dashboard to generate a new valid one.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#expired_api_key",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
403

Authorization refused. code tells apart the refusals the operation returns under this status, and each example shows one. feature_not_available comes from the account, not the key: details.feature is public_api when the plan does not include the API, bookings_module when it does not include bookings.

browser_not_allowed
{
  "error": {
    "type": "authorization_error",
    "code": "browser_not_allowed",
    "message": "API keys must be used from a server, never from a browser.",
    "hint": "The request carries an `Origin` header: call the API from your server, where the key stays secret.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#browser_not_allowed",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
account_suspended
{
  "error": {
    "type": "authorization_error",
    "code": "account_suspended",
    "message": "Access to this account is suspended by the Capturia team.",
    "hint": "The refusal comes from the account, not the key. While the suspension lasts, no request is accepted: contact the Capturia team.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#account_suspended",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
feature_not_availablepublic_api
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "public_api"
    }
  }
}
feature_not_availablebookings_module
{
  "error": {
    "type": "authorization_error",
    "code": "feature_not_available",
    "message": "This feature is not included in your plan.",
    "hint": "The rejection comes from the account's plan, not the key. Contact your Capturia advisor to talk it over.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "feature": "bookings_module"
    }
  }
}
insufficient_scope
{
  "error": {
    "type": "authorization_error",
    "code": "insufficient_scope",
    "message": "This API key does not contain the required scope for this endpoint.",
    "hint": "This key is missing the `bookings:write` scope. Create a new key with the \"Read + write\" preset or add the scope via the dashboard.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#scopes",
    "dashboard_url": "https://capturia.io/platform/dashboard/admin/integrations/api-keys/6f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f?tab=permissions",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "required_scope": "bookings:write",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_write"
    }
  }
}
404

Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one.

resource_not_found
{
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "The requested resource was not found.",
    "hint": "Verify the resource ID. It may have been deleted or never existed.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#resource_not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
422

The booking is already cancelled (already_cancelled), or it was held or marked as a no-show (booking_not_cancellable).

business_rule_violationalready_cancelled
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "already_cancelled"
    }
  }
}
business_rule_violationbooking_not_cancellable
{
  "error": {
    "type": "business_rule_error",
    "code": "business_rule_violation",
    "message": "A business rule prevents this operation.",
    "hint": "`details` names the rule that blocks the operation. The endpoint's reference lists each possible value and what it requires.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#business_rule_violation",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "booking_not_cancellable"
    }
  }
}
429

Rate limit reached. rate_limit_exceeded: the key's hourly quota is used up. too_many_attempts: too many invalid keys presented from this IP address (brute-force protection). In both cases, Retry-After gives the delay in seconds.

rate_limit_exceeded
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded.",
    "hint": "Retry after the number of seconds in retry_after_seconds, and consider implementing exponential backoff.",
    "doc_url": "https://capturia.io/en/developers/api/v1/rate-limits",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 100,
      "count": 100,
      "limit_type": "per_key",
      "retry_after_seconds": 42
    }
  }
}
too_many_attempts
{
  "error": {
    "type": "rate_limit_error",
    "code": "too_many_attempts",
    "message": "Too many invalid authentication attempts from this IP.",
    "hint": "Wait the period indicated by retry_after_seconds before trying again.",
    "doc_url": "https://capturia.io/en/developers/api/v1/authentication#brute-force",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit_type": "brute_force",
      "retry_after_seconds": 300
    }
  }
}
500

Unexpected server error. Always include the request_id when contacting support.

internal_error
{
  "error": {
    "type": "server_error",
    "code": "internal_error",
    "message": "Server error. The Capturia team has been notified.",
    "hint": "If this persists, contact support and include the request_id from this response.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#internal_error",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
501

Test keys (cap_test_) aren't served yet: only cap_live_ keys are accepted.

not_implemented
{
  "error": {
    "type": "server_error",
    "code": "not_implemented",
    "message": "This feature is not yet implemented.",
    "hint": "Check the API documentation for available features and the changelog for upcoming releases.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#not_implemented",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
503

A service the request depends on didn't respond (reading the key, the account or the plan). The same request will go through once it's back: retry after the Retry-After delay.

service_unavailable
{
  "error": {
    "type": "server_error",
    "code": "service_unavailable",
    "message": "Service temporarily unavailable.",
    "hint": "Retry after the period indicated by Retry-After.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#service_unavailable",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}

Example request

curl -X DELETE 'https://api.capturia.io/v1/bookings/{id}' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json'