Update Notification Preferences
curl --request PATCH \
--url https://api.agentpowers.ai/v1/users/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_receipts": true,
"payout_notifications": true,
"marketing_emails": true
}
'import requests
url = "https://api.agentpowers.ai/v1/users/notifications"
payload = {
"purchase_receipts": True,
"payout_notifications": True,
"marketing_emails": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({purchase_receipts: true, payout_notifications: true, marketing_emails: true})
};
fetch('https://api.agentpowers.ai/v1/users/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"purchase_receipts": true,
"payout_notifications": true,
"marketing_emails": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}users
Update Notification Preferences
Upsert notification preferences. Only updates provided fields.
PATCH
/
v1
/
users
/
notifications
Update Notification Preferences
curl --request PATCH \
--url https://api.agentpowers.ai/v1/users/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_receipts": true,
"payout_notifications": true,
"marketing_emails": true
}
'import requests
url = "https://api.agentpowers.ai/v1/users/notifications"
payload = {
"purchase_receipts": True,
"payout_notifications": True,
"marketing_emails": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({purchase_receipts: true, payout_notifications: true, marketing_emails: true})
};
fetch('https://api.agentpowers.ai/v1/users/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"purchase_receipts": true,
"payout_notifications": true,
"marketing_emails": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Provide a Clerk JWT or a long-lived CLI token (prefix ap_cli_). Pass as Authorization: Bearer <token>.
Body
application/json
Was this page helpful?