Update a webhook subscription
PUT/v3/webhook-subscriptions/{subscriptionId}
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.
Body ParametersJSON
phone_numbers: optional array of string
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_id_header: optional string
Updated header name for the chat id. Set to null or an empty string to fall back to Linq-Chat-Id.
Update a webhook subscription
curl https://api.linqapp.com/api/partner/v3/webhook-subscriptions/$SUBSCRIPTION_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $LINQ_API_V3_API_KEY" \
-d '{
"is_active": true,
"phone_numbers": [
"+12025551234"
],
"routing_id_header": "X-Chat-Id",
"routing_key_header": "X-Route-Token",
"subscribed_events": [
"message.sent",
"message.delivered"
],
"target_url": "https://webhooks.example.com/linq/events"
}'{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"created_at": "2024-01-15T10:30:00Z",
"is_active": true,
"subscribed_events": [
"message.sent",
"message.delivered",
"message.read"
],
"target_url": "https://webhooks.example.com/linq/events",
"updated_at": "2024-01-15T10:30:00Z",
"phone_numbers": [
"string"
],
"routing_id_header": "X-Chat-Id",
"routing_key_header": "X-Route-Token"
}{
"error": {
"status": 400,
"code": 1002,
"message": "Phone number must be in E.164 format",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
},
"success": false
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
},
"success": false
}{
"error": {
"status": 403,
"code": 2005,
"message": "Access denied - insufficient permissions for this resource",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2005/"
},
"success": false
}{
"error": {
"status": 404,
"code": 2001,
"message": "Resource not found",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2001/"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
},
"success": false
}Returns Examples
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"created_at": "2024-01-15T10:30:00Z",
"is_active": true,
"subscribed_events": [
"message.sent",
"message.delivered",
"message.read"
],
"target_url": "https://webhooks.example.com/linq/events",
"updated_at": "2024-01-15T10:30:00Z",
"phone_numbers": [
"string"
],
"routing_id_header": "X-Chat-Id",
"routing_key_header": "X-Route-Token"
}{
"error": {
"status": 400,
"code": 1002,
"message": "Phone number must be in E.164 format",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/1xxx/1002/"
},
"success": false
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2004/"
},
"success": false
}{
"error": {
"status": 403,
"code": 2005,
"message": "Access denied - insufficient permissions for this resource",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2005/"
},
"success": false
}{
"error": {
"status": 404,
"code": 2001,
"message": "Resource not found",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/2xxx/2001/"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error",
"doc_url": "https://docs.linqapp.com/channel/imessage/error/codes/3xxx/3006/"
},
"success": false
}