Creates or updates a webhook (up to 3 enabled per instance) with event filtering, base64 media and its own Authorization header
Auth:Documentation Index
Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt
Use this file to discover all available pages before exploring further.
TokenAccount or TokenInstance • Rate limit: Global (100/min) • Idempotent: yes (upsert by label)
(instance, label) row in webhook_configs. Each instance accepts up to 3 simultaneously enabled webhooks, identified by a free-form label. Webhooks with enabled=false are kept in the database but do not count toward the limit and do not receive deliveries.
Use cases:
label not used yet.label, all new fields overwrite the old ones.label with {"enabled": false} (clears url, authorization, events, mediaBase64, but preserves the row).label; once confirmed, disable the old one.default webhook pointing to https://meuapp.com/webhook. Without events, it receives the 6 types; without authorization, it sends no auth header.
analytics-pipeline that only receives message.exchange and message.status, sends the header Authorization: Bearer svc-token-xyz on each delivery, and turns off the base64 backup.
byEvents: true so each delivery is sent with the event name as a URL suffix (e.g., https://meuapp.com/wh/message.exchange), allowing server-side routing per endpoint without inspecting the payload.
analytics-pipeline webhook by sending only enabled: false. The row stays in the database but url, authorization, events and mediaBase64 are cleared, and the entry no longer counts toward the limit of 3 active webhooks.
message.exchange with mediaBase64: true, so each message with media includes the binary content base64-encoded inside the payload.
webhook object with the configuration actually persisted (label, enabled, url, authorization, byEvents, events, mediaBase64), mirrors the request body after the upsert. When enabled=false, the url, authorization, events and mediaBase64 fields come back cleared. The dispatcher starts using the new config immediately (the internal 30s cache is invalidated on save).
$Instance_Name).TokenAccount or TokenInstance.application/json[a-zA-Z0-9_-]. Empty or omitted becomes "default". Allows multiple webhooks per instance.false, the url, authorization, byEvents, events and mediaBase64 fields are cleared before saving.enabled=true. Goes through the SSRF guard (see below), blocks localhost, private IPs, link-local, multicast.Authorization header sent on each delivery (e.g., Bearer secret-key-123). Encrypted at rest with AES-256-GCM when ENCRYPTION_KEY is configured.true, the URL receives the /<event-name> suffix on each delivery, useful for endpoint-based routing without inspecting the payload (https://app/wh/message.exchange).{message.exchange, message.status, call.update, group.flow, instance.state, label.update}.true, message.exchange events with media include media.base64 (increases payload, may exceed 100KB).url is validated at configuration time and before each delivery. It blocks destinations that point to internal infrastructure:
| Range | Example |
|---|---|
| Loopback | localhost, 127.0.0.1, ::1 |
| Private IPv4 | 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 |
| Link-local IPv4 | 169.254.0.0/16 |
| Link-local IPv6 | fe80::/10 |
| Multicast / broadcast | 224.0.0.0/4, 255.255.255.255 |
authorization vs. null: send null or omit it to skip the header. An empty string "" would result in an empty Authorization: header, which some proxies reject.enabled=false clears the fields: re-enabling the same label later requires re-sending the url (and any other fields you want to preserve).DELETE: to “remove” a webhook, POST with {"enabled": false} keeping the label. Operators can inspect/clean the row directly in the database when needed.ENCRYPTION_KEY is not configured, authorization is stored in plain text. In production, always configure the key.| HTTP | error.message |
|---|---|
| 400 | Invalid request body |
| 400 | URL is required when enabled is true |
| 400 | URL must not target localhost or private network |
| 400 | invalid event type: <value> |
| 400 | label too long (max 50 chars) |
| 400 | label may only contain letters, digits, underscore or dash |
| 401 | Invalid token |
| 404 | Instance not found |
| 409 | webhook limit reached (max 3 enabled per instance) |
| 429 | Rate limit exceeded. Try again later. |
| 500 | Failed to get instance |
enabled=true. Editing an existing row (same label) never triggers the limit.GET /api/events/getWebhook/:instance, all or by ?label=.event carries in data.