API ReferenceWebhooks
Create Webhook Endpoint
Authorization
apiKey X-API-Key<token>
API key for authentication
In: header
Request Body
application/json
name*string
Webhook endpoint name
Length
1 <= length <= 100url*string
Webhook URL
Format
uridescription?string
Webhook description
events*array<unknown>
Events to trigger webhook
Items
1 <= itemssecret?string
Webhook secret for signature verification
headers?
Additional headers
isActive?boolean
Whether webhook is active
Default
trueretryPolicy?
Retry policy configuration
Response Body
application/json
curl -X POST "https://samva.app/api/v1/webhook-endpoints" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "url": "http://example.com", "events": [ "message.sent" ] }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"name": "string",
"slug": "string",
"description": "string",
"type": "webhook",
"config": "string",
"filters": "string",
"priority": -2147483648,
"rateLimit": "string",
"status": "active",
"metrics": "string",
"testMode": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
"lastModifiedBy": "ac5c7580-b36d-42f3-a739-e202c634d1d1"
}