Records an event log for a contact. The eventName must match an existing event definition; properties are validated and coerced against the declared schema.
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"
}
}
Documentation Index
Fetch the complete documentation index at: https://docs.autosend.com/llms.txt
Use this file to discover all available pages before exploring further.
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.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"
}
}
AS_<key>."order_completed"email or contactId must be provided.Example: "[email protected]"email or contactId must be provided.Example: "60d5ec49f1b2c72d9c8b8888"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" }trueemail nor contactId is provided.{
"success": false,
"error": {
"message": "Either email or contactId is required",
"code": "EMAIL_OR_CONTACT_ID_REQUIRED"
}
}
{
"success": false,
"error": {
"message": "Contact not found for the provided email or contactId",
"code": "CONTACT_NOT_FOUND_FOR_EVENT"
}
}
{
"success": false,
"error": {
"message": "Event not found",
"code": "EVENT_NOT_FOUND"
}
}
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"
}
}
{
"success": false,
"error": {
"message": "Property \"order_total\" must be a number",
"code": "INVALID_PROPERTY_VALUE"
}
}
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"
}
}