---
title: "Create a webhook endpoint"
method: POST
path: "/webhook-endpoints"
tags: ["Webhooks"]
---

# Create a webhook endpoint

`POST /webhook-endpoints`

## Request

- Base URL: `https://workflow.loopfour.ai/api/v1`
- URL: `https://workflow.loopfour.ai/api/v1/webhook-endpoints`
- Auth: API key in header `x-api-key`

Subscribes a URL to receive outbound webhook events.

## Request body

- object
  - `name` string, required: Human-readable name.
  - `url` string, uri, required: HTTPS URL to deliver events to.
  - `events` string[], nullable: Event types to receive (omit or null = all).
  - `workflowIds` string[], nullable: Restrict to specific workflows (omit or null = all).
  - `headers` object: Additional headers to include on each delivery.
  - `description` string: Free-form description.

## Response `201`

Endpoint created

- object
  - `success` unknown
  - `data` object
    - `id` string
    - `name` string
    - `url` string, uri
    - `events` string[], nullable
    - `workflowIds` string[], nullable
    - `headers` object, nullable
    - `status` 'active' | 'paused' | 'disabled'
    - `lastDeliveredAt` string, date-time, nullable
    - `consecutiveFailures` number
    - `description` string, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `secret` string: HMAC-SHA256 signing secret (only returned on creation).

## Other responses

- `400`: Bad request — invalid parameters or request body.
- `401`: Missing or invalid API key.
- `403`: Forbidden — insufficient permissions for this resource.

---

[API](https://skmtc.dev/loopfour/apis/loopfour-workflows-api.md) - [All operations](https://skmtc.dev/loopfour/apis/loopfour-workflows-api/llms.txt) - [OpenAPI document](https://skmtc.dev/loopfour/apis/loopfour-workflows-api/revisions/872822a3af00?raw)
