Update webhook config
PATCH /api/webhooks/configSets 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.
Request body
Section titled “Request body”| Field | Type | Description | |
|---|---|---|---|
webhook_url | string | optional | Base URL of your backend that Neike dispatches webhooks to. Example: "https://tu-backend.com". |
webhook_secret | string | optional | Shared 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…". |
Responses
Section titled “Responses”| Status | Description | Schema |
|---|---|---|
200 | — | WebhookConfigResponseDto |
Example
Section titled “Example”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…" }'WebhookConfigResponseDto
Section titled “WebhookConfigResponseDto”| Field | Type | Description | |
|---|---|---|---|
webhook_url | string | required | Configured base URL. Example: "https://tu-backend.com". |
webhook_secret_set | boolean | required | true if a shared token (x-webhook-token) is configured. Example: true. |
webhook_secret_hint | string | required | Masked 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". |
configured | boolean | required | true if a webhook_url is configured. Example: true. |
signature_header | string | required | Header with which Neike signs each dispatch. Example: "x-webhook-token". |
dispatch_urls | DispatchUrlsDto | required | — |
dispatch_platforms | object | required | Dispatch switch, per messaging platform and per service. By default all five are true. It is changed with PATCH /api/webhooks/dispatch/{platform}. |
event_urls | EventUrlsDto | required | — |