---
title: "Create Webhook"
method: POST
path: "/v1/configs/{configId}/environments/{environmentId}/webhooks"
tags: ["Webhooks"]
---

# Create Webhook

`POST /v1/configs/{configId}/environments/{environmentId}/webhooks`

## Request

- Base URL: `https://api.configcat.com`
- URL: `https://api.configcat.com/v1/configs/{configId}/environments/{environmentId}/webhooks`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/configcat/apis/configcat-public-management-api/docs/v1/configs/:configId/environments/:environmentId/webhooks/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint creates a new Webhook in a specified Product
identified by the `productId` parameter, which can be obtained from the [List Products](#operation/get-products) endpoint.

## Path parameters

- `configId` string, uuid, required
- `environmentId` string, uuid, required

## Request body

- WebHookRequestModel
  - `url` string, required: The URL of the Webhook.
  - `content` string, nullable: The HTTP body content.
  - `httpMethod` 'get' | 'post'
  - `webHookHeaders` WebhookHeaderModel[], nullable: List of HTTP headers.
    - `key` string, required: The HTTP header key.
    - `value` string, required: The HTTP header value.
    - `isSecure` boolean: Indicates whether the header value is sensitive.

## Response `201`

When the creation was successful.

- WebhookResponseModel
  - `webhookId` integer, required: The identifier of the Webhook.
  - `url` string, required: The URL of the Webhook.
  - `httpMethod` 'get' | 'post', required
  - `content` string, nullable, required: The HTTP body content.
  - `webHookHeaders` WebhookHeaderResponseModel[], required: List of HTTP headers that the Webhook must send.
    - `key` string, required: The HTTP header key.
    - `value` string, required: The HTTP header value.
    - `isSecure` boolean, required: Indicates whether the header value is sensitive.
  - `config` WebhookConfig, required: The Config where the applied changes will invoke the Webhook.
    - `name` string, required: The Config's name.
    - `configId` string, uuid, required: The Config's identifier.
  - `environment` WebhookEnvironment, required: The Environment where the applied changes will invoke the Webhook.
    - `name` string, required: The Environment's name.
    - `environmentId` string, uuid, required: The Environment's identifier.

## Other responses

- `400`: Bad request.
- `404`: Not found.
- `429`: Too many requests. In case of the request rate exceeds the rate limits.

## Changes

- **2025-10-09** `8b8a102e5ed1`: 17 breaking, 6 info
  - added `#/components/schemas/WebHookHttpMethod` to the `httpMethod` request property `allOf` list (media type: application/json)
  - added `#/components/schemas/WebHookHttpMethod` to the `httpMethod` request property `allOf` list (media type: text/json)
  - added `#/components/schemas/WebHookHttpMethod` to the `httpMethod` request property `allOf` list (media type: application/*+json)
  - the request property `webHookHeaders/items/key` became not nullable (media type: application/json)
  - …19 more
- **2025-05-16** `2949501eef38`: 6 breaking, 17 info
  - the response property `webHookHeaders/items/value` became nullable for the status `201`
  - the response property `webHookHeaders/items/value` became optional for the status `201`
  - the `webHookHeaders/items/key` response property's maxLength was unset from `255` for the response status `201`
  - the `webHookHeaders/items/value` response property's maxLength was unset from `1000` for the response status `201`
  - …19 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/configcat/apis/configcat-public-management-api/changes/v1/configs/:configId/environments/:environmentId/webhooks/post.md)

---

[API](https://skmtc.dev/configcat/apis/configcat-public-management-api.md) - [All operations](https://skmtc.dev/configcat/apis/configcat-public-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/configcat/apis/configcat-public-management-api/revisions/0f143561d265?raw)
