---
title: "Register a webhook endpoint: we POST a signed event to it when a document finishes"
method: POST
path: "/webhook-endpoints"
tags: ["Webhooks"]
---

# Register a webhook endpoint: we POST a signed event to it when a document finishes

`POST /webhook-endpoints`

## Request

- Base URL: `https://api.eu.doconda.com/v1`
- URL: `https://api.eu.doconda.com/v1/webhook-endpoints`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Request body

- object
  - `url` string, uri, required: HTTPS, on a public address.
  - `event_types` string[]: Without it, all: document.ready, document.failed and document.canceled.

## Response `201`

Created; `secret` is returned only once.

- object
  - `id` string, required
  - `url` string, required
  - `event_types` string[], required
  - `created_at` string, date-time, required
  - `secret` string, required: `whsec_…`, to check the signature of what we send. Shown only now: keep it safe.

## Other responses

- `401`: unauthorized (missing, unknown or revoked key; expired session).
- `422`: webhook_url_invalid: not HTTPS, or not a public address.

---

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