PATCH
/
webhooks
/
{webhook_id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: 'My Bearer Token',
});

const webhookDetails = await client.webhooks.update('webhook_id');

console.log(webhookDetails.id);
{
  "created_at": "<string>",
  "description": "<string>",
  "disabled": true,
  "filter_types": [
    "<string>"
  ],
  "id": "<string>",
  "metadata": {},
  "rate_limit": 1,
  "updated_at": "<string>",
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

webhook_id
string
required

Body

application/json
description
string | null

Description of the webhook

disabled
boolean | null

To Disable the endpoint, set it to true.

filter_types
enum<string>[] | null

Filter events to the endpoint.

Webhook event will only be sent for events in the list.

metadata
object | null

Metadata

rate_limit
integer | null

Rate limit

Required range: x >= 0
url
string | null

Url endpoint

Response

Webhook patched successfully

created_at
string
required

Created at timestamp

description
string
required

An example webhook name.

id
string
required

The webhook's ID.

metadata
object
required

Metadata of the webhook

updated_at
string
required

Updated at timestamp

url
string
required

Url endpoint of the webhook

disabled
boolean | null

Status of the webhook.

If true, events are not sent

filter_types
string[] | null

Filter events to the webhook.

Webhook event will only be sent for events in the list.

rate_limit
integer | null

Configured rate limit

Required range: x >= 0