PUT
/
webhooks
/
{id}
TypeScript
import Nuntly from '@nuntly/sdk';

const client = new Nuntly({
  apiKey: 'My API Key',
});

const webhook = await client.webhooks.update('wh_YNtYn86oYZmP1ZHbnUBvXXFt', {
  endpoint_url: 'https://webhook.site/12345678-1234-5678-1234-123456789012',
  events: ['email.delivered', 'email.sent'],
  name: 'My webhook',
  status: 'enabled',
});

console.log(webhook.id);
{
  "data": {
    "id": "wh_01jne5c7gr2mhwrqg4zqwf48y2",
    "org_id": "org_01jh6jk82zjq9deye73h0mzcaq",
    "kind": "webhook"
  }
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>

Path Parameters

id
string
required

The webhook id previously created

Body

application/json

Response

200
application/json

A successful response

The response is of type object.