Skip to main content
POST
/
v2
/
automations
/
event
curl --location --request POST 'https://api.audienceful.com/v2/automations/event' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <your-api-key>' \
--data-raw '{
    "email": "[email protected]",
    "event": "signed_up",
    "event_properties": {
        "reset-link": "https://website.com/reset"
    },
    "add_person": true,
    "fields": {
        "plan": "pro"
    }
}'
import requests

url = "https://api.audienceful.com/v2/automations/event"
headers = {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
}
payload = {
    "email": "[email protected]",
    "event": "signed_up",
    "event_properties": {
        "reset-link": "https://website.com/reset",
    },
    "add_person": True,
    "fields": {
        "plan": "pro",
    },
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.audienceful.com/v2/automations/event", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
  },
  body: JSON.stringify({
    "email": "[email protected]",
    "event": "signed_up",
    "event_properties": {
      "reset-link": "https://website.com/reset"
    },
    "add_person": true,
    "fields": {
      "plan": "pro"
    }
  }),
});
const data = await response.json();
console.log(data);
{
  "operation_id": "task-abc123",
  "operation_url": "https://api.audienceful.com/v2/operations/task-abc123",
  "status": "pending",
  "event": "signed_up",
  "email": "[email protected]"
}
Requires the events:write scope. Triggering an event enrolls the contact in any automations whose trigger matches the event name. Processed asynchronously — the response returns immediately with an operation_id.

Body

email
string
required
The email of the contact to trigger the event for.
event
string
required
The name of the custom event trigger to fire (case-insensitive). Must match an event defined in the workspace — an unknown event returns a 404. List available events with List Automation Events.
event_properties
object
An optional dictionary of event properties. These are used for inserting custom content into the emails in the automation that reference a matching data variable.
add_person
boolean
default:"true"
Create the contact if they don’t already exist.
fields
object
Custom field values to set on the contact, keyed by each field’s data_name.

Response

Returns 202 Accepted.
operation_id
string
The id of the async operation.
operation_url
string
The full URL of the operation — poll it to watch the trigger progress from pendingprocessingsucceeded.
status
string
The operation’s initial status, pending. Poll the operation to see it move as it is processed.
event
string
The name of the event that was triggered.
email
string
The email the event was triggered for.
curl --location --request POST 'https://api.audienceful.com/v2/automations/event' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <your-api-key>' \
--data-raw '{
    "email": "[email protected]",
    "event": "signed_up",
    "event_properties": {
        "reset-link": "https://website.com/reset"
    },
    "add_person": true,
    "fields": {
        "plan": "pro"
    }
}'
import requests

url = "https://api.audienceful.com/v2/automations/event"
headers = {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
}
payload = {
    "email": "[email protected]",
    "event": "signed_up",
    "event_properties": {
        "reset-link": "https://website.com/reset",
    },
    "add_person": True,
    "fields": {
        "plan": "pro",
    },
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.audienceful.com/v2/automations/event", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": "<your-api-key>",
  },
  body: JSON.stringify({
    "email": "[email protected]",
    "event": "signed_up",
    "event_properties": {
      "reset-link": "https://website.com/reset"
    },
    "add_person": true,
    "fields": {
      "plan": "pro"
    }
  }),
});
const data = await response.json();
console.log(data);
{
  "operation_id": "task-abc123",
  "operation_url": "https://api.audienceful.com/v2/operations/task-abc123",
  "status": "pending",
  "event": "signed_up",
  "email": "[email protected]"
}