Update webhook

Description

Summary: Updates an existing webhook subscription by its ID via the TextPeak API.
Details: This endpoint modifies the configuration of a specific webhook identified by its unique ID provided as a path parameter. You can update any combination of the webhook's properties, including its name, destination URL, trigger type, HTTP method, filter criteria, custom headers, query parameters, retry behavior, and activation status. The request body should contain the full updated webhook configuration as a JSON object. Authentication is performed via a TextPeak API key passed in the Authorization header.

Authentication & Scopes

Authentication is handled via a TextPeak API key provided in the Authorization header. No OAuth scopes are defined; access is granted or denied based on the validity of the API key.

MethodDetails
API KeyPass your TextPeak API key directly in the Authorization header value.

Headers

HeaderRequiredDescription
AuthorizationYesYour TextPeak API key that authenticates the request.
Content-TypeYesMust be set to application/json. The API only accepts JSON-formatted request bodies.
acceptYesMust be set to application/json. Indicates that the client expects a JSON response.

Parameters

This endpoint uses a path parameter to identify the webhook to update.

ParameterTypeRequiredLocationDescription
idintegerYesPathThe unique identifier of the webhook to update.

Request Body

The request body is a JSON object containing the updated webhook subscription configuration.

FieldTypeRequiredDescription
namestringNoA human-readable name for the webhook (e.g., "Delivery Notifications").
urlstringNoThe destination URL that will receive the webhook event payloads (e.g., "https://example.com/webhook").
webhookTriggerstringNoThe event type that triggers the webhook. Defines which platform events will fire this webhook (e.g., "SHORT_URL_CLICK", "MESSAGE_DELIVERY", "INCOMING_MESSAGE").
methodstringNoThe HTTP method used when sending the webhook request to the destination URL (e.g., "POST", "GET").
filterobjectNoAn object containing filter criteria to limit which events trigger the webhook. Only events matching the filter will be forwarded.
paramsobjectNoAn object of key-value pairs appended as additional parameters to the webhook request (e.g., {"send_bulk": 2}).
headersobjectNoAn object of custom HTTP headers to include in the webhook request sent to the destination URL (e.g., {"x-example": "value"}).
retriesintegerNoThe number of retry attempts if the webhook delivery fails. Set to 0 for no retries (e.g., 100).
activatedbooleanNoWhether the webhook is active and will receive events. Set to true to enable or false to disable.

Filter Object

FieldTypeDescription
stream_idinteger or arrayA stream ID or array of stream IDs to filter events by. Only events originating from the specified streams will trigger the webhook (e.g., 3 or [3]).

Examples

This endpoint has a saved example demonstrating usage:

  • Update webhook — Updating an existing webhook subscription with modified trigger, filters, headers, retry configuration, and activation status.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Body Params
boolean
filter
object
headers
object
string
string
params
object
number
string
string
Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json