Webhooks
Create a new webhook subscription
Create a new webhook subscription to receive events at a target URL. Upon creation, a signing secret is generated for verifying webhook authenticity. Store this secret securely — it cannot be retrieved later.
Phone Number Filtering:
- Optionally specify phone_numbers to only receive events for specific lines
- If omitted, events from all phone numbers are delivered (default behavior)
- Use multiple subscriptions with different phone_numbers to route different lines to different endpoints
- Each target_url can only be used once per account. To route different lines to different destinations, use a unique URL per subscription (e.g., append a query parameter: https://example.com/webhook?line=1)
Webhook Delivery:
- Events are sent via HTTP POST to the target URL
- Each request includes Standard Webhooks headers (webhook-id, webhook-timestamp, webhook-signature) for signature verification
- Legacy X-Webhook-* headers are also sent for backwards compatibility (deprecated)
- See Verifying Webhook Signatures for verification details
- Failed deliveries (5xx, 429, network errors) are retried with exponential backoff for up to 30 minutes
- Client errors (4xx except 429) are not retried
post/v3/webhook-subscriptions
Request
- Base URL: https://api.linqapp.com/api/partner
- URL: https://api.linqapp.com/api/partner/v3/webhook-subscriptions
- Auth: HTTP bearer
Request body
Example request
{
"target_url": "https://webhooks.example.com/linq/events",
"subscribed_events": [
"message.sent",
"message.delivered"
],
"phone_numbers": [
"+12025551234",
"+12025559876"
],
"routing_key_header": "X-Route-Token",
"routing_id_header": "X-Chat-Id"
}Response
Webhook subscription created successfully. The signing_secret is only returned in this response - store it securely.
Example response
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"target_url": "https://webhooks.example.com/linq/events",
"signing_secret": "whsec_abc123def456",
"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.