List webhooks
List webhooks. Request: GET /v1/webhooks. Scope: webhooks:read.
GET
Returns the organization's webhook endpoints, oldest first, with each endpoint's delivery counts, optionally filtered by namespace (namespaceId), a search term matched against name and URL, and by status. Pass nextCursor back as cursor for the next page; it is null on the last page.
apiKeyheader
x-api-key<token>limit?|nullcursor?stringnamespaceId?stringMatch
^ns_[0-9a-hjkmnp-tv-z]{16,24}$search?stringstatus?stringValue in
"active""disabled"WebhookEndpointPage
application/json- response
items*array<>nextCursor*string|nullimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.webhooks.list({});Example Response
{
"items": [
{
"id": "string",
"name": "string",
"url": "string",
"eventTypes": [
"message.sent"
],
"channels": [
"sms"
],
"mailboxIds": [
"string"
],
"namespaceId": "string",
"status": "active",
"hasCustomHeaders": true,
"failureStartedAt": "string",
"lastSucceededAt": "string",
"createdAt": "string",
"updatedAt": "string",
"deliveries": {
"total": 0,
"pending": 0,
"delivered": 0,
"exhausted": 0,
"cancelled": 0
}
}
],
"nextCursor": "string"
}