---
title: "Register webhook"
method: POST
path: "/v1/projects/{project_id}/webhooks"
tags: ["Webhooks"]
---

# Register webhook

`POST /v1/projects/{project_id}/webhooks`

## Request

- Base URL: `https://api.agentry.sh`
- URL: `https://api.agentry.sh/v1/projects/{project_id}/webhooks`
- Auth: HTTP bearer

Owner-only recoverable command. Requires a stable Idempotency-Key; exact replay returns the same encrypted signing secret and never registers a duplicate subscription.

## Path parameters

- `project_id` string, required

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `url` string, required
  - `events` string[], required
  - `description` string

## Response `200`

OK

- object
  - `id` string, required
  - `url` string, required
  - `events` string[], required
  - `signing_secret` string, required
  - `signing_secret_prefix` string, required
  - `idempotent_replay` boolean, required
  - `next_action` string

## Other responses

- `409`: The key was reused with changed evidence
- `default`: Error

---

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