Skip to main content
PATCH
Update a webhook subscription

Errors

The errors that every operation shares are in Errors.

Authorizations

Authorization
string
header
required

An API key created in the iSnap dashboard, or a trial key, sent as Authorization: Bearer <key>. An API key starts with isnap_live_ or isnap_test_; both act on the same account, lines and billing. A trial key acts on its trial only.

Path Parameters

id
string
required

Id of the webhook subscription, as returned in id by POST /v1/webhooks: wh_ followed by 25 letters or digits.

Pattern: ^wh_[0-9A-Za-z]{25}$
Example:

"wh_3Kp8Rn9Fh2Lm5Qx7Vw1Yz4Bc6"

Body

application/json
url
string<uri>

New URL, at most 2,048 characters: a longer URL returns 500 internal_error. It passes the same checks as on create, and applies to every request not yet sent, pending retries included.

events
enum<string>[]

New event filter. It replaces the stored list, and applies to the events that occur after the call.

Minimum array length: 1

An exact event type such as message.received, a family wildcard such as line.*, or * for every event. A wildcard for a family that does not exist is accepted and matches nothing. webhook.test is never delivered through an event filter: iSnap sends it only to a suspended webhook subscription, to check whether its URL responds again.

Available options:
message.queued,
message.sent,
message.delivered,
message.read,
message.failed,
message.received,
message.scheduled,
message.cancelled,
message.fallback_triggered,
reaction.added,
reaction.received,
reaction.removed,
line.connected,
line.disconnected,
line.offline,
line.degraded,
line.apple_id_flagged,
line.quota_warning,
line.quota_exceeded,
line.capability_changed,
line.terminated,
line.variant_changed,
line.variant_scheduled,
line.variant_unscheduled,
typing_indicator.started,
typing_indicator.stopped,
trial.linked,
trial.dormant,
trial.reactivated,
trial.bind_conflict,
trial.revoked,
binding.released,
pre_order.fulfilled,
pre_order.cancelled,
macos_session.rented,
macos_session.released,
webhook.test,
*,
message.*,
reaction.*,
line.*,
typing_indicator.*,
trial.*,
binding.*,
pre_order.*,
macos_session.*,
webhook.*
line_ids
string[] | null

New line filter. An array replaces the stored list. null removes the filter: the subscription then receives the events of every line.

Id of a line: line_ followed by 25 letters or digits.

Pattern: ^line_[0-9A-Za-z]{25}$
description
string | null

Free text for your own use, at most 255 characters. null clears it.

Maximum string length: 255
active
boolean

false stops new deliveries, and a delivery already created ends failed at its next attempt, without a request. true turns back on a subscription that you turned off, or that a 410 response turned off. It does not end a suspension.

Response

The webhook subscription after the change.

success
enum<boolean>
required

Always true on a success response.

Available options:
true
data
object
required

A webhook subscription, in the shape that GET /v1/webhooks/{id} and PATCH /v1/webhooks/{id} return.

trace_id
string
required

Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap.

request_id
string
required

Id of the request that produced this response: req_ followed by 25 letters or digits.