PilotFoxDocs

Set my email report subscriptions

PUT
/api/v1/sites/{siteId}/reports

Subscribes the signed-in caller to this site's weekly or monthly email report (true) or unsubscribes them (false); a period left out keeps its state. 403 for API keys.

Requires analytics:read on the site (an API key, or a signed-in member's role). Share links: 401.

Authorization

headerx-api-key<token>

An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).

Scope: analytics:read

Path Parameters

siteId*string

Request Body

Subscribes (true) or unsubscribes (false) the caller; a period left out keeps its state

application/json
  1. body

Subscribes (true) or unsubscribes (false) the caller; a period left out keeps its state

weekly?boolean
monthly?boolean

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X PUT 'https://pilotfox.app/api/v1/sites/string/reports' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response200
{  "data": {    "weekly": true,    "monthly": true  }}