Get a webhook
Returns the configuration of the webhook endpoint with the given ID. Use this endpoint to get a webhook through the Samva email API.
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"}Related documentation
Create a webhook
Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response.
List webhook delivery logs
Returns a webhook endpoint's deliveries, newest first, each naming the event type and time it was made for, with its nested attempt diagnostics.