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

FR

Automations

3 endpoints

get/v1/automations

List automations

Returns the paginated list of the client's active automations (cursor v2). Stable sort created_at DESC, id DESC. Archived automations (archived_at IS NOT NULL) are excluded — the public API does not expose them.

Filters

  • ?status=active — only automations with is_active=true.
  • ?status=inactive — only automations with is_active=false.

Read-only

The public API only exposes read access (list + history) and manual triggering. Creating, editing and archiving an automation happen in the dashboard — there is no POST/PATCH/DELETE /v1/automations endpoint.

Required scopes: automations:read

Query parameters

NameTypeRequiredDescription
statusstringoptionalFilter on is_active=true (active) or is_active=false (inactive).

Responses

StatusDescription
200

Paginated list of automations.

400

The request is malformed (missing header, invalid JSON, invalid parameter).

401

Unknown API key or invalid format.

403

Authorization denied. Two causes, distinguished by code: insufficient_scope (the key lacks the required scope — details.required_scope) or feature_not_available (the public API or the targeted module isn't included in the account's plan — details.feature names the feature, e.g. public_api, quotes). A plan denial is final for the key: don't retry; the account must change plans.

429

The per-window request quota has been exceeded for this API key or endpoint.

500

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

Example request

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

Manually trigger an automation

Creates an execution with status="pending" and trigger_type="manual_api", claimable by the automation engine (asynchronous, no guarantee of synchronous completion). To track the execution's progress, call GET /v1/automations/{id}/history.

Preconditions

  • Automations must not have been removed from the account — otherwise 403 feature_not_available.
  • The automation must belong to the calling client and must not be archived — otherwise 404 not_found.
  • The automation must have is_active=true — otherwise 409 automation_inactive.
  • The automation must be published — otherwise 409 automation_not_published.
  • The published automation must have a trigger node — otherwise 409 no_trigger.
  • The contact_id must belong to the calling client — otherwise 404 not_found. A contact absorbed by a merge also returns 404 not_found: trigger on the contact that was kept.

Enrollment guards

Manual triggering goes through the same guards as automatic triggers:

  • Contact already in an active run of this automation — otherwise 409 already_enrolled (turn on Multiple concurrent runs in the Enrollment settings to allow concurrent runs).
  • Duplicate within the last 5 minutes, cap of 5 enrollments per contact per 24 h on this automation, or global cap of 200 executions per hour for the account — otherwise 429 trigger_throttled.

The body accepts an optional event_data (free-form JSON object) injected into the execution and available to the graph's template variables.

Required scopes: automations:trigger

Request body

PropertyTypeRequiredDescription
contact_idstringrequiredTarget contact to run the automation on. Must belong to the calling client.
event_dataobjectoptionalOptional event context (free-form JSON object) injected into the execution and available to the graph's template variables. Empty by default.

Responses

StatusDescription
201

pending execution created — claimed asynchronously by the engine.

400

Parameter or body validation failed.

401

Unknown API key or invalid format.

403

Authorization denied. Two causes, distinguished by code: insufficient_scope (the key lacks the required scope — details.required_scope) or feature_not_available (the public API or the targeted module isn't included in the account's plan — details.feature names the feature, e.g. public_api, quotes). A plan denial is final for the key: don't retry; the account must change plans.

404

The requested resource doesn't exist (or isn't within the tenant's scope).

409

The request is syntactically valid but violates a business rule.

415

The Content-Type header is missing or not supported for this endpoint.

429

The per-window request quota has been exceeded for this API key or endpoint.

500

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

Example request

curl -X POST 'https://api.capturia.io/v1/automations/{id}/trigger' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "contact_id": "8f3b1a2c-9d4e-4f5a-b6c7-d8e9f0a1b2c3",
  "event_data": {
    "source": "crm_import"
  }
}'
get/v1/automations/{id}/history

List an automation's execution history

Returns the paginated list of an automation's executions (cursor v2). Stable sort created_at DESC, id DESC — most recent executions first. An execution is one run of the automation for a given contact; the engine can restart it after a failure (retry_count > 0).

The automation must belong to the calling client and must not be archived — otherwise 404 not_found.

Required scopes: automations:read

Responses

StatusDescription
200

Paginated list of the automation's executions.

400

The request is malformed (missing header, invalid JSON, invalid parameter).

401

Unknown API key or invalid format.

403

Authorization denied. Two causes, distinguished by code: insufficient_scope (the key lacks the required scope — details.required_scope) or feature_not_available (the public API or the targeted module isn't included in the account's plan — details.feature names the feature, e.g. public_api, quotes). A plan denial is final for the key: don't retry; the account must change plans.

404

The requested resource doesn't exist (or isn't within the tenant's scope).

429

The per-window request quota has been exceeded for this API key or endpoint.

500

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

Example request

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