Use the /events endpoint to create or update events for one or more apps in a single request. This is useful for maintaining consistent event definitions across multiple apps.
Create or update events
Create new events or update existing events for one or more apps. The API matches events by name—if an event with the same name already exists, it will be updated.
API protocol
Endpoint: https://automate.adjust.com/app-automation/events
Method: POST
Request body: Events Request Payload
Response: Events Result
Parameters
| Parameter | Data type | Required | Description |
|---|---|---|---|
app_tokens | Array[String] | Yes | List of app tokens to create/update events for. |
events | Array[Object] | Yes | List of event definitions. See Event Object. |
Event object
| Parameter | Data type | Required | Description |
|---|---|---|---|
name | String | Yes | Name of the event. Used as the unique identifier. |
unique | Boolean | No | Whether the event should be counted as unique per user. Default: false. |
Example
Create events for multiple apps
curl --location 'https://automate.adjust.com/app-automation/events' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "app_tokens": ["abc123xyz", "def456uvw", "ghi789rst"], "events": [ { "name": "purchase", "unique": false }, { "name": "registration", "unique": true }, { "name": "level_complete", "unique": false }, { "name": "add_to_cart", "unique": false } ]}'{ "successes": [ { "app_token": "abc123xyz", "event": { "id": 12345, "name": "purchase", "token": "abc1de", "unique": false, "autogenerated": false, "archived": false } }, { "app_token": "abc123xyz", "event": { "id": 12346, "name": "registration", "token": "fgh2ij", "unique": true, "autogenerated": false, "archived": false } }, { "app_token": "def456uvw", "event": { "id": 12347, "name": "purchase", "token": "klm3no", "unique": false, "autogenerated": false, "archived": false } } ], "failures": [ { "app_token": "ghi789rst", "name": "purchase", "details": "App not found" } ]}Create a single event
curl --location 'https://automate.adjust.com/app-automation/events' \--header 'Authorization: Bearer {your-adjust-api-token}' \--header 'Content-Type: application/json' \--data '{ "app_tokens": ["abc123xyz"], "events": [ { "name": "tutorial_complete", "unique": true } ]}'{ "successes": [ { "app_token": "abc123xyz", "event": { "id": 12348, "name": "tutorial_complete", "token": "pqr4st", "unique": true, "autogenerated": false, "archived": false } } ], "failures": []}Understanding event tokens
When you create an event, Adjust generates a unique event token. This token is used when sending events from the Adjust SDK:
- Event name: Human-readable identifier you define (e.g.,
purchase) - Event token: System-generated identifier used in SDK calls (e.g.,
abc1de)
Unique events
Set unique: true for events that should only be counted once per user. This is useful for events like:
- First purchase
- Registration
- First app launch
- Subscription start
For events that can occur multiple times per user (like level completions or in-app purchases), set unique: false.
Error handling
The API processes events for each app independently. If an event fails for one app, it doesn’t affect other apps. Check both successes and failures arrays in the response.
Common failure reasons:
| Reason | Description |
|---|---|
| App not found | The app token doesn’t exist or you don’t have access to it. |
| Event name invalid | The event name contains invalid characters or is too long. |
| Duplicate event | An event with the same name already exists (this is not an error—the event will be updated). |
Data models
Events Request Payload
| Parameter | Data type | Description |
|---|---|---|
app_tokens* | Array[String] | List of Adjust app tokens to create/update events for. |
events* | Array[Object] | List of event definitions. |
Event Definition
| Parameter | Data type | Description |
|---|---|---|
name* | String | Name of the event. |
unique | Boolean | Whether the event is unique per user. Default: false. |
Events Result
| Parameter | Data type | Description |
|---|---|---|
successes | Array[Object] | List of successfully created/updated events. |
failures | Array[Object] | List of failed event operations. |
Event Success
| Parameter | Data type | Description |
|---|---|---|
app_token* | String | The app token the event belongs to. |
event* | Object | The created/updated event details. |
Event Details
| Parameter | Data type | Description |
|---|---|---|
id* | Integer | Internal event ID. |
name* | String | Event name. |
token* | String | Event token for SDK integration. |
unique* | Boolean | Whether the event is unique per user. |
autogenerated | Boolean | Whether the event was auto-generated. Default: false. |
archived | Boolean | Whether the event is archived. Default: false. |
callback_url | String | Callback URL for this event. |
Event Failure
| Parameter | Data type | Description |
|---|---|---|
app_token* | String | The app token the operation failed for. |
name* | String | The event name that failed. |
details* | String | Description of what went wrong. |