Create a Discord webhook integration
Validate and encrypt a Discord webhook URL; the URL is never returned.
POST
/api/v2/integrations/discordAuthorization
AuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
or
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
Header parameters
X-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
max length 128
Request body
requiredapplication/jsonnamestringrequiredmin length 1 · max length 100
webhookUrlstring<uri>requiredmatches ^https://discord\.com/api/webhooks/
enabledEventTypesIntegrationEventType[]Responses
200
Discord integration created; the webhook URL is not returned.
successbooleanrequiredAllowed:
truedataobjectrequiredShow propertiesHide properties
idstring<uuid>requiredtypestringrequiredAllowed:
discordnamestringrequiredisActivebooleanrequiredenabledEventTypesIntegrationEventType[]requireddiscordChannelNamestring | nullrequiredcreatedAtstring<date-time>required400
Bad Request - Invalid input data
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobject401
Unauthorized - Invalid or missing API key
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobject403
Authenticated credential lacks the required scope or workspace access.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobject429
Too Many Requests - Rate limit exceeded
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobject
