Set the channel webhook. The URL is a secret, stored encrypted.
PUT
/admin/notifications
const url = 'https://example.com/api/v1/admin/notifications';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"kind":"slack","url":"example"}'};
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://example.com/api/v1/admin/notifications \ --header 'Content-Type: application/json' \ --data '{ "kind": "slack", "url": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
kind
required
string
url
required
The incoming webhook URL, https.
string
Responses
Section titled “ Responses ”The webhook.
Media typeapplication/json
object
configured
required
boolean
kind
string
url_last4
string
from_env
required
SPECCY_NOTIFY_WEBHOOK_URL sets the webhook, so the UI cannot change it.
boolean
Example
{ "kind": "slack"}default
Section titled “default”An error.
Media typeapplication/problem+json
RFC 9457 problem details with a stable code.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required
A stable machine-readable error code.
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}