Update site report subscription REST API
PUT
/api/user/report-subscriptions/sites/{site_id}
const url = 'https://hitkeep.com/api/user/report-subscriptions/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"daily":true,"monthly":true,"weekly":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://hitkeep.com/api/user/report-subscriptions/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "daily": true, "monthly": true, "weekly": true }'Updates per-site report subscription frequencies for the authenticated user.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”site_id
required
string format: uuid
Site UUID.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
daily
boolean
monthly
boolean
weekly
boolean
Examplegenerated
{ "daily": true, "monthly": true, "weekly": true}Responses
Section titled “Responses”Updated
Invalid site ID or request
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}