Skip to main content
POST
/
sip
/
hooks
Updates SIP hooks.
curl --request POST \
  --url https://api.sayna.ai/sip/hooks \
  --header 'Content-Type: application/json' \
  --data '
{
  "hooks": [
    {
      "host": "example.com",
      "url": "https://webhook.example.com/events"
    }
  ]
}
'
{
  "hooks": [
    {
      "host": "example.com",
      "url": "https://webhook.example.com/events"
    }
  ]
}
Replace or add SIP webhook forwarding entries at runtime.
  • Body: array of { host, url } objects. Hosts are matched case-insensitively; matching hosts are replaced, others added.
  • Changes take effect immediately and persist across restarts. Runtime additions reuse the global hook secret; per-hook secrets are not stored.
  • Validation rejects duplicate hosts or non-HTTPS URLs. Auth applies when AUTH_REQUIRED=true.

Body

application/json

Request body for updating SIP hooks.

Contains a list of SIP webhook configurations to add or replace.

hooks
object[]

List of SIP hooks to add or replace. Hooks with matching hosts (case-insensitive) will be replaced.

Response

Updated list of SIP hooks

Response body for SIP hooks operations.

hooks
object[]
required

List of all configured SIP hooks