---
title: "Crear un webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Crear un webhook

`POST /webhooks`

## Request

- Base URL: `https://www.facture.ar/api`
- URL: `https://www.facture.ar/api/webhooks`
- Auth: API key in header `x-api-key`

Registra una URL que recibe los eventos elegidos. Facturear genera el secreto de firma (whsec_...), que se ve desde el dashboard en Webhooks → Secreto de firma.

## Request body

- object
  - `url` string, uri, required
  - `events` WebhookEvent[], required
  - `headers` object, nullable

## Response `201`

Webhook creado

- Webhook
  - `id` string
  - `userId` string
  - `url` string, uri
  - `headers` object, nullable: Headers propios que se agregan a cada envío
  - `events` WebhookEvent[]
  - `isActive` boolean
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `400`: URL o eventos inválidos

---

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