Search for a command to run...
v1
Create and manage the sites in your Fathom account.
Permissions: Requires read access to all sites (all-sites-readonly) or full account access.
Return a list of all sites this API key owns. Sites are sorted by created_at ascending to allow you to paginate with ease.
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.A list of site objects.
curl "https://api.usefathom.com/v1/sites" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"object": "list",
"url": "/v1/sites",
"has_more": false,
"data": [
{
"id": "CDBUGS",
"object": "site",
"name": "Bugs Bunny Portfolio",
"sharing": "none",
"created_at": "2020-07-27 12:01:01",
"timezone": "America/New_York"
}
]
}Permissions: Requires read access to the site (all-sites-readonly, read:{site_id} or manage:{site_id}).
Return a single site.
site_idstringrequiredCDBUGSA site object.
curl "https://api.usefathom.com/v1/sites/CDBUGS" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"id": "CDBUGS",
"object": "site",
"name": "Bugs Bunny Portfolio",
"sharing": "none",
"created_at": "2020-07-27 12:01:01",
"timezone": "America/New_York"
}Permissions: Requires full account access (*).
Create a site.
namestringrequiredDaffy's Websitesharingstringoptionalnone, private or public.noneOptions:noneprivatepublicshare_passwordstringRequired if sharing is privateprivate, you must also send a password to access the site with (up to 255 characters).timezonestringoptionalAmerica/New_York). If omitted, the site inherits your account's default timezone.multi_domainbooleanoptionaltrue to allow this site to track multiple domains.falsemulti_domain_optionstringRequired if multi_domain is truecombined (report all domains together) or separate (report each domain individually).combinedseparateA site object.
curl -X POST "https://api.usefathom.com/v1/sites" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Bugs Bunny Portfolio"
}'{
"id": "GCDFS",
"object": "site",
"name": "Acme Inc",
"sharing": "none",
"created_at": "2021-08-10 00:45:43",
"timezone": "America/New_York"
}Permissions: Requires write access to the site (manage:{site_id}).
Update a site. Send only the fields you want to change.
site_idstringrequiredCDBUGSnamestringoptionalsharingstringoptionalnone, private or public.noneprivatepublicshare_passwordstringRequired if sharing is privateprivate, you must also send a password to access the site with (up to 255 characters).timezonestringoptionalAmerica/New_York). Reporting for this site will use this timezone.multi_domainbooleanoptionaltrue to allow this site to track multiple domains.multi_domain_optionstringRequired if multi_domain is truecombined or separate.combinedseparateA site object.
curl -X POST "https://api.usefathom.com/v1/sites/CDBUGS" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"id": "GCDFS",
"object": "site",
"name": "Acme Holdings Inc",
"sharing": "private",
"created_at": "2021-08-10 00:45:43",
"timezone": "America/New_York"
}This endpoint is no longer available
410 Gone. It is no longer possible to wipe a site's data via the API.Previously wiped all pageviews and event completions from a website. This endpoint is no longer available.
site_idstringrequiredCDBUGSPermissions: Requires full account access (*).
Delete a site. Careful — you can't undo this, and neither can we.
site_idstringrequiredCDBUGSReturns a deleted object on success. Otherwise, this call returns an error.
curl -X DELETE "https://api.usefathom.com/v1/sites/CDBUGS" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"{
"id": "GCDFS",
"object": "site",
"deleted": true
}