Search for a command to run...
v1
Create and manage events (goals) for a site.
Permissions: Requires read access to the site (all-sites-readonly, read:{site_id} or manage:{site_id}).
Return a list of all events this site owns. Events are sorted by created_at ascending to allow you to paginate with ease.
currency field is only populated on Create and Update responses; it is returned as null on list and get responses.site_idstringrequiredCDBUGSlimitintegeroptional10starting_afterstringoptionalstarting_after is an object ID that defines your place in the list. For example, if you make a list request and receive 10 objects ending with obj_foo, your subsequent call can include starting_after=obj_foo to fetch the next page.ending_beforestringoptionalstarting_after. ending_before is an object ID that defines your place in the list.A list of event objects.
curl "https://api.usefathom.com/v1/sites/CDBUGS/events" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"object": "list",
"url": "/v1/sites/CDBUGS/events",
"has_more": false,
"data": [
{
"id": "ABCDEFGH",
"object": "event",
"name": "Signed up to newsletter",
"currency": null,
"created_at": "2020-08-21 15:24:00"
},
{
"id": "IJKLMNOP",
"object": "event",
"name": "Purchased product",
"currency": null,
"created_at": "2020-08-21 15:24:00"
}
]
}Permissions: Requires read access to the site (all-sites-readonly, read:{site_id} or manage:{site_id}).
Return a single event.
site_idstringrequiredCDBUGSevent_idstringrequiredid (tracking code) of the event, as returned when the event was created.ABCDEFGHAn event object.
curl "https://api.usefathom.com/v1/sites/CDBUGS/events/ABCDEFGH" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"id": "ABCDEFGH",
"object": "event",
"name": "Signed up to newsletter",
"currency": null,
"created_at": "2020-08-21 15:24:00"
}Permissions: Requires write access to the site (manage:{site_id}).
Create an event.
site_idstringrequiredCDBUGSnamestringrequiredPurchase early accesscurrencystringoptionaldollar.dollarOptions:dollarpoundeuroyuanpesoshekelyenwonhryvniafrancrupeeintegernoneAn event object.
curl -X POST "https://api.usefathom.com/v1/sites/CDBUGS/events" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Purchase early access"
}'{
"id": "ABCDEFGH",
"object": "event",
"name": "Purchase early access",
"currency": "dollar",
"created_at": "2021-08-10 10:45:43"
}Permissions: Requires write access to the site (manage:{site_id}).
Update an event. Send only the fields you want to change.
site_idstringrequiredCDBUGSevent_idstringrequiredid (tracking code) of the event you wish to update.ABCDEFGHnamestringoptionalcurrencystringoptionaldollarpoundeuroyuanpesoshekelyenwonhryvniafrancrupeeintegernoneAn event object.
curl -X POST "https://api.usefathom.com/v1/sites/CDBUGS/events/ABCDEFGH" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"id": "ABCDEFGH",
"object": "event",
"name": "Purchase early access (live)",
"currency": "dollar",
"created_at": "2021-08-10 10:45:43"
}This endpoint is no longer available
410 Gone. It is no longer possible to wipe an event's completion data via the API.Previously wiped all completion data belonging to an event. This endpoint is no longer available.
site_idstringrequiredCDBUGSevent_idstringrequiredid (tracking code) of the event.Permissions: Requires write access to the site (manage:{site_id}).
Delete an event. Careful — you can't undo this, and neither can we.
site_idstringrequiredCDBUGSevent_idstringrequiredid (tracking code) of the event you wish to delete.Returns a deleted object on success. Otherwise, this call returns an error.
curl -X DELETE "https://api.usefathom.com/v1/sites/CDBUGS/events/ABCDEFGH" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"id": "ABCDEFGH",
"object": "event",
"deleted": true
}