POST
/
webhooks
curl --request POST \
  --url https://api.sandbox.goteal.co/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "name": "user-payroll-submitted",
  "events": [
    "user-payroll-submitted",
    "user-payroll-created"
  ],
  "url": "https://webhooks.company.com",
  "secret": "very-secret"
}'
{
  "webhook_id": "95a0e70b-fe02-4f47-aef9-2efff279df71",
  "name": "user-payroll-submitted",
  "events": [
    "user-payroll-submitted",
    "user-payroll-created"
  ],
  "url": "https://webhooks.company.com",
  "created_at": "2019-05-17T00:00:00.000Z"
}

Authorizations

X-API-KEY
string
headerrequired

Body

application/json
name
string
required

A unique name of the webhook

events
string[]
required
url
string
required
secret
string

A secret to sign the body of the webhook as described at "https://docs.goteal.co"

Response

201 - application/json
webhook_id
string
required

The id of the webhook

name
string
required

A unique name of the webhook

events
string[]
required
url
string
required
created_at
string
required