Triggering AJO API-triggered campaigns safely
By 16Labs · Updated
Short answer: call POST https://platform.adobe.io/ajo/im/executions/unitary with your campaign id and a synthetic recipient, in a development sandbox, and assert the 202 Accepted response and its executionId. There is no status endpoint for unitary executions, so to check the message itself, send it to an address you can read, such as a 16Labs Test Inbox, and assert on the email.
The request
POST https://platform.adobe.io/ajo/im/executions/unitary
Authorization: Bearer …
x-api-key: …
x-gw-ims-org-id: …
x-sandbox-name: …
Content-Type: application/json
{
"requestId": "rr-…",
"campaignId": "{CAMPAIGN_ID}",
"recipients": [{"type": "aep", "namespace": "email", "userId": "rr-…@example.com", "context": {…}}]
}
A request can have 1 to 20 recipients. Type aep targets an existing profile by namespace and id; type external targets someone who isn't a profile. The call times out after 60 seconds. Errors come back as 400, 401 or 503 with a report.
What you can assert
- 202 Accepted with an
executionId. This proves the campaign accepted the request. - The message itself. With a synthetic profile whose email is a 16Labs Test Inbox address, a loop test can wait for the email and check the subject, sender, body, links, SPF and DKIM.
What you can't assert through the API is the delivery status of a unitary execution: Adobe's specification only has status endpoints for audience executions and schedules.
Keep it safe
API-triggered campaigns send real messages. Run them only in a development sandbox, and only to synthetic recipients. The AEP Lab refuses production and default sandboxes, and refuses any request whose recipient isn't synthetic, so a mistyped sandbox or a real address in a test fixture is blocked before it is sent.