Skip to main content
PUT
/
api
/
v1
/
webhooks
/
{id}
Update Webhook
curl --request PUT \
  --url https://api.example.com/api/v1/webhooks/{id}
Update an existing webhook’s configuration.

Request

PUT /api/v1/webhooks/{id}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
idstringYesUUID of the webhook

Body Parameters

All fields are optional. Only include fields you want to update.
ParameterTypeDescription
urlstringNew destination URL
secretstringNew HMAC signing secret
descriptionstringNew description
is_enabledbooleanEnable or disable the webhook

Response

Returns the updated webhook object.

Examples

# Update webhook URL
curl -X PUT "https://app.preclinical.dev/api/v1/webhooks/uuid" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://new-endpoint.example.com/webhook"
  }'

# Disable webhook
curl -X PUT "https://app.preclinical.dev/api/v1/webhooks/uuid" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "is_enabled": false
  }'

Success Response

{
  "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "url": "https://new-endpoint.example.com/webhook",
  "description": "Main notification webhook",
  "agent_id": null,
  "is_enabled": true,
  "last_triggered_at": "2026-01-30T10:32:45Z",
  "consecutive_failures": 0,
  "created_at": "2026-01-15T08:00:00Z",
  "updated_at": "2026-01-30T14:00:00Z"
}

Errors

CodeDescription
NOT_FOUNDWebhook not found or doesn’t belong to your organization
INVALID_FIELD_VALUEInvalid URL format