Pular para o conteúdo principal
Routal
API ReferenceWebhook

Update a webhook

Replaces the URL, the subscribed events and the enabled flag of a webhook.

PUT
/v2/webhook/{id}

Replaces the URL, the subscribed events and the enabled flag of a webhook. enabled_events is replaced as a whole, not merged: send the full list of events you want to keep.

Set enabled to false to pause deliveries without losing the configuration.

private_key<token>

Pass your API key as the private_key query string parameter. Generate and rotate keys in Developer Settings of your Routal workspace.

Keys stay server-side. Never ship them to a browser or mobile app.

In: query

Path Parameters

id*string

Webhook id

Match^[0-9a-f]{24}

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v2/webhook/string" \  -H "Content-Type: application/json" \  -d '{    "url": "https://example.com/routal/webhooks",    "enabled_events": [      "routal.planner.2.plan.created",      "routal.drivers.2.route.finished"    ],    "enabled": true  }'
{
  "id": "4f75d991ac359f8c4c79d762",
  "organization_id": "4f75d991ac359f8c4c79d762",
  "project_id": "4f75d991ac359f8c4c79d762",
  "url": "https://example.com",
  "enabled_events": [
    "routal.planner.2.plan.created",
    "routal.drivers.2.route.finished"
  ],
  "enabled": true,
  "failure_count": 0,
  "created_by": "4f75d991ac359f8c4c79d762",
  "created_at": "2026-11-10T16:55:36.096Z",
  "updated_at": "2026-11-10T16:55:36.096Z",
  "deleted_at": "2026-11-10T16:55:36.096Z"
}
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
Empty
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
Empty
Empty