v1

latestOpenAPI 3.0.02026-07-2491237338.9 KB
Webhook Endpoints

Rotate a webhook endpoint secret

Generates a new secret for a webhook endpoint.

post/webhookEndpoints/{id}/rotateSecret

Path parameters

idstring required
Example:wh627c8640675de8fc689ab9d9

ID of the webhook endpoint.

Response

Successfully rotated the webhook endpoint secret.

idstring required

Unique ID for the object.

urlstring

The URL of the webhook endpoint.

enabledEventsstring[]

The list of events to enable for this endpoint.

descriptionstring

An optional description of what the webhook is used for.

status'active' | 'disabled' | 'pending'

Webhook endpoint status.

  • active: Indicates that the webhook endpoint is active, and will receive notifications of events monitored.
  • disabled: Indicates that the webhook endpoint is disabled, and will not receive notifications.
  • pending: Indicates that the webhook endpoint is pending, and will not receive notifications. If a webhook endpoint fails to receive notifications frequently, it changes to pending.
secretstring

The endpoint's secret, used to generate webhook signatures.

createTimestring date-time

The time at which this object was created, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

updateTimestring date-time

The time at which this object was updated, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example response

{
  "id": "wh627c8640675de8fc689ab9d9",
  "url": "https://httpbin.org/anything?tag=api",
  "enabledEvents": [
    "whatsapp.message.updated",
    "whatsapp.inbound_message.received"
  ],
  "eventProperties": [
    {
      "event": "contact.attributes_changed",
      "properties": [
        "attr1",
        "attr2"
      ]
    }
  ],
  "description": "My first webhook endpoint.",
  "secret": "whsec_abc4147651944f02baf3be1eb45d33f1",
  "createTime": "2022-06-01T12:00:00.000Z",
  "updateTime": "2022-06-01T12:00:00.000Z"
}