---
title: "Create project webhook"
method: POST
path: "/v1/projects/{projectId}/hooks"
tags: ["Hooks"]
---

# Create project webhook

`POST /v1/projects/{projectId}/hooks`

## Request

- Base URL: `https://api.ybug.io`
- URL: `https://api.ybug.io/v1/projects/{projectId}/hooks`
- Auth: HTTP bearer

Registers a new webhook endpoint for the project. Provide the desired event and HTTPS target URL; optionally include a secret for request signing.

## Request body

- object
  - `event` string, required: Event that triggers the webhook. Currently, only feedback.created is supported per project.
  - `target_url` string, uri, required: HTTPS endpoint that receives the webhook payload.
  - `secret` string: Optional shared secret used to sign webhook payloads.

## Response `201`

Webhook successfully created.

- Hook
  - `id` string, uuid
  - `event` string
  - `target_url` string, uri
  - `active` boolean
  - `created_at` string, date-time

## Other responses

- `400`: Bad Request. The request was invalid (e.g., missing required fields in payload).
- `401`: Unauthorized. Missing or invalid API token.
- `403`: Forbidden. The user does not have permission to access the resource, or the operation is restricted by the account plan.
- `404`: Not Found. The requested resource (team or project ID) could not be found.
- `409`: Conflict. A webhook for the specified event already exists for this project.
- `429`: Too Many Requests. The rate limit for the client has been exceeded.
- `500`: Internal Server Error. An unexpected error occurred on the server.

---

[API](https://skmtc.dev/ybug/apis/ybug-api.md) · [All operations](https://skmtc.dev/ybug/apis/ybug-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ybug/apis/ybug-api/revisions/50f50cb05459?raw)
