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

FR

Events

2 endpoints

post/v1/events

Push a custom event that triggers automations

Generic inbound webhook per account: an external source (Zapier, Make, n8n, a client backend, a third-party tool) pushes a named event with its data. Capturia resolves the contact (external_id → phone → email), enriches the contact non-destructively, fills in the mapped custom fields, records the event on the contact, then starts the automations whose "Custom event" trigger listens for this event name — with the payload: a top-level key made of unaccented letters, digits and _ is cited in messages through {{event.<key>}}, and any key can be read, with no field created beforehand, in the trigger filter and in a condition ("Event data").

Contact resolution

At least one identifier is required (external_id, email or phone). If no contact matches, a minimal contact is created — unless contact.create_if_missing is false, in which case the request returns 404 contact_not_found without recording anything. If the identifiers only match an archived contact, the event is recorded on it (for traceability) but the contact is not modified and no automation is enrolled (contact_archived: true).

Receiving an event does not establish any communication consent. A contact created through this path cannot receive SMS/email until consent is captured through another flow; a triggered automation that tries to send without consent is blocked by the execution engine's guards.

Optional HMAC signature

In addition to the API key, the request can carry a signature X-Capturia-Signature: t=<unix>,v1=<hex> — an HMAC-SHA256 of ${t}.${raw body} computed with the raw API key as the secret, with a 5-minute anti-replay window. As soon as the header is present, validation is strict (fail-closed): an invalid signature = 401 invalid_signature. Without the header, the API key alone authenticates the request.

Idempotency

The Idempotency-Key header is optional but recommended for retries: a second request with the same key and the same payload returns the original response without ingesting the event again (stored for 24h; a different payload = 409 idempotency_conflict). In addition, automation enrollment has its own 5-minute deduplication per contact and per automation.

Custom error codes

  • 429 — rate_limited_ip when the per-IP-address limit (120 requests per minute) is reached, with header X-RateLimit-Scope: ip. rate_limit_exceeded when the key's hourly quota, counted across all its requests, is used up.
Required scopes: events:ingest

Headers

NameTypeRequiredDescription
Idempotency-KeystringoptionalIdempotency key: 16 to 128 [A-Za-z0-9_-] characters (a UUID v4 or a ULID works). A key of any other shape is refused with 400 invalid_request (details.field: idempotency-key); an empty header counts as a request without a key. A second request with the same key and the same payload returns the original response, with the Idempotency-Replayed: true header, without repeating the operation; the same key with a different payload is refused with 409 idempotency_conflict. Stored for 24 h. Optional but recommended.

Request body

PropertyTypeRequiredDescription
eventstringrequiredEvent name, in the account's namespace. Compared to the name configured on the automations' "Custom event" trigger regardless of capital letters and of spaces at the start or end, non-breaking spaces included: Cart_Abandoned and cart_abandoned are the same event.
contactEventIngestContactrequiredIdentity of the contact the event targets. At least one identifier is required among external_id, email, phone. The server resolves the contact in the order external_id+external_source → phone → email; the identity fields you send enrich the contact non-destructively (a value that is already set is never overwritten). A name received with the text "[object Object]" (a mapping that points to an object instead of a field) is cleared of it: the readable part is saved; if nothing remains, the name is absent.
payloadobjectoptionalArbitrary event data. A top-level key made of unaccented letters, digits and _ is cited in automation messages through {{event.<key>}} (a nested object is serialized as JSON); a hyphen, a space or an accent makes it impossible to cite. Any top-level key is read as is, with no field created beforehand, in the "Custom event" trigger filter and in a condition ("Event data"): a text, a number or a boolean, never an object. The stored content is capped (number of keys, depth, total size).
custom_fieldsobjectoptionalCustom fields of the contact, keyed by the definition's name (same contract as /v1/leads/capture). A key with no matching definition is silently ignored. Additive merge: the new value wins on collision.
source_labelstringoptionalFree-form label identifying the source (shown on the contact).

Responses

StatusDescription
200

Event ingested (status: ingested). enrolled_executions tells you how many automations started; 0 means no active automation listens for this event name — the event is still recorded on the contact.

400

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

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_payload
{
  "error": {
    "type": "validation_error",
    "code": "invalid_payload",
    "message": "The request content is invalid.",
    "hint": "With `details`, each refused field is named with its reason. Without `details`, the body could not be parsed as JSON.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_payload",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
invalid_requestidempotency-key · 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": "idempotency-key",
      "reason": "invalid_format"
    }
  }
}
401

The API key or the signature is refused. missing_api_key (no Authorization: Bearer header), invalid_api_key (unknown, revoked or malformed key) and expired_api_key (expiration date passed) concern the key. invalid_signature: the X-Capturia-Signature header is present and refused, details[0].reason gives the cause: invalid_signature_format, replay_window_expired (signature dated more than 5 minutes ago) or signature_mismatch.

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"
  }
}
invalid_signature
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_signature",
    "message": "The request's HMAC signature is refused.",
    "hint": "`details` gives the reason. The `X-Capturia-Signature` header carries `t=<unix>,v1=<hex>`: the HMAC-SHA256 of `<t>.<raw body>` computed with your API key, less than 5 minutes old.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_signature",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": [
      {
        "field": "x-capturia-signature",
        "reason": "signature_mismatch"
      }
    ]
  }
}
403

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

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_available
{
  "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"
    }
  }
}
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 `events:ingest` 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": "events:ingest",
      "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.

contact_not_found
{
  "error": {
    "type": "not_found_error",
    "code": "contact_not_found",
    "message": "No contact matches the provided identifiers. Nothing was recorded.",
    "hint": "Check the identifiers sent, or remove `create_if_missing: false` so Capturia creates the contact.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#contact_not_found",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
  }
}
409

Idempotency key conflict. The same Idempotency-Key was used for another body (details.reason: payload_mismatch), or the first request under this key is still in progress (in_flight, retry after Retry-After).

idempotency_conflictpayload_mismatch
{
  "error": {
    "type": "idempotency_error",
    "code": "idempotency_conflict",
    "message": "Idempotency key conflict.",
    "hint": "Either the same Idempotency-Key was used with a different payload, or a request with this key is still in progress. Use a fresh Idempotency-Key per logical request.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#idempotency",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "payload_mismatch"
    }
  }
}
idempotency_conflictin_flight
{
  "error": {
    "type": "idempotency_error",
    "code": "idempotency_conflict",
    "message": "Idempotency key conflict.",
    "hint": "Either the same Idempotency-Key was used with a different payload, or a request with this key is still in progress. Use a fresh Idempotency-Key per logical request.",
    "doc_url": "https://capturia.io/en/developers/api/v1/conventions#idempotency",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "reason": "in_flight"
    }
  }
}
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

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

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": "contact",
        "reason": "identifier_required"
      }
    ]
  }
}
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. rate_limited_ip: more than 120 requests per minute from this IP address on this endpoint, whatever the key; the X-RateLimit-Scope header is then ip. 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
    }
  }
}
rate_limited_ip
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limited_ip",
    "message": "IP rate limit reached.",
    "hint": "`details` gives the limit and the window in seconds. Wait for the `Retry-After` header's delay before retrying.",
    "doc_url": "https://capturia.io/en/developers/api/v1/errors#rate_limited_ip",
    "request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
    "details": {
      "limit": 120,
      "window_seconds": 60
    }
  }
}
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/events' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "event": "abandon_panier",
  "contact": {
    "external_id": "user-4821",
    "external_source": "mon-backend",
    "email": "[email protected]",
    "first_name": "Alex"
  },
  "payload": {
    "montant": 249.99,
    "produit": "Forfait Pro",
    "url_panier": "https://boutique.example.com/panier/abc123"
  },
  "custom_fields": {
    "plan_vise": "pro"
  },
  "source_label": "Boutique en ligne"
}'
post/v1/event-registrations

Register a contact for an event

Registers an existing contact of the account for a published event (webinar, challenge, summit, online event). The person then receives the event's messages, just as if they had registered through its page.

One registration per person and per edition: a second call for the same contact and the same edition returns the same registration with 200 and created: false, without resending the confirmation. It updates the language, and re-registers a person who had said they would not attend, as long as a seat is left (event_full otherwise); a person who asked to stop receiving messages stays opted out. The call is therefore safe to retry, without an Idempotency-Key header.

Requires the plan's Event support module (403 feature_not_available otherwise) and the contacts:write scope.

Rejections

  • 404 resource_not_found with details.resource: contact (contact missing, merged or from another account), event or edition.
  • 422 business_rule_violation with details.rule: event_not_published (draft), event_closed (event archived, edition cancelled, or no upcoming edition), event_edition_ended (edition ended), event_full (every seat of the edition is taken).
  • 400 validation_error: a body field is refused; details names each field and its reason, including exactly_one_of_event_id_or_event_slug on event_id when event_id and event_slug are both present or both missing. A body that is not JSON returns 400 invalid_json, a body that is not an object 400 invalid_body.
Required scopes: contacts:write

Request body

PropertyTypeRequiredDescription
contact_idstringrequiredContact to register.
event_idstringoptionalIdentifier of the event.
event_slugstringoptionalAddress of the event, as it appears in its registration link.
edition_idstringoptionalTarget edition. If omitted: the open edition where the contact already holds a seat, otherwise the next one that still has a seat, as on the registration page.
languagestringoptionalLanguage of the messages. If omitted: the event's first language.

Allowed values: fr, en

Responses

StatusDescription
200

The contact was already registered for this edition; the same registration is returned.

201

Registration created.

400

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

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_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": "event_id",
        "reason": "exactly_one_of_event_id_or_event_slug"
      }
    ]
  }
}
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, event_agent when it does not include Event support.

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"
    }
  }
}
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 `contacts: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": "contacts:write",
      "current_scopes": [
        "leads:capture"
      ],
      "suggested_preset": "read_write"
    }
  }
}
feature_not_availableevent_agent
{
  "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": "event_agent"
    }
  }
}
404

Resource not found. details.resource names what is missing: contact (contact missing, merged or from another account), event or edition.

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",
    "details": {
      "resource": "contact"
    }
  }
}
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

Request refused. details.rule names the rule: event_not_published (draft event), event_closed (event archived, edition cancelled, or no upcoming edition), event_edition_ended (edition ended), event_full (every seat of the edition is taken).

business_rule_violation
{
  "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": {
      "rule": "event_not_published"
    }
  }
}
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/event-registrations' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "contact_id": "9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
  "event_slug": "defi-5-jours",
  "language": "fr"
}'