Skip to main content
POST
/
automations
/
{templateId}
/
invoke
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: 'My API Key',
});

const automationInvokeResponse = await client.automations.invoke.invokeByTemplate('templateId', {
  recipient: 'recipient',
});

console.log(automationInvokeResponse.runId);
{
  "runId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

templateId
string
required

A unique identifier representing the automation template to be invoked. This could be the Automation Template ID or the Automation Template Alias.

Body

application/json
recipient
string | null
required
brand
string | null
data
object | null
profile
object | null
template
string | null

Response

200 - application/json
runId
string
required