Get a webhook
Returns the configuration of the webhook endpoint with the given ID. Request: GET /v1/webhooks/{id}. Scope: webhooks:read.
GET
Returns the configuration of the webhook endpoint with the given ID.
apiKeyheader
x-api-key<token>id*stringMatch
^wep_[0-9a-hjkmnp-tv-z]{16,24}$WebhookEndpoint
application/json- response
id*WebhookEndpointIdMatch
^wep_[0-9a-hjkmnp-tv-z]{16,24}$name*stringurl*stringeventTypes*array<>channels*array<>|nullmailboxIds*array<>|nullnamespaceId*|nullstatus*stringValue in
"active""disabled"hasCustomHeaders*booleanfailureStartedAt*string|nulllastSucceededAt*string|nullcreatedAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.webhooks.get({
"id": "example"
});Example Response
{
"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"
}