---
title: "Create a Webhook"
method: POST
path: "/projects/{project_id}/webhooks"
tags: ["Webhooks"]
---

# Create a Webhook

`POST /projects/{project_id}/webhooks`

Create a Webhook in a provided Project

## Path parameters

- `project_id` integer, required

## Request body

- WebhookRequestBody — Webhook request body
  - `description` string, required — A short description of the Webhook.
  - `events` string[], required — List of events subscribed to the webhook.
  - `name` string, required — Name of the Webhook.
  - `url` string, required — Webhook URL

## Response `201`

Return the created Webhook

- Webhook
  - `active` boolean — Is Webhook active.
  - `created` string — Created time.
  - `description` string — A short description of the Webhook.
  - `events` string[] — List of events subscribed to the webhook.
  - `id` string — ID of this Webhook
  - `last_modified` string — Last modification time.
  - `name` string, required — Name of the Webhook.
  - `project_id` integer, required — ID of the project of the Environment.
  - `url` string, required — Webhook URL

## Other responses

- `400` — Invalid request body supplied
- `401` — Invalid credentials
- `403` — You do not have access to the specified Project

---

[API](https://skmtc.dev/optimizely/apis/optimizely-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-api/revisions/5151fe6a2297/schema)
