Webhooks

Update a webhook subscription

Update an existing webhook subscription. You can modify the target URL, subscribed events, or activate/deactivate the subscription.

Note: The signing secret cannot be changed via this endpoint.

put/v3/webhook-subscriptions/{subscriptionId}

Request

  • Base URL: https://api.linqapp.com/api/partner
  • URL: https://api.linqapp.com/api/partner/v3/webhook-subscriptions/{subscriptionId}
  • Auth: HTTP bearer

Path parameters

subscriptionIdstring required
Example:b2c3d4e5-f6a7-8901-bcde-f23456789012

Unique identifier of the webhook subscription

Request body

target_urlstring uri

New target URL for webhook events

subscribed_eventsWebhookEventType[]

Updated list of event types to subscribe to

is_activeboolean

Activate or deactivate the subscription

phone_numbersstring[] nullable

Updated list of phone numbers to filter events for. Set to a non-empty array to filter events to specific phone numbers. Set to an empty array or null to remove the filter and receive events from all phone numbers. Phone numbers must be in E.164 format.

routing_key_headerstring nullable

Updated header name for the routing token. Set to null or an empty string to disable delivery affinity and drop the stored tokens.

routing_id_headerstring nullable

Updated header name for the chat id. Set to null or an empty string to fall back to Linq-Chat-Id.

Example request

{
  "target_url": "https://webhooks.example.com/linq/events",
  "subscribed_events": [
    "message.sent",
    "message.delivered"
  ],
  "is_active": true,
  "phone_numbers": [
    "+12025551234"
  ],
  "routing_key_header": "X-Route-Token",
  "routing_id_header": "X-Chat-Id"
}

Response

Webhook subscription updated successfully

idstring required

Unique identifier for the webhook subscription

target_urlstring uri required

URL where webhook events will be sent

subscribed_eventsWebhookEventType[] required

List of event types this subscription receives

phone_numbersstring[] nullable

Phone numbers this subscription filters for. If null or empty, events from all phone numbers are delivered.

routing_key_headerstring nullable

Header carrying the routing token. Null disables delivery affinity.

routing_id_headerstring nullable

Header carrying the chat id. Defaults to Linq-Chat-Id when affinity is on.

is_activeboolean required

Whether this subscription is currently active

created_atstring date-time required

When the subscription was created

updated_atstring date-time required

When the subscription was last updated

Example response

{
  "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "target_url": "https://webhooks.example.com/linq/events",
  "subscribed_events": [
    "message.sent",
    "message.delivered",
    "message.read"
  ],
  "routing_key_header": "X-Route-Token",
  "routing_id_header": "X-Chat-Id",
  "is_active": true,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.