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
/v1/webhooks/{id}

Returns the configuration of the webhook endpoint with the given ID.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^wep_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

WebhookEndpoint

application/json
  1. response
id*WebhookEndpointId
Match^wep_[0-9a-hjkmnp-tv-z]{16,24}$
name*string
url*string
eventTypes*array<>
channels*array<>|null
mailboxIds*array<>|null
namespaceId*|null
status*string
Value in"active""disabled"
hasCustomHeaders*boolean
failureStartedAt*string|null
lastSucceededAt*string|null
createdAt*string
updatedAt*string
Example Request
import { 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