Skip to main content
POST
/
webhooks
Create a webhook
curl --request POST \
  --url https://caliper.alpha-1edtech.ai/webhooks/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Webhook",
  "description": "This webhook is used to send data to the example.com/webhook",
  "targetUrl": "https://example.com/webhook",
  "secret": "secret123",
  "active": true,
  "sensor": "sensor123"
}
'
{
  "webhook": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "My Webhook",
    "description": "This webhook is used to send data to the example.com/webhook",
    "targetUrl": "https://example.com/webhook",
    "secret": "secret123",
    "active": true,
    "createdAt": "2021-01-01T00:00:00.000Z",
    "updatedAt": "2021-01-01T00:00:00.000Z",
    "deletedAt": "2021-01-01T00:00:00.000Z",
    "sensor": "sensor123"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

The webhook to create

name
string
required

The name of the webhook

Example:

"My Webhook"

description
string | null
required

The description of the webhook

Example:

"This webhook is used to send data to the example.com/webhook"

targetUrl
string
required

The URL that the webhook will send the data to

Example:

"https://example.com/webhook"

secret
string
required

The secret that the webhook will use to authenticate the data

Example:

"secret123"

active
boolean
required

Whether the webhook is active

Example:

true

sensor
string | null

The sensor that the webhook is associated with

Example:

"sensor123"

Response

Webhook created successfully

webhook
object
required