---
title: "Add Webhook"
method: POST
path: "/projects/{projectId}/webhooks"
tags: ["Webhooks"]
---

# Add Webhook

`POST /projects/{projectId}/webhooks`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/projects/{projectId}/webhooks`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/projects/:projectId/webhooks/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `projectId` integer, required

## Request body

- EnterpriseWebhookCreateForm
  - `name` string, required: Webhook name
  - `url` string, required: Webhook URL
  - `events` string[], required: You can configure webhooks for the following events: * 'file.added' — project file is added * 'file.updated' - project file is updated * 'file.reverted' - project file is reverted * 'file.deleted' - project file is deleted * 'file.translated' — project file is fully translated * 'file.approved' — project file is fully reviewed * 'file.qa.finished' - project file QA check is finished * 'project.translated' — all strings in project are translated * 'project.approved' — all strings in project are approved * 'project.qa.finished' - all strings in project QA check are finished * 'project.built' - project are successfully built * 'preTranslation.completed' - Auto-Translation finishes, fails or is canceled * 'translation.updated' — final translation of string is updated (using Replace in suggestions feature) * 'string.added' — source string is added * 'string.updated' — source string is updated * 'string.deleted' — source string is deleted * 'string.labelsAssigned' — labels are assigned to source string * 'string.labelsUnassigned' — labels are unassigned from source string * 'label.created' — label is created * 'label.updated' — label is updated * 'label.deleted' — label is deleted * 'stringComment.created' - string comment/issue is added * 'stringComment.updated' - string comment/issue is updated * 'stringComment.deleted' - string comment/issue is deleted * 'stringComment.restored' - string comment/issue is restored * 'suggestion.added' — one of source strings is translated * 'suggestion.updated' — translation for source string is updated (using Replace in suggestions feature) * 'suggestion.deleted' — one of translations is deleted * 'suggestion.approved' — translation for string is approved * 'suggestion.disapproved' — approval for previously added translation is removed * 'task.added' - task is added * 'task.statusChanged' - task status was changed * 'task.updated' - task is updated * 'task.deleted' - task is deleted
  - `requestType` 'POST' | 'GET', required: Webhook request type
  - `isActive` boolean: Defines whether webhook is active
  - `batchingEnabled` boolean: Defines whether webhook batching is enabled
  - `contentType` 'multipart/form-data' | 'application/json' | 'application/x-www-form-urlencoded': Webhook content type
  - `headers` object: Webhook headers
  - `payload` object: Custom webhook payload
    - `project.created` object: Read more about [Events payload examples](https://developer.crowdin.com/webhooks). Additionally, you can check out Events payloads while creating webhooks via UI in your Crowdin profile settings > Webhooks tab > click Add webhook.

## Response `201`

Webhook was successfully added

- EnterpriseWebhookResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` EnterpriseWebhook, required
    - `id` integer
    - `projectId` integer
    - `name` string
    - `url` string, nullable
    - `events` string[]
    - `headers` string[]
    - `payload` object: Read more about [Events payload examples](https://developer.crowdin.com/webhooks). Additionally, you can check out Events payloads while creating webhooks via UI in your Crowdin project > Tools tab > Webhooks section > click Add webhook.
    - `isActive` boolean
    - `batchingEnabled` boolean
    - `requestType` string
    - `contentType` string, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project with specified id was not found
- `405`: Method Not Allowed

---

[API](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2.md) - [All operations](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/revisions/dc68744c5384?raw)
