webhooks

Create

POST
Creates a new webhook target.

Request

This endpoint expects an object.
url
stringRequired
The URL of the webhook endpoint.
event_types
list of enumsOptional
The event types that the webhook endpoint will receive.
secret
stringOptional
The secret to use when verifying webhook events. If provided, the secret must be between 8 and 32 bytes (inclusive). If not set, a secret will be automatically generated and provided in the response.

Response

This endpoint returns an object
webhook
object
POST
1curl -X POST https://api.devrev.ai/webhooks.create \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "url": "url"
6}'
Response
1{
2 "webhook": {
3 "id": "id",
4 "secret": "secret",
5 "status": "active",
6 "url": "url",
7 "created_date": "2023-01-01T12:00:00Z",
8 "display_id": "display_id",
9 "event_types": [
10 "account_created"
11 ],
12 "modified_date": "2023-01-01T12:00:00Z"
13 }
14}