---
title: "Create a webhook"
method: POST
path: "/webhooks"
tags: ["webhooks"]
---

# Create a webhook

`POST /webhooks`

**Access policy**: authenticated

## Request body

- WebhooksWebhookCreatePayload
  - `EndpointID` integer
  - `RegistryID` integer
  - `ResourceID` string
  - `WebhookType` 0 | 1

## Response `200`

OK

- PortainerWebhook
  - `EndpointId` integer
  - `Id` integer — Webhook Identifier
  - `RegistryId` integer
  - `ResourceId` string
  - `Token` string
  - `Type` 0 | 1

## Other responses

- `400` — Invalid request
- `409` — A webhook for this resource already exists
- `500` — Server error

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
