Skip to navigation

Get the metrics of an automation workflow

View as Markdown

Returns the performance of one automation workflow over a date range: how many contacts started, finished or were suspended, how many are in it now, its conversions, and its message metrics per channel (email, SMS, WhatsApp, push). With include=steps, it also returns the contact count of every step and the message metrics of each message step.

Give either date_range, or from_date and to_date together, or neither for all the data since the workflow was created. A metric that a channel does not report is null, never 0. Rates are fractions between 0 and 1, rounded to 4 decimals, and null when their denominator is 0.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

OR
AuthorizationBearer

OAuth 2.0 client_credentials (machine-to-machine) grant. Exchange your app’s client_id/client_secret for a short-lived Bearer token.

Path parameters

workflowIdlongRequired>=1
ID of the automation workflow

Query parameters

date_rangeenumOptional

A preset date range ending now. Cannot be combined with from_date or to_date.

Allowed values:
from_datestringOptional

Start of a custom date range, YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ. Required with to_date, and before it.

to_datestringOptional

End of a custom date range, YYYY-MM-DD or YYYY-MM-DDThh:mm:ssZ. Required with from_date.

includeenumOptional

steps adds the steps array to the response.

Allowed values:

Response

The workflow's metrics over the date range
idlongOptional
ID of the automation workflow
namestringOptional
Name of the automation workflow
statusenumOptional
Current status of the workflow
Allowed values:
date_rangeobjectOptional
The date range the metrics cover
throughputobjectOptional

Contacts over the date range, except active_now, which is a snapshot

conversionsobject or nullOptional

Conversion events attributed to the workflow’s message steps, each summed over the steps. null when the workflow has no conversion data, or conversion tracking is not enabled for the account.

channelsmap from strings to objectsOptional

Message metrics summed per channel, keyed by channel (email, sms, whatsapp, push). Only the channels the workflow sends through are present.

stepslist of objectsOptional

Only with include=steps. Every step of the workflow, in order.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
503
Service Unavailable Error