Skip to content

Edit a delivery endpoint

PATCH
/webhooks/{id}

Changes url, is_active and/or role — any subset is allowed, an empty body returns 4220. A changed URL is validated again.

Promoting the backup. Sending {"role": "primary"} to the backup endpoint swaps the two roles in a single transaction: the old primary becomes the backup. You are never left without a primary, and no second call is needed. This also gives you a zero-downtime URL change: register the new address as backup, verify it, then promote it to primary.

is_active: false pauses delivery without deleting the endpoint. Pausing the primary does NOT promote the backup — delivery still targets the primary; if you want the backup to take over, swap the roles.

Authorizations

ApiKeyAuth

API key from the dashboard. Some Host Mode endpoints also accept the key as an api_key field in the request body — this is stated in the schema of the particular operation.

Type
API Key (header: X-API-KEY)

Parameters

Header Parameters

X-Real-IP*

An IP address from the key's whitelist. A request from an address outside the whitelist is rejected with 401.

Type
string
Required
Example"203.0.113.10"
Format
"ipv4"

Path Parameters

id*
Type
integer
Required

Request Body

application/json
JSON
{
  
"url": "string",
  
"is_active": true,
  
"role": "string"
}

Responses

The endpoint was updated.

application/json
JSON
{
  
"detail": {
  
  
"code": 10000,
  
  
"status": "created",
  
  
"data": {
  
  
  
"id": 0,
  
  
  
"url": "string",
  
  
  
"role": "string",
  
  
  
"is_active": true,
  
  
  
"secret": "whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  
  
  
"created_at": "string",
  
  
  
"updated_at": "string"
  
  
}
  
}
}

Playground

Authorization
Headers
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI