---
title: "Register a webhook endpoint"
method: POST
path: "/api/v1/integrazioni/webhooks"
tags: ["Integrations (app routes)"]
---

# Register a webhook endpoint

`POST /api/v1/integrazioni/webhooks`

## Request

- Base URL: `https://api.custodo.ai`
- URL: `https://api.custodo.ai/api/v1/integrazioni/webhooks`
- Auth: HTTP bearer

Requires integrazioni:webhooks:manage. Supply an HTTPS url, optional description, events and optional secret (32–256 characters). Omit secret for unsigned deliveries; no secret is generated automatically. Empty or omitted events subscribes to all current and future events. For signing outcomes select firme.envelope.completed, firme.envelope.declined, firme.envelope.voided and firme.envelope.expired. A supplied secret is returned only in this creation response. Private addresses and redirects are refused. The URL cannot subsequently be changed.

## Headers

- `X-Tenant-Id` string, uuid

## Request body

- object
  - `secret` string
  - `url` string, required
  - `description` string
  - `events` string[]

## Response `201`

Register a webhook endpoint

- object
  - `ok` true, required
  - `data` IntegrazioniWebhookCreated, required
    - `id` string, required
    - `url` string, required
    - `description` string, required
    - `events` string[], required
    - `active` boolean, required
    - `createdAt` string, required
    - `lastDeliveryAt` string, nullable, required
    - `lastStatus` 'pending' | 'delivered' | 'failed' | 'dead', nullable, required
    - `failureStreak` number, required
    - `secret` string

## Other responses

- `400`: The request did not validate: `error.details` names the fields.
- `401`: No API key, or one that is malformed, unknown, revoked or expired.
- `403`: The module is off for this organisation, the credential lacks the permission, or the tier does not cover it.
- `429`: The API key has spent its minute, or its day. See `Retry-After`.

---

[API](https://skmtc.dev/custodo/apis/custodo-integrazioni.md) · [All operations](https://skmtc.dev/custodo/apis/custodo-integrazioni/llms.txt) · [OpenAPI document](https://skmtc.dev/custodo/apis/custodo-integrazioni/revisions/16d336d3ec2a?raw)
