Skip to content

Transactional — Event

Fires an external event for one or more contacts. The event makes the contacts enter an automation at an externalEventEntry node, or releases the contacts waiting at an externalEvent node.

Endpoint

Method URL
POST /transactional/<transactional>/event/<payload>
  • <transactional> is the transactional object of the automation.
  • <payload> identifies the node. It is the Base64 encoding of {"type":"automation","node":"externalEventEntry","nodeId":<node_id>}, with "node":"externalEvent" for an externalEvent node. The automation editor shows the full event URL in the node's settings. You can also send payload as a parameter instead of in the path.

POST

Send the parameters form-encoded or in the query string. JSON bodies are not supported.

Parameter Type Description
email / email[] string / string array Contact email address(es), in lowercase
telephone / telephone[] string / string array Contact telephone number(s), same index as email[], in the same format as in the contact list

At least one of email or telephone is required, otherwise the request fails with Missing both telephone and email arguments.

  • Contacts are looked up in the transactional object's list by email and telephone, then by email, then by telephone.
  • A contact that does not exist is created. If the list uses double opt-in, it is created as pending and an opt-in email is sent; otherwise it is created as subscribed, which also starts the list's contactSignup automations.
  • With an externalEventEntry node, a contact that is already in the automation starts again from the node after the entry.
  • Nothing happens if the automation is disabled. The response does not say whether contacts were moved: check with GET /transactional/<transactional>/automation/<automation> and Stats.

Returns: success: true. The other keys of the response are internal and may change.

Example:

payload=$(printf '{"type":"automation","node":"externalEventEntry","nodeId":%d}' 31 | base64 | tr -d '\n')
curl -u "username:api_key" -H "Accept: application/json" -X POST \
  --data-urlencode "email=ana@example.com" \
  "https://app.duo.pt/transactional/{transactional_id}/event/$payload"