Skip to main content

Type Alias: CreateWebhookSubscriptionRequest

type CreateWebhookSubscriptionRequest: components["schemas"]["CreateWebhookSubscriptionRequest"];

Properties

PropertyTypeRequiredDescription
urlstringYesWebhook URL (example: "https://example.com/webhook")
secretstringYesSecret for HMAC-SHA256 signature verification (example: "my_secret_key")
eventsstring[]YesList of events to subscribe to. Supports wildcards like "message." or "" (example: ["session.created","message.*"])
descriptionstringNoDescription of this webhook (example: "Production webhook endpoint")
authType"none" | "api_key" | "basic_auth" | "custom_headers"NoHow Cortex authenticates when POSTing to your webhook URL. Defaults to 'none' if omitted.
apiKeystringNoAPI key value (for api_key auth) (example: "sk_live_xxx")
apiKeyHeaderstringNoHeader name to send the API key in (for api_key auth). Defaults to 'X-API-Key' if omitted. (example: "X-API-Key")
basicAuthUsernamestringNoBasic auth username
basicAuthPasswordstringNoBasic auth password
customHeadersobjectNoCustom headers to send with webhook requests (example: {"X-Custom-Header":"value"})

Defined in

4Players/cortex-typescript-sdk/src/resources/webhooks.ts:15