Add a webhook endpoint
POST
/v1/webhook-endpoints
const url = 'https://api.staging.heliumid.io/v1/webhook-endpoints';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","description":"example","eventTypes":["case.submitted"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.staging.heliumid.io/v1/webhook-endpoints \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "description": "example", "eventTypes": [ "case.submitted" ] }'Registers an HTTPS URL to receive signed events. The response contains the endpoint’s signing secret, shown only this once.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string
description
string
eventTypes
required
Array<string>
Responses
Section titled “Responses”The endpoint and its signing secret (shown once)
Media typeapplication/json
object
endpoint
required
object
id
required
string
url
required
string
description
required
string
eventTypes
required
Array<string>
enabled
required
boolean
secretHint
required
string
createdAt
required
string | null
updatedAt
required
string | null
secret
required
string
Example generated
{ "endpoint": { "id": "example", "url": "example", "description": "example", "eventTypes": [ "example" ], "enabled": true, "secretHint": "example", "createdAt": "example", "updatedAt": "example" }, "secret": "example"}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
correlationId
required
string
Example generated
{ "error": { "code": "example", "message": "example", "correlationId": "example" }}Not authenticated
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
correlationId
required
string
Example generated
{ "error": { "code": "example", "message": "example", "correlationId": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
correlationId
required
string
Example generated
{ "error": { "code": "example", "message": "example", "correlationId": "example" }}Too many endpoints
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
correlationId
required
string
Example generated
{ "error": { "code": "example", "message": "example", "correlationId": "example" }}