Create a webhook
Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response.
Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response.
Authorization
apiKey x-api-key<token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
name*string
Length
1 <= length <= 100url*string
eventTypes*array<>
Items
1 <= itemschannels?array<>|null
headers?|null
status?|null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/webhooks" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "url": "string", "eventTypes": [ "message.sent" ] }'{ "endpoint": { "id": "string", "name": "string", "url": "string", "eventTypes": [ "message.sent" ], "channels": [ "email" ], "status": "active", "hasCustomHeaders": true, "failureStartedAt": "string", "lastSucceededAt": "string", "createdAt": "string", "updatedAt": "string" }, "secret": "string"}