MessageOS
APIWebhooksId

Update a webhook

PATCH
/webhooks/{id}

Changes status or event types. Set status to active to resume a paused endpoint. An endpoint removed with DELETE cannot be changed. Setting a disabled endpoint back to active or paused counts toward the 10 webhooks an agent can have that are not disabled. Scope: webhooks:manage.

Authorization

bearer
headerAuthorizationBearer <mosc_...>

A client key (mosc_).

Path Parameters

id*integer

The endpoint id.

Range0 < value

Request Body

application/json
  1. body
status?string
Value in"active""paused""disabled"
eventTypes?array<>
Items1 <= items <= 7

Response Body

The updated endpoint.

application/json
  1. response
id*integer
url*string
eventTypes*array<>
status*string

paused after repeated dead deliveries. disabled after DELETE, a 410 response, or a PATCH to disabled. An endpoint removed with DELETE cannot be changed again.

Value in"active""paused""disabled"

Example request

curl -X PATCH 'https://api.messageos.ai/v1/webhooks/42' \  -H 'Authorization: Bearer mosc_...' \  -H 'Content-Type: application/json' \  -d '{  "status": "paused"}'

Example response

{  "id": 3,  "url": "https://example.com/messageos/webhooks",  "eventTypes": [    "message.delivered"  ],  "status": "active"}