Webhooks

Update Webhook

PATCH
/v1/webhooks/{id}

Authorization

headerx-api-key<token>

Workspace API key, sent in the x-api-key header. Keys start with op_ and are created in the dashboard.

Path Parameters

id*string
Length1 <= length

Request Body

application/json
  1. body
name?string
Length1 <= length <= 120
url?string
Formaturi
Lengthlength <= 2048
events?array<string>
Items1 <= items <= 31
enabled?boolean

Response Body

Updated

application/json
  1. response
webhook*
Example Request
import { Configuration, WebhooksApi } from "@onepostly/sdk";const webhooksApi = new WebhooksApi(  new Configuration({ apiKey: process.env.ONEPOSTLY_API_KEY }));const response = await webhooksApi.updateWebhook({  id: "dlv_1",  updateWebhookBody: {    "name": "Post events",    "url": "https://example.com/hooks/onepostly",    "events": [      "post.platform.published"    ],    "enabled": true  },});console.log(response);
Example Response
{  "webhook": {    "id": "dlv_1",    "name": "Post events",    "url": "https://example.com/hooks/onepostly",    "enabled": true,    "events": [      "post.platform.published"    ]  }}