Creates a new event definition under the project.
curl --request POST \
--url https://api.autosend.com/v1/events \
--header 'Authorization: Bearer AS_your-project-api-key' \
--header 'Content-Type: application/json' \
--data '{
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{ "propertyName": "order_total", "type": "number", "description": "Total order value in USD" },
{ "propertyName": "currency", "type": "string", "suggestedValues": ["USD", "EUR", "GBP"] },
{ "propertyName": "is_first_purchase", "type": "boolean" }
]
}'
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{
"propertyName": "order_total",
"type": "number",
"description": "Total order value in USD",
"suggestedValues": []
},
{
"propertyName": "currency",
"type": "string",
"suggestedValues": ["USD", "EUR", "GBP"]
},
{
"propertyName": "is_first_purchase",
"type": "boolean",
"suggestedValues": []
}
],
"createdAt": "2026-05-08T10:00:00.000Z",
"updatedAt": "2026-05-08T10:00: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.
curl --request POST \
--url https://api.autosend.com/v1/events \
--header 'Authorization: Bearer AS_your-project-api-key' \
--header 'Content-Type: application/json' \
--data '{
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{ "propertyName": "order_total", "type": "number", "description": "Total order value in USD" },
{ "propertyName": "currency", "type": "string", "suggestedValues": ["USD", "EUR", "GBP"] },
{ "propertyName": "is_first_purchase", "type": "boolean" }
]
}'
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{
"propertyName": "order_total",
"type": "number",
"description": "Total order value in USD",
"suggestedValues": []
},
{
"propertyName": "currency",
"type": "string",
"suggestedValues": ["USD", "EUR", "GBP"]
},
{
"propertyName": "is_first_purchase",
"type": "boolean",
"suggestedValues": []
}
],
"createdAt": "2026-05-08T10:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}
AS_<key>.64Example: "order_completed""Fired when a customer completes a checkout"Show property attributes
64Example: "order_total"string, number, date, or boolean.Example: "number"type.Example: ["USD", "EUR", "GBP"]trueShow child attributes
null{
"success": false,
"error": {
"message": "Event name can only contain ASCII letters (a-z, A-Z), numbers (0-9), and underscores (_).",
"code": "INVALID_EVENT_NAME_CHARACTERS"
}
}
eventName already exists in the project.{
"success": false,
"error": {
"message": "Event with this name already exists in the project",
"code": "EVENT_ALREADY_EXISTS"
}
}
{
"success": false,
"error": {
"message": "Maximum number of events (100) reached for this project.",
"code": "MAX_EVENTS_REACHED"
}
}
curl --request POST \
--url https://api.autosend.com/v1/events \
--header 'Authorization: Bearer AS_your-project-api-key' \
--header 'Content-Type: application/json' \
--data '{
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{ "propertyName": "order_total", "type": "number", "description": "Total order value in USD" },
{ "propertyName": "currency", "type": "string", "suggestedValues": ["USD", "EUR", "GBP"] },
{ "propertyName": "is_first_purchase", "type": "boolean" }
]
}'
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{
"propertyName": "order_total",
"type": "number",
"description": "Total order value in USD",
"suggestedValues": []
},
{
"propertyName": "currency",
"type": "string",
"suggestedValues": ["USD", "EUR", "GBP"]
},
{
"propertyName": "is_first_purchase",
"type": "boolean",
"suggestedValues": []
}
],
"createdAt": "2026-05-08T10:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}