Skip to main content
POST
/
v1
/
webhooks
Create a new webhook
curl --request POST \
  --url https://cds.marmar.life/v1/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "url": "<string>",
  "events": [
    "<string>"
  ]
}
'
{
  "webhook": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "url": "<string>",
    "events": [
      "assessment.completed"
    ],
    "status": "active",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "secret": "<string>"
}

Authorizations

Authorization
string
header
required

API key obtained from the Tenant Dashboard. Use as Authorization: Bearer YOUR_API_KEY

Body

application/json
name
string
required

Human-readable name for this webhook

Required string length: 1 - 128
url
string<uri>
required

URL to receive webhook deliveries

events
string[]

Event types to subscribe to (defaults to ["assessment.completed"])

Response

Webhook created

webhook
object
required
secret
string
required

Auto-generated secret. Store securely - not shown again.