---
title: "Updates SIP hooks."
method: POST
path: "/sip/hooks"
tags: ["sip"]
---

# Updates SIP hooks.

`POST /sip/hooks`

Adds or replaces SIP hooks in the cache. Hooks with matching hosts
(case-insensitive) will be replaced. Hosts defined in the application
configuration cannot be modified. The changes take effect immediately
and persist across server restarts.

**Note**: Secrets are NOT stored in the cache. Runtime-added hooks will
use the global `hook_secret` from the server configuration.

# Request Body
Array of hook entries with `host` and `url` fields.

# Returns
* `200 OK` - Updated list of SIP hooks
* `400 Bad Request` - If validation fails (e.g., duplicate hosts)
* `500 Internal Server Error` - If writing the cache fails

## Request body

- SipHooksRequest — Request body for updating SIP hooks. Contains a list of SIP webhook configurations to add or replace.
  - `hooks` SipHookEntry[] — List of SIP hooks to add or replace. Hooks with matching hosts (case-insensitive) will be replaced.
    - `auth_id` string, required — Tenant identifier for this hook (written to LiveKit room metadata). Required when AUTH_REQUIRED=true; may be empty when AUTH_REQUIRED=false. When empty, room metadata updates are skipped.
    - `host` string, required — Host pattern for matching SIP domains (case-insensitive)
    - `url` string, required — HTTPS URL to forward webhook events to

## Response `200`

Updated list of SIP hooks

- SipHooksResponse — Response body for SIP hooks operations.
  - `hooks` SipHookEntry[], required — List of all configured SIP hooks
    - `auth_id` string, required — Tenant identifier for this hook (written to LiveKit room metadata). Required when AUTH_REQUIRED=true; may be empty when AUTH_REQUIRED=false. When empty, room metadata updates are skipped.
    - `host` string, required — Host pattern for matching SIP domains (case-insensitive)
    - `url` string, required — HTTPS URL to forward webhook events to

## Other responses

- `400` — Validation error
- `405` — Host defined in application config cannot be modified
- `500` — Failed to write hooks cache

## Changes

- **2026-02-08** `0df166d28191` — 1 info
  - the endpoint scheme security `auth` was added to the API
- **2026-01-07** `3a996c4eb1fc` — 1 breaking, 1 info
  - added the new required request property `hooks/items/auth_id`
  - added the required property `hooks/items/auth_id` to the response with the `200` status
- **2025-12-01** `c88500f43862` — 1 info
  - added the non-success response with the status `405`
- **2025-11-26** `f24787a34cc4` — 1 info
  - endpoint added
- **2025-11-12** `d85b83f25aea` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/saynaai/apis/sayna-api/changes/sip/hooks/post.md)

---

[API](https://skmtc.dev/saynaai/apis/sayna-api.md) · [All operations](https://skmtc.dev/saynaai/apis/sayna-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/saynaai/sayna-api/revisions/395ce7e35139/schema)
