List all webhook subscriptions
webhook_subscriptions.list() -> WebhookSubscriptionListResponse
GET/v3/webhook-subscriptions
Retrieve all webhook subscriptions for the authenticated partner. Returns a list of active and inactive subscriptions with their configuration and status.
List all webhook subscriptions
import os
from linq import LinqAPIV3
client = LinqAPIV3(
api_key=os.environ.get("LINQ_API_V3_API_KEY"), # This is the default and can be omitted
)
webhook_subscriptions = client.webhook_subscriptions.list()
print(webhook_subscriptions.subscriptions){
"subscriptions": [
{
"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"
]
}
]
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error"
},
"success": false
}Returns Examples
{
"subscriptions": [
{
"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"
]
}
]
}{
"error": {
"status": 401,
"code": 2004,
"message": "Unauthorized - missing or invalid authentication token"
},
"success": false
}{
"error": {
"status": 500,
"code": 3006,
"message": "Internal server error"
},
"success": false
}