Skip to main content
PUT
/
webhooks
/
{id}
JavaScript
import Nuntly from '@nuntly/sdk';

const client = new Nuntly({
  apiKey: process.env['NUNTLY_API_KEY'], // This is the default and can be omitted
});

const webhook = await client.webhooks.update('wh_01ka8k8s80gvx9604cn9am5st4');

console.log(webhook.id);
{
  "data": {
    "id": "<string>",
    "signingSecret": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

The id of the webhook

Example:

"wh_01ka8k8s80gvx9604cn9am5st4"

Body

application/json

Request to update a webhook

name
string

The name of the webhook

endpointUrl
string<uri>

The endpoint URL of the webhook

events
enum<string>[]
Minimum array length: 1

An event

Available options:
email.queued,
email.scheduled,
email.processed,
email.sending,
email.sent,
email.delivered,
email.opened,
email.clicked,
email.bounced,
email.complained,
email.rejected,
email.deliveryDelayed,
email.failed,
email.renderingFailed,
email.subscribed,
email.unsubscribed
status
enum<string>

The status of the webhook.

Available options:
enabled,
disabled,
revoked
rotateSecret
boolean

If true, a new signing secret will be generated

Response

200 response

data
object
required

Response after updating a webhook