Skip to main content
POST
Create webhook
The response contains the webhook’s webhook_url and secret_key. Give the URL to the external system and use the secret to sign each request. The JSON body of each request is passed to the agent as its message.
Store secret_key securely. Anyone with the secret and the URL can trigger the agent.
See Trigger Webhook for how to sign requests.

Authorizations

x-api-key
string
header
required

Lyzr API key. Required on every endpoint except Trigger Webhook.

Body

application/json
agent_id
string
required

ID of the agent the webhook triggers.

Example:

"66e9b0f2a1c3d4e5f6a7b8c9"

user_id
string
required

User ID the agent runs on behalf of.

Example:

"user@example.com"

description
string | null

Optional note describing what calls this webhook.

Example:

"New Zendesk ticket"

Response

Webhook created.

id
string
required

Unique webhook ID.

Example:

"66f1c3b7e4b0a1b2c3d4e5f7"

agent_id
string
required
Example:

"66e9b0f2a1c3d4e5f6a7b8c9"

user_id
string
required
Example:

"user@example.com"

webhook_url
string
required

Public URL external services call to trigger the agent.

Example:

"https://scheduler.studio.lyzr.ai/webhook-trigger/66f1c3b7e4b0a1b2c3d4e5f7"

secret_key
string
required

Secret used to sign requests to webhook_url with HMAC-SHA256. Store it securely.

created_at
string<date-time>
required
description
string | null
Example:

"New Zendesk ticket"

is_active
boolean
default:true

false when the webhook is paused.

updated_at
string<date-time> | null
last_triggered_at
string<date-time> | null
last_trigger_success
boolean | null
trigger_count
integer
default:0

Total number of times the webhook has been triggered.