Skip to main content
POST
/
api
/
notifications
/
subscriptions
Create a subscription
curl --request POST \
  --url https://app.demandiq.com/api/notifications/subscriptions \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Slack webhook for contract signed",
  "eventType": "contract.signed",
  "channel": "webhook",
  "channelConfig": {},
  "deckId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isActive": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "eventType": "<string>",
  "channel": "webhook",
  "channelConfig": {},
  "deckId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isActive": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Body

application/json
name
string
required
Example:

"Slack webhook for contract signed"

eventType
string
required
Example:

"contract.signed"

channel
enum<string>
required
Available options:
webhook,
email,
console
channelConfig
object
required

Channel-specific configuration. Webhook: { url, headers }. Email: { toEmails, fromEmail }.

deckId
string<uuid>

Scope to a specific deck

isActive
boolean
default:true

Response

Subscription created

id
string<uuid>
name
string
eventType
string
channel
enum<string>
Available options:
webhook,
email,
console
channelConfig
object
deckId
string<uuid> | null
isActive
boolean
createdAt
string<date-time>
updatedAt
string<date-time>