All pages

API reference

Change a webhook receiver

PATCH /v1/webhooks/{receiver_id}

View as Markdown

Change the events it hears, switch it off or on, or limit it to some agents. Its address cannot change: make a new receiver for a new address. Needs webhooks:write.

Parameters

Name In Type Required Description
receiver_id path string (uuid) Yes

Body

Sent as JSON. A field this operation does not take is refused, so a typo fails loudly.

Field Type Required Description
agent_ids array of string (uuid) or null No Only these agents' conversations; an empty list is every agent.
enabled boolean or null No False stops its deliveries.
events array of string or null No The events it hears.
include_values boolean or null No Whether events carry a conversation's values and numbers.

Answer

200 with WebhookReceiver.

Errors

Every error is a problem document with a stable code.

Status When
401 The key is missing, mistyped, unknown, revoked or expired.
403 The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something.
404 This key reaches no such receiver.
409 The project is frozen.
422 An event or an agent does not fit.
429 Too many requests for this key or its organization; see Retry-After.
500 Something went wrong on our side. Quote the request_id to support.

Examples

Change what a receiver hears
#!/bin/sh
# Change what a receiver hears
curl -sS --fail-with-body -X PATCH "https://api.aigently.ai/v1/webhooks/6d8f0a2c-4e6b-4d8f-9a1c-3e5b7d9f1a3c" \
  -H "Authorization: Bearer $AIGENTLY_API_KEY" \
  --json '{
  "events": [
    "conversation.ended"
  ],
  "include_values": false
}'

Try it

Sends this request to the API from your browser, with a test key. Nothing it does rings a phone.