Skip to main content

Targeting API

API for Targeting

Quick Startโ€‹

# List available operations
epilot targeting

# Call an operation
epilot targeting changeCampaignStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

Common Flagsโ€‹

FlagDescription
-p key=valueSet a named parameter
-d '{...}'Request body JSON
-H 'Key: Value'Custom header
-t, --token <token>Bearer token for authentication
--profile <name>Use a named profile
-s, --server <url>Override server base URL
-i, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operationsโ€‹

Campaign

  • changeCampaignStatus โ€” Change the status of a campaign to a desired status.
  • getCampaignJobStatus โ€” Get the status of a campaign's automation job
  • getCampaignPortals โ€” Get the list of portals and its widgets where the campaign is used.
  • setupCampaign โ€” Creates a campaign entity together with its related entities and configurations in a single call.
  • matchCampaigns โ€” Match campaigns based on target entities.
  • discoverCampaigns โ€” Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.

Campaign Delivery

Target

  • matchTargets โ€” Find targets from the provided list that include the provide entities.
  • getTargetQueries โ€” Transform target filters into Lucene queries for the provided target IDs.

Campaign Recipient

changeCampaignStatusโ€‹

Change the status of a campaign to a desired status.

POST /v1/campaign/{campaign_id}/status

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID

Sample Call

epilot targeting changeCampaignStatus \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

Using positional args for path parameters:

epilot targeting changeCampaignStatus b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting changeCampaignStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'campaign'
Sample Response
{
"campaign": {
"_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"_org": "string",
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_schema": "string",
"_title": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"goal": "string",
"status": "draft",
"start_date": "1970-01-01",
"end_date": "1970-01-01",
"flow_id": "string",
"job_id": "string",
"target": {
"$relation": [
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"_tags": ["string"]
}
]
}
}
}

getCampaignJobStatusโ€‹

Get the status of a campaign's automation job

GET /v1/campaign/{campaign_id}/job

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID

Sample Call

epilot targeting getCampaignJobStatus \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

Using positional args for path parameters:

epilot targeting getCampaignJobStatus b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting getCampaignJobStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'status'
Sample Response
{
"status": "queued",
"execution_summary": [
{
"execution_id": "string",
"execution_status": "string"
}
]
}

getCampaignPortalsโ€‹

Get the list of portals and its widgets where the campaign is used.

GET /v1/campaign/{campaign_id}/portals

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID

Sample Call

epilot targeting getCampaignPortals \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

Using positional args for path parameters:

epilot targeting getCampaignPortals b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting getCampaignPortals -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata '$'
Sample Response
[
{
"portal": {
"origin": "string",
"domain": "string",
"name": "string"
},
"widgets": [
{
"id": "string",
"headline": {
"en": "string",
"de": "string"
}
}
]
}
]

retriggerCampaignAutomationsโ€‹

Retrigger automation executions for specific campaign recipients that have failed.

POST /v1/campaign/{campaign_id}/automations:retrigger

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID

Request Body (required)

Sample Call

epilot targeting retriggerCampaignAutomations \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-d '{"recipient_ids":["3fa85f64-5717-4562-b3fc-2c963f66afa6"]}'

Using positional args for path parameters:

epilot targeting retriggerCampaignAutomations b8c01433-5556-4e2b-aad4-6f5348d1df84

Using stdin pipe:

cat body.json | epilot targeting retriggerCampaignAutomations -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting retriggerCampaignAutomations -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'results[0]'
Sample Response
{
"message": "string",
"results": [
{
"recipient_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": "success",
"execution_id": "string",
"error": "string"
}
]
}

setupCampaignโ€‹

Creates a campaign entity together with its related entities and configurations in a single call.

POST /v1/campaign:setup

Request Body (required)

Sample Call

epilot targeting setupCampaign

With request body:

epilot targeting setupCampaign \
-d '{
"type": "tariff_change",
"product_recommendation": {
"name": "string",
"source_product_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"source_price_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"offers": [
{
"target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"items": [
{
"product_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"price_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"highlight_config": {}
}
]
}
]
},
"campaign": {
"name": "string",
"goal": "string",
"target_ids": ["b8c01433-5556-4e2b-aad4-6f5348d1df84"]
},
"journey": {
"journey_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"
},
"channels": {
"portal_widget": {
"portal_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"block_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"
},
"email": {
"automation_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"template_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"
}
}
}'

Using stdin pipe:

cat body.json | epilot targeting setupCampaign

With JSONata filter:

epilot targeting setupCampaign --jsonata '$'
Sample Response
{
"type": "tariff_change",
"product_recommendation_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"journey_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"portal_widget_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"
}

matchCampaignsโ€‹

Match campaigns based on target entities.

POST /v1/campaign:match

Request Body (required)

Sample Call

epilot targeting matchCampaigns

With request body:

epilot targeting matchCampaigns \
-d '{
"entity_refs": [
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string"
}
],
"campaign_ids": ["b8c01433-5556-4e2b-aad4-6f5348d1df84"]
}'

Using stdin pipe:

cat body.json | epilot targeting matchCampaigns

With JSONata filter:

epilot targeting matchCampaigns --jsonata 'results[0]'
Sample Response
{
"hits": 0,
"results": [
{
"campaign": {
"_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"_org": "string",
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_schema": "string",
"_title": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"goal": "string",
"status": "draft",
"start_date": "1970-01-01",
"end_date": "1970-01-01",
"flow_id": "string",
"job_id": "string",
"target": {
"$relation": [
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"_tags": ["string"]
}
]
}
}
}
]
}

discoverCampaignsโ€‹

Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.

POST /v1/campaign:discover

Request Body (required)

Sample Call

epilot targeting discoverCampaigns \
-d '{"entity_id":"b8c01433-5556-4e2b-aad4-6f5348d1df84","entity_schema":"string"}'

Using stdin pipe:

cat body.json | epilot targeting discoverCampaigns

With JSONata filter:

epilot targeting discoverCampaigns --jsonata 'results[0]'
Sample Response
{
"hits": 0,
"results": [
{
"campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"nba": {
"category": "string",
"icon": {
"name": "string",
"color": "string"
},
"title": "string",
"body": "string",
"priority": "medium",
"is_dismissable": true,
"cta": {
"type": "journey",
"target": "string",
"context_params": [
{
"key": "string",
"value": "string"
}
]
}
},
"status": "seen",
"status_updated_at": "1970-01-01T00:00:00.000Z"
}
],
"dismissed": [
{
"campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"nba": {
"category": "string",
"icon": {
"name": "string",
"color": "string"
},
"title": "string",
"body": "string",
"priority": "medium",
"is_dismissable": true,
"cta": {
"type": "journey",
"target": "string",
"context_params": [
{
"key": "string",
"value": "string"
}
]
}
},
"status": "seen",
"status_updated_at": "1970-01-01T00:00:00.000Z"
}
]
}

matchTargetsโ€‹

Find targets from the provided list that include the provide entities.

POST /v1/target:match

Request Body (required)

Sample Call

epilot targeting matchTargets

With request body:

epilot targeting matchTargets \
-d '{
"entity_refs": [
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string"
}
],
"target_ids": ["b8c01433-5556-4e2b-aad4-6f5348d1df84"]
}'

Using stdin pipe:

cat body.json | epilot targeting matchTargets

With JSONata filter:

epilot targeting matchTargets --jsonata 'results[0]'
Sample Response
{
"hits": 0,
"results": [
{
"target": {
"_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"_org": "string",
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_schema": "string",
"_title": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {}
}
}
]
}

getTargetQueriesโ€‹

Transform target filters into Lucene queries for the provided target IDs.

POST /v1/target/queries

Request Body (required)

Sample Call

epilot targeting getTargetQueries \
-d '{"target_ids":["b8c01433-5556-4e2b-aad4-6f5348d1df84"]}'

Using stdin pipe:

cat body.json | epilot targeting getTargetQueries

With JSONata filter:

epilot targeting getTargetQueries --jsonata 'results[0]'
Sample Response
{
"results": [
{
"target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"query": "string",
"error": "string"
}
]
}

createRecipientโ€‹

Creates a new recipient associated with a campaign.

POST /v1/campaign/{campaign_id}/recipient

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID

Request Body (required)

Sample Call

epilot targeting createRecipient \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

With request body:

epilot targeting createRecipient \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-d '{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string",
"automation_status": "pending",
"automation_execution_id": "string"
}'

Using positional args for path parameters:

epilot targeting createRecipient b8c01433-5556-4e2b-aad4-6f5348d1df84

Using stdin pipe:

cat body.json | epilot targeting createRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting createRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id'
Sample Response
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string",
"title": "string",
"automation_status": "pending",
"automation_execution_id": "string",
"portal_status": "sent",
"portal_status_updated_at": "1970-01-01T00:00:00.000Z",
"portal_state": {},
"entity_ui_status": "seen",
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
"entity_ui_status_before_dismiss": "seen",
"message_entity_id": "string",
"email_status": "sent",
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
"email_bounce_type": "permanent",
"email_bounce_subtype": "string",
"email_complaint_type": "string",
"email_bounce_reason": "string",
"email_send_error": {},
"email_unsubscribed_at": "1970-01-01T00:00:00.000Z",
"email_open_count": 0,
"email_first_opened_at": "1970-01-01T00:00:00.000Z",
"email_last_opened_at": "1970-01-01T00:00:00.000Z",
"email_click_count": 0,
"email_first_clicked_at": "1970-01-01T00:00:00.000Z",
"email_clicked_links": [
{
"url": "string",
"clicked_at": "1970-01-01T00:00:00.000Z"
}
],
"updated_at": "1970-01-01T00:00:00.000Z"
}

updateRecipientโ€‹

Updates a recipient's attributes.

PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID
recipient_idpathstring (uuid)YesThe entity ID of the recipient

Request Body (required)

Sample Call

epilot targeting updateRecipient \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-d '{"automation_status":"pending","automation_execution_id":"string","portal_status":"sent","portal_state":{}}'

Using positional args for path parameters:

epilot targeting updateRecipient b8c01433-5556-4e2b-aad4-6f5348d1df84 b8c01433-5556-4e2b-aad4-6f5348d1df84

Using stdin pipe:

cat body.json | epilot targeting updateRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting updateRecipient -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id'
Sample Response
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string",
"title": "string",
"automation_status": "pending",
"automation_execution_id": "string",
"portal_status": "sent",
"portal_status_updated_at": "1970-01-01T00:00:00.000Z",
"portal_state": {},
"entity_ui_status": "seen",
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
"entity_ui_status_before_dismiss": "seen",
"message_entity_id": "string",
"email_status": "sent",
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
"email_bounce_type": "permanent",
"email_bounce_subtype": "string",
"email_complaint_type": "string",
"email_bounce_reason": "string",
"email_send_error": {},
"email_unsubscribed_at": "1970-01-01T00:00:00.000Z",
"email_open_count": 0,
"email_first_opened_at": "1970-01-01T00:00:00.000Z",
"email_last_opened_at": "1970-01-01T00:00:00.000Z",
"email_click_count": 0,
"email_first_clicked_at": "1970-01-01T00:00:00.000Z",
"email_clicked_links": [
{
"url": "string",
"clicked_at": "1970-01-01T00:00:00.000Z"
}
],
"updated_at": "1970-01-01T00:00:00.000Z"
}

updateRecipientPortalStatusโ€‹

Updates the portal status for a specific campaign recipient.

PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID
recipient_idpathstring (uuid)YesThe entity ID of the recipient

Request Body (required)

Sample Call

epilot targeting updateRecipientPortalStatus \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-d '{"status":"sent"}'

Using positional args for path parameters:

epilot targeting updateRecipientPortalStatus b8c01433-5556-4e2b-aad4-6f5348d1df84 b8c01433-5556-4e2b-aad4-6f5348d1df84

Using stdin pipe:

cat body.json | epilot targeting updateRecipientPortalStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting updateRecipientPortalStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id'
Sample Response
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string",
"title": "string",
"automation_status": "pending",
"automation_execution_id": "string",
"portal_status": "sent",
"portal_status_updated_at": "1970-01-01T00:00:00.000Z",
"portal_state": {},
"entity_ui_status": "seen",
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
"entity_ui_status_before_dismiss": "seen",
"message_entity_id": "string",
"email_status": "sent",
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
"email_bounce_type": "permanent",
"email_bounce_subtype": "string",
"email_complaint_type": "string",
"email_bounce_reason": "string",
"email_send_error": {},
"email_unsubscribed_at": "1970-01-01T00:00:00.000Z",
"email_open_count": 0,
"email_first_opened_at": "1970-01-01T00:00:00.000Z",
"email_last_opened_at": "1970-01-01T00:00:00.000Z",
"email_click_count": 0,
"email_first_clicked_at": "1970-01-01T00:00:00.000Z",
"email_clicked_links": [
{
"url": "string",
"clicked_at": "1970-01-01T00:00:00.000Z"
}
],
"updated_at": "1970-01-01T00:00:00.000Z"
}

updateRecipientEntityUiStatusโ€‹

Records a Next Best Action interaction for a recipient on the Entity-UI channel.

PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:status

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID
recipient_idpathstring (uuid)YesThe entity ID of the recipient

Request Body (required)

Sample Call

epilot targeting updateRecipientEntityUiStatus \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-d '{"status":"seen","entity_schema":"string"}'

Using positional args for path parameters:

epilot targeting updateRecipientEntityUiStatus b8c01433-5556-4e2b-aad4-6f5348d1df84 b8c01433-5556-4e2b-aad4-6f5348d1df84

Using stdin pipe:

cat body.json | epilot targeting updateRecipientEntityUiStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting updateRecipientEntityUiStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id'
Sample Response
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string",
"title": "string",
"automation_status": "pending",
"automation_execution_id": "string",
"portal_status": "sent",
"portal_status_updated_at": "1970-01-01T00:00:00.000Z",
"portal_state": {},
"entity_ui_status": "seen",
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
"entity_ui_status_before_dismiss": "seen",
"message_entity_id": "string",
"email_status": "sent",
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
"email_bounce_type": "permanent",
"email_bounce_subtype": "string",
"email_complaint_type": "string",
"email_bounce_reason": "string",
"email_send_error": {},
"email_unsubscribed_at": "1970-01-01T00:00:00.000Z",
"email_open_count": 0,
"email_first_opened_at": "1970-01-01T00:00:00.000Z",
"email_last_opened_at": "1970-01-01T00:00:00.000Z",
"email_click_count": 0,
"email_first_clicked_at": "1970-01-01T00:00:00.000Z",
"email_clicked_links": [
{
"url": "string",
"clicked_at": "1970-01-01T00:00:00.000Z"
}
],
"updated_at": "1970-01-01T00:00:00.000Z"
}

restoreRecipientEntityUiStatusโ€‹

Reverses a dismissal so the Next Best Action becomes visible to the entity again. This is

POST /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:restore

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID
recipient_idpathstring (uuid)YesThe entity ID of the recipient

Sample Call

epilot targeting restoreRecipientEntityUiStatus \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 \
-p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

Using positional args for path parameters:

epilot targeting restoreRecipientEntityUiStatus b8c01433-5556-4e2b-aad4-6f5348d1df84 b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting restoreRecipientEntityUiStatus -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 -p recipient_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'entity_id'
Sample Response
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string",
"title": "string",
"automation_status": "pending",
"automation_execution_id": "string",
"portal_status": "sent",
"portal_status_updated_at": "1970-01-01T00:00:00.000Z",
"portal_state": {},
"entity_ui_status": "seen",
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
"entity_ui_status_before_dismiss": "seen",
"message_entity_id": "string",
"email_status": "sent",
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
"email_bounce_type": "permanent",
"email_bounce_subtype": "string",
"email_complaint_type": "string",
"email_bounce_reason": "string",
"email_send_error": {},
"email_unsubscribed_at": "1970-01-01T00:00:00.000Z",
"email_open_count": 0,
"email_first_opened_at": "1970-01-01T00:00:00.000Z",
"email_last_opened_at": "1970-01-01T00:00:00.000Z",
"email_click_count": 0,
"email_first_clicked_at": "1970-01-01T00:00:00.000Z",
"email_clicked_links": [
{
"url": "string",
"clicked_at": "1970-01-01T00:00:00.000Z"
}
],
"updated_at": "1970-01-01T00:00:00.000Z"
}

getRecipientsโ€‹

Get a paginated list of recipients for a campaign.

GET /v1/campaign/{campaign_id}/recipients

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID
limitquerynumberNoNumber of items to return
nextquerystringNoCursor for pagination
qquerystringNoSearch by recipient title
automation_statusquery"pending" | "in_progress" | "success" | "failed" | "cancelled"[]NoFilter by automation status. Repeat the parameter to match multiple

statuses in one request (e.g. automation_status=failed&automation_status=cancelled). | | portal_status | query | "sent" | "seen" | "dismissed" | "clicked" | No | Filter by portal status | | email_status | query | "sent" | "delivered" | "bounced" | "complained" | "failed" | No | Filter by email delivery status (e.g. bounced, delivered). The response total reflects the count for the filtered status. |

Sample Call

epilot targeting getRecipients \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

Using positional args for path parameters:

epilot targeting getRecipients b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting getRecipients -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'results[0]'
Sample Response
{
"results": [
{
"entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
"entity_schema": "string",
"title": "string",
"automation_status": "pending",
"automation_execution_id": "string",
"portal_status": "sent",
"portal_status_updated_at": "1970-01-01T00:00:00.000Z",
"portal_state": {},
"entity_ui_status": "seen",
"entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",
"entity_ui_status_before_dismiss": "seen",
"message_entity_id": "string",
"email_status": "sent",
"email_status_updated_at": "1970-01-01T00:00:00.000Z",
"email_bounce_type": "permanent",
"email_bounce_subtype": "string",
"email_complaint_type": "string",
"email_bounce_reason": "string",
"email_send_error": {},
"email_unsubscribed_at": "1970-01-01T00:00:00.000Z",
"email_open_count": 0,
"email_first_opened_at": "1970-01-01T00:00:00.000Z",
"email_last_opened_at": "1970-01-01T00:00:00.000Z",
"email_click_count": 0,
"email_first_clicked_at": "1970-01-01T00:00:00.000Z",
"email_clicked_links": [
{
"url": "string",
"clicked_at": "1970-01-01T00:00:00.000Z"
}
],
"updated_at": "1970-01-01T00:00:00.000Z"
}
],
"next": "string",
"total": 0
}

getEmailStatsโ€‹

Aggregate email delivery counts for a campaign, for the KPI summary on the campaign UI.

GET /v1/campaign/{campaign_id}/email-stats

Parameters

NameInTypeRequiredDescription
campaign_idpathstring (uuid)YesThe campaign ID

Sample Call

epilot targeting getEmailStats \
-p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84

Using positional args for path parameters:

epilot targeting getEmailStats b8c01433-5556-4e2b-aad4-6f5348d1df84

With JSONata filter:

epilot targeting getEmailStats -p campaign_id=b8c01433-5556-4e2b-aad4-6f5348d1df84 --jsonata 'total_emailed'
Sample Response
{
"total_emailed": 0,
"sent": 0,
"delivered": 0,
"bounced": 0,
"bounced_hard": 0,
"bounced_soft": 0,
"complained": 0,
"failed": 0,
"unsubscribed": 0,
"opened": 0,
"clicked": 0,
"total_opens": 0,
"total_clicks": 0
}