Skip to the documentation
API

Send a test email

Sends one email step of the draft to an address of your choice, filled in with sample values, so you can read it before anybody else does.

POST/automations/{id}/test

Runs the real call on your workspace.

POST /automations/{id}/test

Sends one email step of the draft to an address of your choice, filled in with sample values, so you can read it before anybody else does.

Example

Needs automations:write and emails:send.

curl
curl -X POST "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/test" -H "$AUTH" -H 'content-type: application/json' -d '{  "stepKey": "welcome",  "to": "[email protected]"}'
Response
{  "object": "automation_test",  "automationId": "aut_7c2e9a1f4b8d30c65e1a9f27",  "emailId": "msg_8cd0a316930b4482a8b8440b",  "to": "[email protected]",  "stepKey": "welcome"}

Leave to out and the test goes to the account email of the person the key or app acts for.

A test enrolls nobody and counts in no numbers. Its subject starts with [Test], and its unsubscribe link unsubscribes nobody.

stepKey has to name a send_email step of the draft, or the answer is 422 invalid_automation.

Reference