Skip to main content
POST
/
events
/
send
curl --request POST \
  --url https://api.autosend.com/v1/events/send \
  --header 'Authorization: Bearer AS_your-project-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "eventName": "order_completed",
  "email": "[email protected]",
  "eventProperties": {
    "order_total": 129.99,
    "currency": "USD",
    "is_first_purchase": true
  }
}'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b9999",
    "eventName": "order_completed",
    "contactId": "60d5ec49f1b2c72d9c8b8888",
    "properties": {
      "order_total": 129.99,
      "currency": "USD",
      "is_first_purchase": true
    },
    "createdAt": "2026-05-08T13:45:00.000Z"
  }
}
Records an event log for a contact. The eventName must match an existing event definition; supplied eventProperties are validated and coerced against the declared property schema. Either email or contactId is required to identify the contact.
Triggering an event also evaluates any active workflow automations whose entry criteria match this event name. The workflow evaluation is fire-and-forget — it never blocks the API response.
curl --request POST \
  --url https://api.autosend.com/v1/events/send \
  --header 'Authorization: Bearer AS_your-project-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "eventName": "order_completed",
  "email": "[email protected]",
  "eventProperties": {
    "order_total": 129.99,
    "currency": "USD",
    "is_first_purchase": true
  }
}'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b9999",
    "eventName": "order_completed",
    "contactId": "60d5ec49f1b2c72d9c8b8888",
    "properties": {
      "order_total": 129.99,
      "currency": "USD",
      "is_first_purchase": true
    },
    "createdAt": "2026-05-08T13:45:00.000Z"
  }
}

Authorizations

Authorizations
string | header
required
Project API key header of the form Bearer AS_<key>.

Body

eventName
string
required
Name of an existing event definition for this project.Example: "order_completed"
You must provide either email or contactId to identify the contact. Providing both is allowed - contactId takes precedence.
email
string
Email address of the contact this event belongs to.Example: "[email protected]"
contactId
string
ID of the contact this event belongs to.Example: "60d5ec49f1b2c72d9c8b8888"
eventProperties
object
Key/value map of property values. Each key must match a propertyName declared on the event definition; values are coerced to the declared type (string, number, date, or boolean). Unknown properties are rejected.Example: { "order_total": 129.99, "currency": "USD" }

Response

Event recorded (201)
success
boolean
Example: true
data
object
The recorded event log

Error Responses

400 - Missing identifier
object
Returned when neither email nor contactId is provided.
{
  "success": false,
  "error": {
    "message": "Either email or contactId is required",
    "code": "EMAIL_OR_CONTACT_ID_REQUIRED"
  }
}
404 - Contact not found
object
{
  "success": false,
  "error": {
    "message": "Contact not found for the provided email or contactId",
    "code": "CONTACT_NOT_FOUND_FOR_EVENT"
  }
}
404 - Event not found
object
{
  "success": false,
  "error": {
    "message": "Event not found",
    "code": "EVENT_NOT_FOUND"
  }
}
400 - Unknown property
object
Returned when eventProperties contains a key not declared on the event definition.
{
  "success": false,
  "error": {
    "message": "Property \"foo\" is not declared on event \"order_completed\"",
    "code": "UNKNOWN_PROPERTY"
  }
}
400 - Invalid property value
object
Returned when a property value cannot be coerced to its declared type.
{
  "success": false,
  "error": {
    "message": "Property \"order_total\" must be a number",
    "code": "INVALID_PROPERTY_VALUE"
  }
}