POST
/
upsert-webhook
curl --request POST \
  --url https://api.getomni.ai/upsert-webhook \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "url": "<string>",
  "id": "<string>",
  "headers": [
    {}
  ],
  "isEnabled": true
}'
{
  "webhookId": "123e4567-e89b-12d3-a456-426614174000",
  "success": true
}

Create or update a webhook

Body Parameters

url
string
required

Webhook URL

id
string

Webhook ID. If not provided, a new webhook will be created.

headers
array

Headers to be sent with the webhook

isEnabled
boolean

Whether the webhook is enabled

Response

webhookId
string

Webhook ID

success
boolean

Whether the webhook was created or updated successfully

{
  "webhookId": "123e4567-e89b-12d3-a456-426614174000",
  "success": true
}