---
title: "Set or clear the webhook"
method: POST
path: "/quizzes/{id}/webhook"
tags: ["Webhooks"]
---

# Set or clear the webhook

`POST /quizzes/{id}/webhook`

## Request

- Base URL: `https://quizgen.dev/api/v1`
- URL: `https://quizgen.dev/api/v1/quizzes/{id}/webhook`
- Auth: HTTP bearer

Sets a webhook that POSTs on every completed response, or clears it with `{"url": null}`. If a `secret` is set, each delivery carries `X-QuizGen-Signature`: the HMAC-SHA256 hex of the raw body.

## Request body

- object
  - `url` string, uri, nullable, required: Endpoint to POST to, or null to clear.
  - `secret` string: Signs deliveries (HMAC-SHA256).

## Response `200`

Webhook set or cleared.

- OperationResult: Successful mutation result. Fields vary by operation and are documented on the endpoint.

## Other responses

- `401`: Missing or invalid API key.
- `404`: No such quiz (or not yours).

---

[API](https://skmtc.dev/quizgen/apis/quizgen-api.md) · [All operations](https://skmtc.dev/quizgen/apis/quizgen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quizgen/apis/quizgen-api/revisions/100cf9a83300?raw)
