Atualizar um webhook

Atualiza a URL, eventos ou números associados a um webhook.

Authentication

AuthorizationBearer

API Key in the format mk_live_<43-chars>. Obtain from the Dashboard or POST /auth/api-keys.

Path parameters

idstringRequired
Unique identifier of the webhook

Request

This endpoint expects an object.
urlstringOptionalformat: "uri"
New HTTPS endpoint URL for webhook deliveries. Must be a valid URL if provided.
eventslist of enumsOptional
Updated list of event types to subscribe to. Replaces the existing event list.
numberIdslist of stringsOptional
Updated list of WhatsApp Business number IDs to filter events for. Set to an empty array to receive events for all numbers.
contactslist of stringsOptional

Updated list of contacts (phone numbers or BSUIDs) to restrict deliveries to. Set to an empty array to reset this webhook to catch-all behavior.

activebooleanOptional

Whether the webhook is active. Set to true to re-enable a webhook that was auto-disabled after 10 consecutive delivery failures.

Response

Default Response
idstring
Unique identifier of the webhook
urlstring
HTTPS endpoint URL that receives webhook POST requests
eventslist of strings
List of event types this webhook is subscribed to
numberIdslist of strings
List of number IDs this webhook is filtered to. Empty array means all numbers.
contactslist of strings

List of contacts this webhook is restricted to. Empty array means all contacts (catch-all).

activeboolean
Whether the webhook is currently active. Automatically set to false after 10 consecutive delivery failures.
createdAtstring
ISO 8601 timestamp when the webhook was created
failureCountdouble

Number of consecutive delivery failures. Resets to 0 on a successful delivery. Webhook is auto-disabled at 10.

lastStatusCodedouble or null
HTTP status code returned by the endpoint on the most recent delivery attempt
lastTriggeredAtstring or null
ISO 8601 timestamp of the most recent delivery attempt
updatedAtstring
ISO 8601 timestamp when the webhook was last updated

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error