Back to API Overview
Site Events API
A site’s event log and catalog — emit events and inspect what a site can react to.
5 endpoints
Endpoints
POST
/api/v1/events/catalogList the events a site can react to: built-in and custom, with counts
Parameters
projectId | stringrequired | Site (project) id |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/events/catalog \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "example"
}'POST
/api/v1/events/describeSet or clear the description of an event in the catalog
Parameters
projectId | stringrequired | |
name | stringrequired | |
description | stringrequired |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/events/describe \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "example",
"name": "example",
"description": "example"
}'POST
/api/v1/events/getSettingsRead which events a site records
Parameters
projectId | stringrequired |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/events/getSettings \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "example"
}'POST
/api/v1/events/updateSettingsChange which events a site records (merges with what is stored)
Parameters
projectId | stringrequired | |
settings | objectrequired |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/events/updateSettings \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "example",
"settings": {}
}'POST
/api/v1/events/emitEmit a custom event for a site (owner or agent), e.g. cart_abandoned with properties
Parameters
projectId | stringrequired | |
name | stringrequired | |
subjectId | string | |
properties | object | |
idempotencyKey | string |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/events/emit \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"projectId": "example",
"name": "example",
"subjectId": "example"
}'