---
title: "Set the webhook endpoint"
method: PUT
path: "/webhook"
tags: ["Webhooks"]
---

# Set the webhook endpoint

`PUT /webhook`

Registers (or replaces) your HTTPS webhook endpoint. The signing secret is returned once and stored encrypted; save it immediately. Rotating: call this endpoint again to get a new secret.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `url` string, uri, required — HTTPS endpoint that receives events.

## Response `200`

Endpoint registered. The secret is shown exactly once.

- object
  - `url` string, uri, required
  - `secret` string, required — Signing secret, `whsec_<hex>`. Returned only on this response.

## Other responses

- `400` — Validation failed.
- `401` — Missing, malformed, or revoked API key.
- `429` — Rate limit exceeded. Honor `Retry-After`.
- `500` — Something failed on our side. Safe to retry with the same `Idempotency-Key`.

---

[API](https://skmtc.net/getprescience/apis/prescience-partner-api.md) · [All operations](https://skmtc.net/getprescience/apis/prescience-partner-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getprescience/prescience-partner-api/versions/eb1f377f8139/schema)
