Skip to main content
PATCH
/
events
/
eventName
/
{eventName}
curl --request PATCH \
  --url https://api.autosend.com/v1/events/eventName/order_completed \
  --header 'Authorization: Bearer AS_your-project-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Updated: fired on successful checkout",
  "properties": [
    { "propertyName": "order_total", "type": "number" },
    { "propertyName": "currency", "type": "string", "suggestedValues": ["USD", "EUR"] },
    { "propertyName": "coupon_code", "type": "string" }
  ]
}'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b1234",
    "eventName": "order_completed",
    "description": "Updated: fired on successful checkout",
    "properties": [
      { "propertyName": "order_total", "type": "number", "suggestedValues": [] },
      { "propertyName": "currency", "type": "string", "suggestedValues": ["USD", "EUR"] },
      { "propertyName": "coupon_code", "type": "string", "suggestedValues": [] }
    ],
    "createdAt": "2026-05-08T10:00:00.000Z",
    "updatedAt": "2026-05-08T11:30: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.

Updates the description and/or properties schema of an existing event definition. The eventName itself cannot be changed — to rename, create a new event and delete the old one.
When properties is provided, the supplied array fully replaces the existing property schema. Properties not included in the request will be removed.
curl --request PATCH \
  --url https://api.autosend.com/v1/events/eventName/order_completed \
  --header 'Authorization: Bearer AS_your-project-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Updated: fired on successful checkout",
  "properties": [
    { "propertyName": "order_total", "type": "number" },
    { "propertyName": "currency", "type": "string", "suggestedValues": ["USD", "EUR"] },
    { "propertyName": "coupon_code", "type": "string" }
  ]
}'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b1234",
    "eventName": "order_completed",
    "description": "Updated: fired on successful checkout",
    "properties": [
      { "propertyName": "order_total", "type": "number", "suggestedValues": [] },
      { "propertyName": "currency", "type": "string", "suggestedValues": ["USD", "EUR"] },
      { "propertyName": "coupon_code", "type": "string", "suggestedValues": [] }
    ],
    "createdAt": "2026-05-08T10:00:00.000Z",
    "updatedAt": "2026-05-08T11:30:00.000Z"
  }
}

Authorizations

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

Path Parameters

eventName
string
required
Name of the event to update.Example: "order_completed"

Body

At least one of description or properties must be provided.
description
string
New human-readable description for the event.
properties
object[]
Replacement property schema. Up to 50 properties per event. See Create Event for the property object shape.

Response

Event updated successfully
success
boolean
Example: true
data
object
The updated event definition (same shape as Get Event).

Error Responses

400 - No data to update
object
Returned when neither description nor properties is provided.
{
  "success": false,
  "error": {
    "message": "No data to update",
    "code": "NO_DATA_TO_UPDATE"
  }
}
404 - Event not found
object
{
  "success": false,
  "error": {
    "message": "Event not found",
    "code": "EVENT_NOT_FOUND"
  }
}