Skip to content

Automation

Your workflows and what they act on. Requires workflows:read.

/v1/workflows/{id} returns the resolved configuration — the node graph plus every variable with its effective value and whether it was overridden. /campaigns is the one worth reading first: membership is not simply "campaigns linked to the workflow", so a workflow can be scheduled every night and still process nothing. When the set comes back empty, empty_reason names the cause.

What a workflow actually changed on a campaign lives under the campaign instead, at /v1/campaigns/{id}/optimization-history — see Advertising.

Servers

https://api.epinium.com

workflows

The authenticated account's automation workflows, the campaigns they process and those campaigns' performance. Requires workflows:read.


List the authenticated account's workflows

GET
/v1/workflows

Filter by description_key to tell workflow types apart: name and name_key are NOT reliable discriminators because several templates share a display name. template filters by the global template a workflow was cloned from. Global templates themselves are never listed here — only the account's own workflows.

Authorizations

bearer

Client API key (POST /api-keys). Send as Authorization: Bearer epk_live_....

Type
HTTP (bearer)

Parameters

Query Parameters

limit
Type
integer
Example20
Default
20
Minimum
1
Maximum
100
starting_after

Cursor for the next page: the id of the last record you received. Returns the records after it.

Type
string
ending_before

Cursor for the previous page: the id of the first record you received. Returns the records before it.

Type
string
fields

Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: fields[campaign]=id,name. A key that matches no entity is ignored silently and the full object comes back.

Type
object
active
Type
string
Valid values
"true""false"
template

24-character hexadecimal Mongo ObjectId.

Type
string
Pattern
"^[a-f0-9]{24}$"
description_key
Type
string

Responses

200

application/json
JSON
{
  
"object": "string",
  
"data": [
  
  
{
  
  
  
"id": "string",
  
  
  
"name": "string",
  
  
  
"name_key": "string",
  
  
  
"description": "string",
  
  
  
"description_key": "string",
  
  
  
"template_id": "string",
  
  
  
"active": true,
  
  
  
"dry_run": true,
  
  
  
"customized_by_user": true,
  
  
  
"schedule": {
  
  
  
  
"type": "string",
  
  
  
  
"cron": "string",
  
  
  
  
"interval_ms": 0,
  
  
  
  
"scheduled_at": "string",
  
  
  
  
"timezone": "string",
  
  
  
  
"enabled": true,
  
  
  
  
"last_run_at": "string",
  
  
  
  
"next_run_at": "string"
  
  
  
},
  
  
  
"node_count": 0,
  
  
  
"created_at": "string",
  
  
  
"updated_at": "string"
  
  
}
  
],
  
"has_more": true
}

Playground

Authorization
Variables
Key
Value

Samples


Retrieve one workflow with its resolved configuration

GET
/v1/workflows/{id}

Returns the full definition: the node graph, and every configuration variable with its effective value. overridden on a variable tells you whether the customer set it or it still carries the template default — which is usually the question worth asking when auditing a setup.

Authorizations

bearer

Client API key (POST /api-keys). Send as Authorization: Bearer epk_live_....

Type
HTTP (bearer)

Parameters

Path Parameters

id*

24-character hexadecimal Mongo ObjectId.

Type
string
Required
Pattern
"^[a-f0-9]{24}$"

Query Parameters

fields

Trim the response to the fields you need, comma-separated and keyed by ENTITY TYPE rather than by resource name: fields[campaign]=id,name. A key that matches no entity is ignored silently and the full object comes back.

Type
object

Responses

200

application/json
JSON
{
  
"id": "string",
  
"name": "string",
  
"name_key": "string",
  
"description": "string",
  
"description_key": "string",
  
"template_id": "string",
  
"active": true,
  
"dry_run": true,
  
"customized_by_user": true,
  
"schedule": {
  
  
"type": "string",
  
  
"cron": "string",
  
  
"interval_ms": 0,
  
  
"scheduled_at": "string",
  
  
"timezone": "string",
  
  
"enabled": true,
  
  
"last_run_at": "string",
  
  
"next_run_at": "string"
  
},
  
"node_count": 0,
  
"created_at": "string",
  
"updated_at": "string",
  
"variables": [
  
  
{
  
  
  
"key": "string",
  
  
  
"type": "string",
  
  
  
"value": null,
  
  
  
"overridden": true,
  
  
  
"description": "string",
  
  
  
"group": "string"
  
  
}
  
],
  
"nodes": [
  
  
{
  
  
  
"id": "string",
  
  
  
"type": "string",
  
  
  
"label": "string",
  
  
  
"data": {
  
  
  
  
"additionalProperties": null
  
  
  
}
  
  
}
  
],
  
"edges": [
  
  
{
  
  
  
"id": "string",
  
  
  
"source": "string",
  
  
  
"target": "string",
  
  
  
"source_handle": "string",
  
  
  
"target_handle": "string"
  
  
}
  
]
}

Playground

Authorization
Variables
Key
Value

Samples


Campaigns this workflow actually processes

GET
/v1/workflows/{id}/campaigns

NOT simply the campaigns that link to the workflow. Membership is decided by three controls stored per campaign (force-include, force-exclude, global opt-out) combined with the workflow's own filter and its auto-selection setting. Each row carries a gate object saying why it is in, plus the campaign's effective AI configuration. When the set is empty, empty_reason names the cause: manual-sin-enlaces means the workflow is on manual selection with nothing linked — the state a workflow is BORN in, and the usual reason one runs nightly for weeks doing nothing. filtro-vacio means no campaign passes its own filter. no-itera-campanas means this workflow does not act on campaigns at all.

Authorizations

bearer

Client API key (POST /api-keys). Send as Authorization: Bearer epk_live_....

Type
HTTP (bearer)

Parameters

Path Parameters

id*

24-character hexadecimal Mongo ObjectId.

Type
string
Required
Pattern
"^[a-f0-9]{24}$"

Query Parameters

limit
Type
integer
Example20
Default
20
Minimum
1
Maximum
100
starting_after

Cursor for the next page: the id of the last record you received. Returns the records after it.

Type
string
ending_before

Cursor for the previous page: the id of the first record you received. Returns the records before it.

Type
string

Responses

200

application/json
JSON
{
  
"object": "string",
  
"data": [
  
  
{
  
  
  
"id": "string",
  
  
  
"campaign_id": "string",
  
  
  
"name": "string",
  
  
  
"state": "string",
  
  
  
"ad_product": "string",
  
  
  
"config": {
  
  
  
  
"objective_type": "string",
  
  
  
  
"objective_value": 0,
  
  
  
  
"min_bid": 0,
  
  
  
  
"max_bid": 0,
  
  
  
  
"placement_cap_percent": 0,
  
  
  
  
"daily_budget": 0,
  
  
  
  
"monthly_budget": 0,
  
  
  
  
"ai_enabled": true,
  
  
  
  
"optimizing_since": "string"
  
  
  
},
  
  
  
"gate": {
  
  
  
  
"linked": true,
  
  
  
  
"excluded": true,
  
  
  
  
"opt_out": true,
  
  
  
  
"matched_own_filter": true
  
  
  
}
  
  
}
  
],
  
"has_more": true,
  
"empty_reason": "string"
}

Playground

Authorization
Variables
Key
Value

Samples


Advertising performance of the campaigns this workflow optimizes

GET
/v1/workflows/{id}/performance

Aggregated over a required start_date/end_date window, restricted to the campaigns the workflow actually processes. Each row puts the configured objective_type/objective_value next to the realized metrics, which is how you judge whether the workflow is hitting its target. optimizing_since is when the workflow first touched that campaign for real — results before that date are NOT its doing, so a window straddling it will mislead you. Monetary amounts are decimal strings; ratios are fractions (0.1642 = 16.42%) and are null, never 0, when their denominator is zero.

Authorizations

bearer

Client API key (POST /api-keys). Send as Authorization: Bearer epk_live_....

Type
HTTP (bearer)

Parameters

Path Parameters

id*

24-character hexadecimal Mongo ObjectId.

Type
string
Required
Pattern
"^[a-f0-9]{24}$"

Query Parameters

start_date*

Both ends are included in the range. The window is capped, and the cap depends on the resource AND on granularitydaily allows a much shorter span than total, and target-metrics and search-term-metrics are stricter than the rest because limit/offset bound the response but not what ClickHouse scans. Going over returns a 400 naming the exact limit for your request.

Type
string
Required
Example"2026-07-01"
Pattern
"^\\d{4}-\\d{2}-\\d{2}$"
end_date*

Both ends are included in the range. The window is capped, and the cap depends on the resource AND on granularitydaily allows a much shorter span than total, and target-metrics and search-term-metrics are stricter than the rest because limit/offset bound the response but not what ClickHouse scans. Going over returns a 400 naming the exact limit for your request.

Type
string
Required
Example"2026-07-31"
Pattern
"^\\d{4}-\\d{2}-\\d{2}$"
granularity
Type
string
Valid values
"total""daily"
Example"total"
Default
"total"
limit
Type
integer
Example100
Default
100
Minimum
1
Maximum
1000
offset
Type
integer
Example0
Default
0
Minimum
0
Maximum
9007199254740991
order
Type
string
Valid values
"asc""desc"
Example"desc"
Default
"desc"

Responses

200

application/json
JSON
{
  
"object": "string",
  
"data": [
  
  
{
  
  
  
"campaign": "string",
  
  
  
"campaign_name": "string",
  
  
  
"currency": "string",
  
  
  
"cost": "string",
  
  
  
"sales": "string",
  
  
  
"impressions": 0,
  
  
  
"clicks": 0,
  
  
  
"orders": 0,
  
  
  
"acos": 0,
  
  
  
"roas": 0,
  
  
  
"ctr": 0,
  
  
  
"conversion_rate": 0,
  
  
  
"objective_type": "string",
  
  
  
"objective_value": 0,
  
  
  
"optimizing_since": "string"
  
  
}
  
],
  
"has_more": true
}

Playground

Authorization
Variables
Key
Value

Samples


Powered by VitePress OpenAPI

Epinium Documentation