Events
Manage events for a site.
Search API documentation
No matching endpoints or topics.
List events#
GET/sites/{site_id}/events
Return a list of all events this site owns. Events are sorted by created_at ascending to allow you to paginate with ease.
The id field is going away
id (the old goal code). We are removing that field on 24 September 2026. Identify events by name instead.Path parameters
site_idstringrequiredExample:
CDBUGSQuery parameters
limitintegeroptional10starting_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.Returns
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"
}
]
}Set event currency#
POST/sites/{site_id}/events/currency
Set the currency of an event by its name. Use this instead of updating an event by its goal code. If more than one event row shares the name, they are treated as one event and every matching row is updated.
Path parameters
site_idstringrequiredExample:
CDBUGSBody parameters
namestringrequiredExample:
Purchase early accesscurrencystringrequireddollarpoundeuroyuanpesoshekelyenwonhryvniafrancrupeeintegernoneReturns
Returns an updated object on success. Otherwise, this call returns an error.
curl -X POST "https://api.usefathom.com/v1/sites/CDBUGS/events/currency" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Purchase early access",
"currency": "pound"
}'{
"object": "event",
"name": "Purchase early access",
"currency": "pound",
"updated": true
}Delete event#
DELETE/sites/{site_id}/events
Delete an event by its name. If more than one event row shares the name, they are treated as one event and every matching row is deleted.
Path parameters
site_idstringrequiredExample:
CDBUGSQuery parameters
namestringrequiredExample:
Purchase early accessReturns
Returns a deleted object on success. Otherwise, this call returns an error.
curl -X DELETE "https://api.usefathom.com/v1/sites/CDBUGS/events?name=Purchase%20early%20access" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"object": "event",
"name": "Purchase early access",
"deleted": true
}Get event#
DeprecatedGET/sites/{site_id}/events/{event_id}
This endpoint is no longer available
Previously returned a single event by its goal code. This endpoint is no longer available.
Path parameters
site_idstringrequiredExample:
CDBUGSevent_idstringrequiredid (tracking code) of the event, as returned when the event was created.Example:
ABCDEFGHCreate event#
DeprecatedPOST/sites/{site_id}/events
This endpoint is no longer available
Previously created an event. This endpoint is no longer available.
Path parameters
site_idstringrequiredExample:
CDBUGSBody parameters
namestringrequiredExample:
Purchase early accesscurrencystringoptionaldollar.dollarOptions:dollarpoundeuroyuanpesoshekelyenwonhryvniafrancrupeeintegernoneUpdate event#
DeprecatedPOST/sites/{site_id}/events/{event_id}
This endpoint is no longer available
Previously updated an event by its goal code. This endpoint is no longer available.
Path parameters
site_idstringrequiredExample:
CDBUGSevent_idstringrequiredid (tracking code) of the event you wish to update.Example:
ABCDEFGHBody parameters
namestringoptionalcurrencystringoptionaldollarpoundeuroyuanpesoshekelyenwonhryvniafrancrupeeintegernoneWipe event#
DeprecatedDELETE/sites/{site_id}/events/{event_id}/data
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.
Path parameters
site_idstringrequiredExample:
CDBUGSevent_idstringrequiredid (tracking code) of the event.Delete event#
DeprecatedDELETE/sites/{site_id}/events/{event_id}
This endpoint is no longer available
Previously deleted an event by its goal code. This endpoint is no longer available.
Path parameters
site_idstringrequiredExample:
CDBUGSevent_idstringrequiredid (tracking code) of the event you wish to delete.