REST endpoints
SIP hooks
Returns the current list of SIP hooks from runtime state.
This endpoint requires authentication if AUTH_REQUIRED=true.
Returns
200 OK- List of SIP hooks500 Internal Server Error- If reading the cache fails
GET
Lists all configured SIP hooks.
Lists all configured SIP hooks from the runtime state. Useful for debugging host-to-URL routing when forwarding LiveKit SIP webhooks.
Response
Returns{ hooks: [...] } with each hook containing:
host- Host pattern for matching SIP domains (case-insensitive)url- HTTPS URL to forward webhook events toauth_id- Tenant identifier for room ownership (used formetadata.auth_id)
The
auth_id field associates inbound SIP calls with a specific tenant. When a call arrives, Sayna sets the room’s metadata.auth_id to this value for access control.Authorization
Requires authentication whenAUTH_REQUIRED=true.Authorizations
Authentication token for protected endpoints. Can be provided as Authorization: Bearer <token> or ?api_key=<token>. Required when AUTH_REQUIRED is enabled.
Response
List of SIP hooks
Response body for SIP hooks operations.
List of all configured SIP hooks
Previous
Update SIP hooksAdds 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
Next
Lists all configured SIP hooks.