Skip to main content
POST
/
api
/
webhooks
Create a webhook
curl --request POST \
  --url https://app.dacard.ai/api/webhooks \
  --header 'Content-Type: application/json' \
  --cookie __session= \
  --data '
{
  "url": "https://example.com/hooks/dacard",
  "events": [
    "score.completed"
  ]
}
'
{
  "webhook": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "url": "<string>",
    "events": [
      "score.completed"
    ],
    "enabled": true,
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

__session
string
cookie
required

Clerk session cookie. Authentication is handled by Clerk. Sign in at https://app.dacard.ai/sign-in to obtain a session.

Body

application/json
url
string<uri>
required

Destination URL (must be HTTPS)

Example:

"https://example.com/hooks/dacard"

events
enum<string>[]

Events to subscribe to. Defaults to ["score.completed"] if omitted.

Available options:
score.completed,
subscription.changed

Response

Webhook created (secret included in this response only)

webhook
object