Returns the paginated list of the account's contacts (cursor v2).
Stable sort created_at DESC, id DESC; with updated_after or
updated_before, the list is sorted by ascending updated_at, broken
by id. Supports a word search on the
contact's fields that ignores accents and case, filtering by tag,
filtering by System, and optional inclusion of the custom field
definitions in meta.
A contact absorbed by a merge no longer appears in the list: its
history lives on the surviving contact, which is the only one listed.
The ?search parameter (200 characters at most) is split into words
(separated by spaces). Each word must appear, ignoring accents and
case, in at least one of the contact's fields: first name, last name,
emails, phones, company, address, or the name and details of another
person on the record. The words are combined with AND, in any order:
?search=Jean Bouchard finds the contact whose first name is "Jean"
and whose last name is "Bouchard", and ?search=cote finds "Côté".
Every character is searched as typed: %, _, *, commas, and
parentheses don't alter the filter, and a number typed with dashes,
dots, or parentheses also finds the number stored as digits only. A search longer than 200
characters is rejected (400 invalid_request,
details.field = "search", details.reason = "too_long").
Each contact returns its System (system: id and name): the one
where it is being followed right now, otherwise the account's main
System. system is null until Systems are opened to the API for
the account, and for a contact that isn't being followed in any active
System when the account has no active main System.
The ?system_id parameter returns only the contacts of an active
System of the account, with the id that GET /v1/systems returns:
these are the contacts whose system.id is that System. A value that
isn't a UUID is rejected (400 invalid_request,
details.field = "system_id"). An identifier that names no active
System of the account (unknown, from another account, draft, or
archived) returns 422 system_not_found. Until Systems are opened to
the API for the account, the filter returns
403 feature_not_available (details.feature: systems); the list
without this filter is still served.
Pass ?include=custom_field_definitions to add the
meta.custom_field_definitions field to the response — useful for
rendering an edit form on your side without a second round-trip.
Required scopes: contacts:read
| Name | Type | Required | Description |
|---|
cursor | string | null | optional | Opaque pagination cursor: pass the pagination.next_cursor value from the previous page. |
limit | integer | optional | Maximum number of results per page (default 20, max 100). Above that → 400 invalid_request. |
created_after | string | optional | Filter: only resources created after this date (inclusive). |
created_before | string | optional | Filter: only resources created before this date (inclusive). |
updated_after | string | optional | Filter: 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_before | string | optional | Filter: only resources modified before this date (inclusive). Sorts the list like updated_after. |
search | string | optional | Word search across the contact's fields, ignoring accents and case (each word must appear as typed, words combined with AND). 200 characters at most. |
tag | string | optional | UUID of a tag: returns only the contacts that carry this tag,
paginated like the full list. To
count a campaign's leads, pass the id of its
"Campagne : <name>" tag (system_key starting with campaign:
in GET /v1/tags) and walk the pages (next_cursor)
until has_more: false: pagination.total_count is only an
estimate. A value that isn't a UUID is
rejected (400 invalid_request, details.field = "tag"). |
system_id | string | optional | UUID of an active System of the account (id from GET /v1/systems):
returns only the contacts of that System, paginated like the full
list. The main System's contacts also include those that aren't being
followed in any other active System. A value that isn't a UUID is
rejected (400 invalid_request, details.field = "system_id"). |
include | string | optional | Includes the meta.custom_field_definitions block in the response. |
| Status | Description |
|---|
200 | Paginated list of contacts. |
400 | Invalid request. code tells apart the refusals the operation returns under this status, and each example shows one. 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"
}
}
}
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"
}
}
}
invalid_requestcreated_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": "created_after",
"reason": "invalid_value"
}
}
}
invalid_requesttag · invalid_uuid
{
"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": "tag",
"reason": "invalid_uuid"
}
}
}
invalid_requestsystem_id · invalid_uuid
{
"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": "system_id",
"reason": "invalid_uuid"
}
}
}
invalid_requestsearch · too_long
{
"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": "search",
"reason": "too_long"
}
}
}
|
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: details.feature names what is missing, the public API in the account's plan (public_api) or Systems, not opened to the API for this account yet (systems, returned only with the system_id filter). 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: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": "contacts:read",
"current_scopes": [
"leads:capture"
],
"suggested_preset": "read_only"
}
}
}
feature_not_availablesystems
{
"error": {
"type": "authorization_error",
"code": "feature_not_available",
"message": "This feature isn't open for this account yet.",
"hint": "Capturia opens it account by account before its launch; the rejection comes from the account, not the key. `details.feature` names it. Contact your Capturia advisor to have it opened.",
"doc_url": "https://capturia.io/en/developers/api/v1/authentication#plan",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"feature": "systems"
}
}
}
|
422 | Request refused. code tells apart the refusals the operation returns under this status, and each example shows one. system_not_found
{
"error": {
"type": "business_rule_error",
"code": "system_not_found",
"message": "The requested System does not match any active System for this account.",
"hint": "`details.field` names the rejected field. Use the `id` of a System returned by `GET /v1/systems`.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#system_not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"field": "system_id",
"reason": "unknown_for_this_account"
}
}
}
|
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"
}
}
|
curl -X GET 'https://api.capturia.io/v1/contacts' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'
Creates a contact under the API key's account, through the same path as the
dashboard. An email or a phone number is required
(either one is enough). The email is stored in lowercase; the
phone number is normalized to E.164 when it's a valid North American
number.
The person is looked up across all of the account's identities
(primary and secondary emails and phone numbers, case-insensitive).
If they already exist, nothing is created: the response is
409 duplicate_contact, with the existing contact in data and the
matching fields in details.conflicting_fields. If the email and
the phone number belong to two different contacts, the response is
409 duplicate_resource, with no contact.
The created contact has the source api. An integration doesn't name
anyone who actually met this contact: no implied
consent (SMS or email) is recorded when it's created. Capturia's SMS
follow-ups and prospecting emails are only sent to it
once a real basis for consent exists
(form, booking, inbound message, attestation in
Capturia). To capture a lead who just filled out your form,
with their consent, use POST /v1/leads/capture.
The Idempotency-Key header is optional but recommended.
A second request with the same key and the same payload returns the
original response without repeating the operation. A second request with
the same key and a different payload returns 409 idempotency_conflict
(details.reason: payload_mismatch), as does a request that arrives
while the first one is still in progress (in_flight, with
Retry-After). A key that isn't 16 to 128 characters
A-Z a-z 0-9 _ - returns 400 invalid_request.
The keys of custom_fields are the field's name as defined
in Capturia (or, equivalently, the id of its definition) —
the same contract as /v1/events and /v1/leads/capture. The values
are validated against the account's definitions
(client_custom_field_definitions). A refusal returns
400 invalid_custom_fields, and details names each refused field
under the key you sent: unknown_field (no field with this name on the
account) or invalid_value (value outside the field's type). A field
marked "To complete" that is missing from custom_fields does not refuse
the contact. A custom_fields that is neither an object nor null
returns 400 validation_error.
Required scopes: contacts:write
| Name | Type | Required | Description |
|---|
Idempotency-Key | string | optional | Idempotency 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
| Property | Type | Required | Description |
|---|
email | string | optional | Email of the contact, stored in lowercase. An uppercase letter never creates a second contact. |
first_name | string | optional | The contact's first name. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part is
saved; if nothing remains, the field is absent. |
last_name | string | optional | The contact's last name. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part is
saved; if nothing remains, the field is absent. |
phone | string | optional | Phone number of the contact (at most 50 characters): a reachable number
that can be normalized to E.164 (e.g. +15145551234). A number that's too
short, incomplete, or followed by an extension is rejected (400,
validation_error, reason invalid_phone on the phone field),
just like when updating a contact. |
company | string | optional | The contact's company. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part is
saved; if nothing remains, the field is absent. |
deal_value | number | optional | Estimated value of the opportunity in CAD. |
region | LeadRegion | optional | Québec administrative region of the lead, by its official name. On
write, case, accents and dashes don't matter (monteregie becomes
Montérégie); a lead outside Québec has no region. When no region is
sent, it's derived from the city when the city is known.Allowed values: Bas-Saint-Laurent, Saguenay–Lac-Saint-Jean, Capitale-Nationale, Mauricie, Estrie, Montréal, Outaouais, Abitibi-Témiscamingue, Côte-Nord, Nord-du-Québec, Gaspésie–Îles-de-la-Madeleine, Chaudière-Appalaches, Laval, Lanaudière, Laurentides, Montérégie, Centre-du-Québec |
industry | LeadIndustry | optional | Industry of the lead's business, by its code. On write, the code or its
French or English label is accepted (Courtiers immobiliers and
Real Estate Agents become real_estate).Allowed values: real_estate, mortgage_broker, medical_dental, auto_dealer, renovation_construction, professional_services, training_coaching, health_wellness, b2b_services, general_services, healthcare_clinic, ecommerce, restaurant_hospitality, insurance, legal_services, agency_marketing, other |
language | LeadLanguage | optional | Language of the lead. On write, a language code (fr-CA, en_US) or a
language name (français, English) is accepted.Allowed values: fr, en |
custom_fields | object | null | optional | Custom fields, keyed by the field's name (or the id of its
definition). Validated against client_custom_field_definitions on
write — an unknown field, an incompatible type, or a value
that's too long returns 400 invalid_custom_fields, under the key
you sent. Maximum lengths: text 1,000 characters, long text
4,000, URL 2,048 (http(s)://), email 254, phone 30; a
list only accepts one of its options. On read, the keys
returned are the definition ids (storage form). |
system_id | string | optional | System of the created contact (UUID of one of the account's Systems): the
contact starts in this System. Omitted → the System set on the API key,
otherwise the main System. UUID unknown for this account →
system_not_found error (422), no contact created; archived System →
silent fallback to the main System. |
| Status | Description |
|---|
201 | Contact 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_erroremail · email_or_phone_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": "email",
"reason": "email_or_phone_required"
},
{
"field": "phone",
"reason": "email_or_phone_required"
}
]
}
}
validation_errorphone · invalid_phone
{
"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": "phone",
"reason": "invalid_phone"
}
]
}
}
invalid_custom_fieldstaille_entreprise · unknown_field
{
"error": {
"type": "validation_error",
"code": "invalid_custom_fields",
"message": "One or more custom fields are invalid.",
"hint": "`details` names each refused field: `unknown_field` (no field with this name on the account) or `invalid_value` (value outside the field's type).",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_custom_fields",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": [
{
"field": "taille_entreprise",
"reason": "unknown_field"
}
]
}
}
invalid_custom_fieldsbudget · invalid_value
{
"error": {
"type": "validation_error",
"code": "invalid_custom_fields",
"message": "One or more custom fields are invalid.",
"hint": "`details` names each refused field: `unknown_field` (no field with this name on the account) or `invalid_value` (value outside the field's type).",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_custom_fields",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": [
{
"field": "budget",
"reason": "invalid_value"
}
]
}
}
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 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. 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 `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"
}
}
}
|
409 | Conflict. duplicate_contact: the person already exists, nothing is created; data holds their contact, to update with PATCH /v1/contacts/{id} instead of creating it again. duplicate_resource: the email and the phone number belong to two different contacts, and no contact is returned. idempotency_conflict: the same Idempotency-Key was used with a different body (details.reason is payload_mismatch: use a new key), or the first request is still in progress (in_flight: retry after the Retry-After delay). duplicate_contact
{
"error": {
"type": "conflict_error",
"code": "duplicate_contact",
"message": "A contact with this email or phone already exists.",
"hint": "`details.conflicting_fields` names the conflicting fields and `data` holds the existing record: update it with PATCH instead of creating it again.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#duplicate_contact",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"conflicting_field": "email",
"conflicting_fields": [
"email"
]
}
},
"data": {
"id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
"email": "[email protected]",
"phone": "+15145551234",
"first_name": "Alex",
"last_name": "Tremblay",
"company": "Acme Inc.",
"source": "api",
"pipeline_stage_id": null,
"deal_value": 2500,
"is_priority": false,
"custom_fields": null,
"address": null,
"street": null,
"city": null,
"sector": null,
"region": null,
"province": null,
"country": null,
"postal_code": null,
"industry": null,
"language": null,
"created_at": "2026-04-01T10:00:00.000Z",
"updated_at": "2026-04-01T10:00:00.000Z"
}
}
duplicate_resource
{
"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": {
"resource": "contact",
"conflicting_field": "email",
"conflicting_fields": [
"email",
"phone"
]
}
}
}
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. system_not_found
{
"error": {
"type": "business_rule_error",
"code": "system_not_found",
"message": "The specified system_id does not match any System for this account.",
"hint": "Use the UUID of one of your Systems, or omit system_id: the lead goes to your key's System, otherwise to your main System.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#system_not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"field": "system_id",
"reason": "unknown_for_this_account"
}
}
}
|
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"
}
}
|
curl -X POST 'https://api.capturia.io/v1/contacts' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"first_name": "Alex",
"last_name": "Tremblay",
"phone": "+15145551234",
"company": "Acme Inc.",
"deal_value": 2500
}'
Returns a contact by its ID. The ?expand=tags parameter joins the
client_contact_tags table to include the attached tags (id, name,
color, system_key) without an extra round-trip.
The contact returns its System (system: id and name): the one
where it is being followed right now, otherwise the account's main
System. system is null until Systems are opened to the API for
the account, and for a contact that isn't being followed in any active
System when the account has no active main System.
The ID of a contact absorbed by a merge returns 404: reads, updates,
and deletes go through the surviving contact. If the merge is undone
from the dashboard, the contact becomes reachable again under its ID.
Required scopes: contacts:read
| Name | Type | Required | Description |
|---|
id | string | required | UUID of the resource. |
| Name | Type | Required | Description |
|---|
expand | string | optional | If tags, adds client_contact_tags to the returned contact. |
| Status | Description |
|---|
200 | Contact found. |
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. 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 `contacts: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": "contacts: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. not_found
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "contact"
}
}
}
|
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"
}
}
|
curl -X GET 'https://api.capturia.io/v1/contacts/{id}' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'
Updates the provided fields of the contact (omitted fields are kept).
You must provide at least one field, otherwise 400 no_fields.
The custom_fields field is merged with the existing values
(keys you don't provide are kept). The keys are the field's name
(or the id of its definition). An unknown key, or a value the field's
type rejects, returns 400 invalid_custom_fields
(details[].reason = unknown_field or invalid_value, and
details[].field names the field the way the request addressed it).
Passing null clears all custom fields; any value other than an object
or null returns 400 validation_error
(details[].reason = invalid_type).
Phone number and email are unique per account: a value already
held by another contact (as a primary or secondary
contact detail) returns 409 duplicate_resource
(details.conflicting_field names the field) and the contact isn't
modified. The phone number is compared once normalized to E.164.
The update goes through the same service as the contact in the
dashboard: same validations (email, phone number, positive amounts,
each custom field's value according to its type), same entry in
the account's timeline and activity log, and the same
lead_updated webhook. An invalid value for a contact field
returns 400 validation_error (details[].field names the field,
details[].reason the reason); a phone number that can't be dialed
(that doesn't normalize to E.164) is rejected with
details[].reason = invalid_phone.
A contact always keeps at least a first name, a last name, an email, or
a phone number: a request that would clear the last one returns
400 validation_error (details[].reason = identity_required), and
the contact isn't modified.
The value (deal_value) of an archived contact can't be changed:
422 business_rule_violation (details.reason =
contact_archived), and no field from the request is written.
Restore the contact from the dashboard first.
The notes field is the contact's free-form text, replaced on every
write. To add a note to the contact's timeline, use
POST /v1/contacts/{id}/notes.
Required scopes: contacts:write
| Name | Type | Required | Description |
|---|
id | string | required | UUID of the resource. |
Request body
| Property | Type | Required | Description |
|---|
email | string | optional | No description. |
first_name | string | null | optional | The contact's first name. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part
replaces the contact's; if nothing remains, the field is not changed,
and a request that carries only that field is rejected (400
no_fields). |
last_name | string | null | optional | The contact's last name. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part
replaces the contact's; if nothing remains, the field is not changed,
and a request that carries only that field is rejected (400
no_fields). |
phone | string | null | optional | E.164 phone number (e.g. +15145551234). |
company | string | null | optional | The contact's company. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part
replaces the contact's; if nothing remains, the field is not changed,
and a request that carries only that field is rejected (400
no_fields). |
deal_value | number | null | optional | No description. |
is_priority | boolean | optional | Flagged as a priority for faster human follow-up. |
notes | string | null | optional | Free-form internal notes about the contact. |
region | LeadRegion | null | optional | Québec administrative region of the lead, by its official name. On
write, case, accents and dashes don't matter (monteregie becomes
Montérégie); a lead outside Québec has no region. When no region is
sent, it's derived from the city when the city is known. |
industry | LeadIndustry | null | optional | Industry of the lead's business, by its code. On write, the code or its
French or English label is accepted (Courtiers immobiliers and
Real Estate Agents become real_estate). |
language | LeadLanguage | null | optional | Language of the lead. On write, a language code (fr-CA, en_US) or a
language name (français, English) is accepted. |
custom_fields | object | null | optional | Additive patch on the existing custom fields (keys you don't
provide are kept). Passing null clears all fields. |
| Status | Description |
|---|
200 | Contact updated. |
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_erroremail · invalid_format
{
"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": "email",
"reason": "invalid_format"
}
]
}
}
validation_errorbody · identity_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": "body",
"reason": "identity_required"
}
]
}
}
no_fields
{
"error": {
"type": "validation_error",
"code": "no_fields",
"message": "No updatable field was provided.",
"hint": "Send at least one of the endpoint's updatable fields, listed in the reference.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#no_fields",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7"
}
}
invalid_custom_fields
{
"error": {
"type": "validation_error",
"code": "invalid_custom_fields",
"message": "One or more custom fields are invalid.",
"hint": "`details` names each refused field: `unknown_field` (no field with this name on the account) or `invalid_value` (value outside the field's type).",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#invalid_custom_fields",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": [
{
"field": "budget",
"reason": "unknown_field"
}
]
}
}
|
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. 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 `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"
}
}
}
|
404 | Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one. not_found
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "contact"
}
}
}
|
409 | Conflict with the resource's state. code tells apart the refusals the operation returns under this status, and each example shows one. duplicate_resource
{
"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": {
"resource": "contact",
"conflicting_field": "phone"
}
}
}
|
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. 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": {
"reason": "contact_archived"
}
}
}
|
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"
}
}
|
curl -X PATCH 'https://api.capturia.io/v1/contacts/{id}' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "Alexandre",
"deal_value": 5000,
"is_priority": true
}'
Permanently deletes the contact, exactly as from the
dashboard: its inbox conversation, its exchanges (SMS, emails,
chat transcripts), its bookings, and its files go with
it. Its voicemails and media received by SMS go too, as
do the audio of its calls and meetings and the word-for-word
transcripts of its calls, including at our telephony
provider: this removal is durable and retried automatically if the
provider is temporarily unreachable. Its call log
(summary, notes, outcome) remains, detached from the contact, as do
sales, orders, and payments.
Removal outside the platform (bookings in the connected Google calendar,
stored files) happens right after, on a best-effort basis: the
contact's deletion from the database succeeds even if an external service is
temporarily unreachable. The response's cleanup object reports it —
failed > 0 means some Google bookings couldn't be
removed from the calendar (account disconnected, outage) and remain there.
Requires the contacts:delete scope, separate from writing: as in
the dashboard, deleting a contact is a separate permission.
Only someone who can delete leads in Capturia
can grant it to an API key.
Required scopes: contacts:delete
| Name | Type | Required | Description |
|---|
id | string | required | UUID of the resource. |
| Status | Description |
|---|
200 | Contact deleted. |
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. 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 `contacts:delete` scope. Create a new key with the \"Full integration\" 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:delete",
"current_scopes": [
"leads:capture"
],
"suggested_preset": "full_integration",
"required_permission": "leads.delete"
}
}
}
|
404 | Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one. not_found
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "contact"
}
}
}
|
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"
}
}
|
curl -X DELETE 'https://api.capturia.io/v1/contacts/{id}' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'
get/v1/contacts/{id}/timelineReturns the contact's history, most recent first: the same feed as the
record in Capturia, page by page.
Each scope of the key opens its domain:
contacts:read (required): the record itself (notes, stage
changes, forms, purchases, tools sent, disqualification, files,
activities) and its tasks;
quotes:read: its quotes (sent, viewed, signed) and its invoices
(sent, viewed, paid, cancelled);
conversations:read: its texts, emails, messages and calls, and the
links of its texts the contact opened;
bookings:read: its appointments.
Analyzed meetings are not included. Each event carries its type (type:
note, pipeline_change, submission, disqualification, activity,
file, order_paid, presuasion_sent, guide_viewed, page_read,
video_watched, event_attended, link_clicked, task,
task_completed, quote_sent, quote_viewed, quote_signed,
invoice_sent, invoice_viewed, invoice_paid, invoice_cancelled,
sms, email, email_opened, email_clicked, chat, voicemail,
call, booking…), its instant (occurred_at) and its public fields
(data), which vary with the type: a note carries its full text
(content) and its author (author_kind, author_name); a task, its
due time (due_at); a quote, its offer's amount (total) and its
monthly fee apart (monthly_total), never added; an invoice, its number
(number), its amount in cents and its currency (amount_cents,
currency), its due date (due_on) and the quote it comes from
(source_quote_number); a payment that settles an invoice (source:
invoice), that invoice's number (invoice_number); a text or an
email, a preview; a page read, its title (subject_label), its visible
time and scroll depth (visible_seconds, max_scroll_percent); a video
watched, the seconds actually heard and its length (heard_seconds,
media_seconds); a live attendance, its event, edition, start, minutes
and whether the offer was seen (event_name, edition_label,
starts_at, duration_minutes, saw_offer); a text link opened, its
click count and whether clicks are tracked one by one (click_count,
tracked). No internal identifier is included.
For the next page, pass pagination.next_cursor as cursor (a full
page announces has_more even when the next one is empty); the feed
is not counted in advance: total_count is the number of events in
the page. The feed is not filtered by date: created_after and
created_before are refused
(400 invalid_request, details.reason = unsupported).
Required scopes: contacts:read
| Name | Type | Required | Description |
|---|
id | string | required | UUID of the resource. |
| Name | Type | Required | Description |
|---|
cursor | string | null | optional | Opaque pagination cursor: pass the pagination.next_cursor value from the previous page. |
limit | integer | optional | Maximum number of results per page (default 20, max 100). Above that → 400 invalid_request. |
| Status | Description |
|---|
200 | A page of the history, most recent first. |
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_requestcursor · 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": "cursor",
"reason": "invalid_value"
}
}
}
invalid_requestcreated_after · unsupported
{
"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": "created_after",
"reason": "unsupported"
}
}
}
|
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. 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 `contacts: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": "contacts: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. not_found
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "contact"
}
}
}
|
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"
}
}
|
curl -X GET 'https://api.capturia.io/v1/contacts/{id}/timeline' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'
post/v1/contacts/{id}/tagsAttaches one or more tags to the contact through the
client_contact_tags join table. The tags must belong to the same account
as the contact — otherwise 400 validation_error (details[].reason =
tags_not_found). An identifier, of the contact or of a tag, that isn't
a UUID also returns 400 validation_error
(details[].reason = invalid_uuid). A contact that's unknown, belongs
to another account, or was merged into another contact returns
404 not_found.
The operation is idempotent at the database level: calling it twice with the
same tag_ids doesn't create duplicates (upsert
ON CONFLICT (contact_id, tag_id) DO NOTHING).
A tag whose system_key starts with campaign: is managed by
Capturia: it follows the lead's campaign. If the contact already carries it, it
is ignored (sending back a lead's list of tags stays idempotent).
If the contact doesn't carry it, it returns 409 tag_managed_by_capturia and
none of the request's tags are attached.
There's no dedicated GET — use
GET /v1/contacts/{id}?expand=tags to retrieve the tags
currently attached.
Required scopes: contacts:write
| Name | Type | Required | Description |
|---|
id | string | required | UUID of the resource. |
Request body
| Property | Type | Required | Description |
|---|
tag_ids | string[] | required | UUIDs of the tags to attach (all must belong to the same account, at most 100 per request). |
| Status | Description |
|---|
200 | Tags attached. Returns the contact's up-to-date list of tags. |
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_errortag_ids · required_non_empty_array
{
"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": "tag_ids",
"reason": "required_non_empty_array"
}
]
}
}
validation_errortag_ids · tags_not_found
{
"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": "tag_ids",
"reason": "tags_not_found",
"tag_ids": [
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
]
}
]
}
}
|
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. 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 `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"
}
}
}
|
404 | Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one. not_found
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "contact"
}
}
}
|
409 | Conflict with the resource's state. code tells apart the refusals the operation returns under this status, and each example shows one. tag_managed_by_capturia
{
"error": {
"type": "conflict_error",
"code": "tag_managed_by_capturia",
"message": "This campaign tag is managed by Capturia: it cannot be added or removed by hand.",
"hint": "Capturia adds this tag to every lead of the campaign and removes it when the lead changes campaign. To change a lead's campaign, choose it from the lead's record in the dashboard.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#tag_managed_by_capturia",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"tag_ids": [
"7d2e9c41-5b3a-4f8e-9a1c-2b4d6e8f0a13"
]
}
}
}
|
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"
}
}
|
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"
}
}
|
curl -X POST 'https://api.capturia.io/v1/contacts/{id}/tags' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"tag_ids": [
"8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
"9a4c2b3d-0e5f-5a6b-c7d8-e9f0a1b2c3d4"
]
}'
delete/v1/contacts/{id}/tags/{tagId}Removes the association between a contact and a tag. The tag itself
isn't deleted — it remains available for other contacts.
If the tag isn't attached to the contact, or doesn't exist in the
account, returns 404 not_found (details.resource = tag); a
contact that's unknown, belongs to another account, or was merged into
another contact returns 404 not_found (details.resource = contact).
An id or a tagId that isn't a UUID returns 400 validation_error
(details[].reason = invalid_uuid).
A campaign tag (system_key starting with campaign:) follows
the lead's campaign: detaching it returns
409 tag_managed_by_capturia.
Required scopes: contacts:write
| Name | Type | Required | Description |
|---|
id | string | required | UUID of the resource. |
tagId | string | required | UUID of the tag to detach. |
| Status | Description |
|---|
200 | Tag detached. |
400 | Invalid request. 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": "tagId",
"reason": "invalid_uuid"
}
]
}
}
|
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. 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 `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"
}
}
}
|
404 | Resource not found. details.resource = tag: the contact doesn't carry this tag, or the tag doesn't exist in the account; there's nothing to detach. details.resource = contact: the contact is unknown, belongs to another account, or was merged into another contact. not_foundtag
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "tag"
}
}
}
not_foundcontact
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "contact"
}
}
}
|
409 | Conflict with the resource's state. code tells apart the refusals the operation returns under this status, and each example shows one. tag_managed_by_capturia
{
"error": {
"type": "conflict_error",
"code": "tag_managed_by_capturia",
"message": "This campaign tag is managed by Capturia: it cannot be added or removed by hand.",
"hint": "Capturia adds this tag to every lead of the campaign and removes it when the lead changes campaign. To change a lead's campaign, choose it from the lead's record in the dashboard.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#tag_managed_by_capturia",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"tag_ids": [
"7d2e9c41-5b3a-4f8e-9a1c-2b4d6e8f0a13"
]
}
}
}
|
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"
}
}
|
curl -X DELETE 'https://api.capturia.io/v1/contacts/{id}/tags/{tagId}' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'
post/v1/contacts/{id}/notesAdds a note to the contact's timeline, exactly as from
the contact in the dashboard: it's added to the previous notes,
appears in the contact's Notes tab, and feeds the lead's
qualification. The note is signed by the API key that wrote it.
Not to be confused with the contact's free-form text field notes
(PATCH /v1/contacts/{id}), replaced on every write.
The content is required and is at most 20,000 characters; otherwise
400 validation_error (details[].reason = required or
too_long). An id that isn't a UUID also returns
400 validation_error (details[].reason = invalid_uuid). A
contact that's unknown, belongs to another account, or was merged into
another contact returns 404 not_found.
The Idempotency-Key header is optional but recommended: a
second request with the same key, the same contact, and the same content
returns the original note without writing a second one. The key is
16 to 128 characters from A-Z, a-z, 0-9, _, and -;
otherwise 400 invalid_request. The same key with another contact or
other content returns 409 idempotency_conflict
(details.reason = payload_mismatch); so does a request still in
progress under the same key (details.reason = in_flight).
Required scopes: contacts:write
| Name | Type | Required | Description |
|---|
id | string | required | UUID of the resource. |
| Name | Type | Required | Description |
|---|
Idempotency-Key | string | optional | Idempotency 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
| Property | Type | Required | Description |
|---|
content | string | required | Text of the note. |
| Status | Description |
|---|
201 | Note added to the contact's timeline. |
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": "content",
"reason": "required"
}
]
}
}
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 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. 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 `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"
}
}
}
|
404 | Resource not found. code tells apart the refusals the operation returns under this status, and each example shows one. not_found
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"hint": "`details.resource` names the resource looked up. Check its ID: it may have been deleted, or it belongs to another account.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"resource": "contact"
}
}
}
|
409 | Idempotency key conflict. details.reason = payload_mismatch: the same Idempotency-Key was already used for another contact or other content; retrying doesn't help, use a new key. details.reason = in_flight: a request with this key is still in progress; retry after the Retry-After delay, in seconds. 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"
}
}
|
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"
}
}
|
curl -X POST 'https://api.capturia.io/v1/contacts/{id}/notes' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"content": "Appel de suivi : le client veut une soumission pour 3 succursales."
}'
Atomic upsert of up to 100 contacts in a single request. A row
that finds an active contact on the account, by its email first, otherwise
by its phone, updates it (the other fields you provide replace the
existing values); the other rows are inserted.
The payload is deduplicated internally by lower(email) (last entry
wins) before the upsert: an entry replaced by a later one with the same
email isn't written. The order of the contacts in the array and the
case of the email don't affect the idempotency hash.
The Idempotency-Key header is optional but recommended. The
idempotency hash covers the payload after internal deduplication —
a network retry stays idempotent even if you resend the contacts in
a different order or with different email casing. A key that isn't
16 to 128 characters A-Z a-z 0-9 _ - returns 400 invalid_request.
The endpoint returns 200 with {data: {processed, contacts: []}}
— no per-contact multi-status. The batch is all or nothing: a single
refused row rejects the whole batch, with nothing written, as
400 validation_error. details names each refused row,
contacts[<i>].<field> (i: the row's position in contacts,
starting at 0), with its reason:
required, invalid_type, invalid_format, invalid_choice (value
outside the field's list), must_be_object (the row isn't an object);
too_long: value beyond the field's maximum length;
out_of_range: deal_value negative or above 9,999,999,999.99;
invalid_phone: no usable E.164 number;
archived_contact: the email or phone number belongs to an archived contact;
identity_conflict: the phone number belongs to a contact that has another email;
other_person_unplaced: the row matches a contact by its email or
phone number, under another first name, with no contact details of its
own to become a person on that contact.
The other 400 validation_error refusals name the body field:
contacts (required_array, required_non_empty), system_id
(invalid_format) and trigger_automations (invalid_type).
The upsert runs in a single transaction: a database error
during the upsert returns 500 with nothing written. Only reading back
the written contacts, after the transaction, can still fail with
500: the same request, replayed, then updates the contacts already
written.
Each created contact is created, in the same transaction, in the
batch's System: its system_id, otherwise the System set on the API
key, otherwise the main System (a System that isn't active gives way to
the main System). An updated contact keeps its own. When that System is
not the main one, the response also includes system_routing: the
summary of placing the created contacts; refused + errors = created
contacts that stayed in the main System.
Required scopes: contacts:write
| Name | Type | Required | Description |
|---|
Idempotency-Key | string | optional | Idempotency 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
| Property | Type | Required | Description |
|---|
contacts | object[] | required | List of contacts to upsert (max 100 per request, otherwise 400 batch_too_large). |
contacts[].email | string | required | Email of the contact, compared case-insensitively. |
contacts[].first_name | string | optional | The contact's first name. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part is
saved; if nothing remains, the field is absent. |
contacts[].last_name | string | optional | The contact's last name. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part is
saved; if nothing remains, the field is absent. |
contacts[].phone | string | optional | Phone number of the contact, normalized to E.164 (e.g. +15145551234). |
contacts[].company | string | optional | The contact's company. The text "[object Object]" (a mapping that points to an
object instead of a field) is removed from it: the readable part is
saved; if nothing remains, the field is absent. |
contacts[].deal_value | number | optional | Estimated value of the opportunity in CAD. |
contacts[].region | LeadRegion | optional | Québec administrative region of the lead, by its official name. On
write, case, accents and dashes don't matter (monteregie becomes
Montérégie); a lead outside Québec has no region. When no region is
sent, it's derived from the city when the city is known.Allowed values: Bas-Saint-Laurent, Saguenay–Lac-Saint-Jean, Capitale-Nationale, Mauricie, Estrie, Montréal, Outaouais, Abitibi-Témiscamingue, Côte-Nord, Nord-du-Québec, Gaspésie–Îles-de-la-Madeleine, Chaudière-Appalaches, Laval, Lanaudière, Laurentides, Montérégie, Centre-du-Québec |
contacts[].industry | LeadIndustry | optional | Industry of the lead's business, by its code. On write, the code or its
French or English label is accepted (Courtiers immobiliers and
Real Estate Agents become real_estate).Allowed values: real_estate, mortgage_broker, medical_dental, auto_dealer, renovation_construction, professional_services, training_coaching, health_wellness, b2b_services, general_services, healthcare_clinic, ecommerce, restaurant_hospitality, insurance, legal_services, agency_marketing, other |
contacts[].language | LeadLanguage | optional | Language of the lead. On write, a language code (fr-CA, en_US) or a
language name (français, English) is accepted.Allowed values: fr, en |
system_id | string | optional | Target System of the batch (UUID of one of the account's Systems). The
contacts created by this batch are engaged in this
System; updated contacts keep their engagement.
Omitted → the System set on the API key, otherwise the main System. UUID
unknown for this account → system_not_found (422), no
contact written; archived System → silent fallback to the
main System. |
trigger_automations | boolean | optional | Triggers the account's active automations and sequences
for the contacts in this batch (contact created, tags
added). Default false: nothing is triggered —
no automation or sequence enrollment, no
email or SMS caused by this import. When true, the response
returns automations_enrolled and, if the account's safety
cap (20,000 runs opened within the hour) is reached,
automations_skipped_rate_limit — never a silent
drop. Beyond 200 runs opened within the hour, enrollments
are still created and start gradually. |
| Status | Description |
|---|
200 | Batch processed. processed = number of contacts successfully inserted or updated. |
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_errorcontacts[1].phone · invalid_phone
{
"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": "contacts[1].phone",
"reason": "invalid_phone"
},
{
"field": "contacts[3].email",
"reason": "archived_contact"
}
]
}
}
validation_errorcontacts · required_array
{
"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": "contacts",
"reason": "required_array"
}
]
}
}
batch_too_large
{
"error": {
"type": "validation_error",
"code": "batch_too_large",
"message": "The batch exceeds the maximum size.",
"hint": "`details.max` gives the maximum number of items per request: split the batch into several requests.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#batch_too_large",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"max": 100
}
}
}
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 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. 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 `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"
}
}
}
|
409 | Idempotency key conflict, nothing is written. details.reason is payload_mismatch when the same Idempotency-Key was used with a different batch: use a new key. It is in_flight when the first request is still in progress: retry after the Retry-After delay. 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. system_not_found
{
"error": {
"type": "business_rule_error",
"code": "system_not_found",
"message": "The specified system_id does not match any System for this account.",
"hint": "Use the UUID of one of your Systems, or omit system_id: the lead goes to your key's System, otherwise to your main System.",
"doc_url": "https://capturia.io/en/developers/api/v1/errors#system_not_found",
"request_id": "req_01J9X8Z3F4K2M5N7P9Q1R3S5T7",
"details": {
"field": "system_id",
"reason": "unknown_for_this_account"
}
}
}
|
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"
}
}
|
curl -X POST 'https://api.capturia.io/v1/contacts/batch' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json' \
-d '{
"contacts": [
{
"email": "[email protected]",
"first_name": "Alex",
"last_name": "Tremblay",
"phone": "+15145551234",
"company": "Acme Inc.",
"deal_value": 2500
},
{
"email": "[email protected]",
"first_name": "Morgan",
"last_name": "Bélanger",
"company": "Example Inc."
}
]
}'