Skip to content

Update webhook config

PATCH /api/webhooks/config

Sets the base URL and/or the shared token (webhook_secret, write-only: it is stored encrypted and is never returned in any response). The same token goes in your backend to validate the x-webhook-token header of each dispatch. Requires webhooks:manage.

FieldTypeDescription
webhook_urlstringoptionalBase URL of your backend that Neike dispatches webhooks to. Example: "https://tu-backend.com".
webhook_secretstringoptionalShared token (write-only: it is stored encrypted and never returned in any response). Neike sends it in the x-webhook-token header of each dispatch; your backend validates it. null to clear it. Example: "whsec_abc123…".
StatusDescriptionSchema
200—WebhookConfigResponseDto
Terminal window
curl -X PATCH https://api.neike.dev/api/webhooks/config \
-H "x-neike-api-key: whk_live_…" \
-H "Content-Type: application/json" \
-d '{
"webhook_url": "https://tu-backend.com",
"webhook_secret": "whsec_abc123…"
}'
FieldTypeDescription
webhook_urlstringrequiredConfigured base URL. Example: "https://tu-backend.com".
webhook_secret_setbooleanrequiredtrue if a shared token (x-webhook-token) is configured. Example: true.
webhook_secret_hintstringrequiredMasked hint of the token so you can recognize it (whsec_…abcd). The full value is only returned when it is generated, just once. Example: "whsec_…abcd".
configuredbooleanrequiredtrue if a webhook_url is configured. Example: true.
signature_headerstringrequiredHeader with which Neike signs each dispatch. Example: "x-webhook-token".
dispatch_urlsDispatchUrlsDtorequired—
dispatch_platformsobjectrequiredDispatch switch, per messaging platform and per service. By default all five are true. It is changed with PATCH /api/webhooks/dispatch/{platform}.
event_urlsEventUrlsDtorequired—