Skip to content
Anlyon
Esc
↑↓navigate↵open⌘Jpreview

Update notification preferences

Update notification settings for your workspace, including which channels and alert types are on and who receives alerts by email and webhook. Needs notifications:manage, which no key receives by default. A console session or an OAuth connection also needs the admin role.

PATCH/api/v2/notifications/preferences
Authorization
AuthorizationBearer token (Anlyon API key) · headerrequired

Workspace API key sent as Authorization: Bearer <key>.

or
better-auth.session_tokenAPI key · cookierequired

Browser session used by dashboard-only operations.

Header parameters
X-Request-Idstring

Optional caller correlation ID. Unsafe or oversized values are replaced.

max length 128
Request body
requiredapplication/json
emailEnabledboolean
webhookEnabledboolean
inAppEnabledboolean
slackEnabledboolean
discordEnabledboolean
emailRecipientsstring<email>[]
max items 50
webhookUrlstring<uri> | null
webhookSecretstring | null

Set or rotate the signing secret; use null to remove it. The stored value is never returned.

max length 4096
quotaAlertThresholdsinteger[]
max items 20
enabledTypesstring[]
max items 12
Responses
200

Preferences updated successfully

successboolean
dataNotificationPreferences
Show properties
emailEnabledbooleanrequired
default: true
webhookEnabledbooleanrequired
default: false
inAppEnabledbooleanrequired
default: true
slackEnabledbooleanrequired
discordEnabledbooleanrequired
emailRecipientsstring<email>[]required
webhookUrlstring<uri> | nullrequired
hasWebhookSecretbooleanrequired

Whether a signing secret is stored. The value itself is never returned.

quotaAlertThresholdsinteger[]required
enabledTypesstring[]required
createdAtstring<date-time>required
updatedAtstring<date-time>required
400

Bad Request - Invalid input data

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
401

Unauthorized - Invalid or missing API key

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
403

Authenticated credential lacks the required scope or workspace access.

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
429

Too Many Requests - Rate limit exceeded

successbooleanrequired
requestIdstringrequired

Correlation ID matching the X-Request-Id response header.

errorobjectrequired
Show properties
codestring
messagestring
detailsobject
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.anlyon.com/api/v2/notifications/preferences' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "emailEnabled": true,
  "webhookEnabled": true,
  "inAppEnabled": true,
  "slackEnabled": true,
  "discordEnabled": true,
  "emailRecipients": [
    "user@example.com"
  ],
  "webhookUrl": "http://example.com",
  "webhookSecret": "string",
  "quotaAlertThresholds": [
    0
  ],
  "enabledTypes": [
    "quota_warning"
  ]
}'
Response
{
  "success": true,
  "data": {
    "emailEnabled": true,
    "webhookEnabled": false,
    "inAppEnabled": true,
    "slackEnabled": true,
    "discordEnabled": true,
    "emailRecipients": [
      "user@example.com"
    ],
    "webhookUrl": "http://example.com",
    "hasWebhookSecret": true,
    "quotaAlertThresholds": [
      50,
      75,
      90,
      100
    ],
    "enabledTypes": [
      "quota_warning"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}