---
title: "Create an event webhook"
method: POST
path: "/orgs/{orgID}/projects/{projectID}/event-webhooks"
tags: ["Events"]
---

# Create an event webhook

`POST /orgs/{orgID}/projects/{projectID}/event-webhooks`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/event-webhooks`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Subscribes to future events from agents matching the scope. Projects can have up to 100 active subscriptions across all selections. Each selection can have only one active webhook per URL; duplicates return 409. Matching scopes are additive. Requires project management permission.

## Path parameters

- `orgID` string, required
- `projectID` string, required: Project ID (proj_...).

## Request body

- CreateEventWebhookRequest
  - `url` string, required: Endpoint URL, at most 2048 bytes after URL encoding.
  - `event_types` EventWebhookEventType[], required
  - `signing_secret_id` string: Optional project-available generic secret.
  - `scope` union, required
    - ProjectEventWebhookScope
      - `type` 'project', required
    - AgentProfileEventWebhookScope
      - `type` 'profile', required
      - `agent_profile_id` string, required
    - AgentEventWebhookScope: Watches only this agent, not its descendants.
      - `type` 'agent', required
      - `agent_id` string, required

## Response `201`

Webhook created.

- EventWebhook
  - `url` string, required: Endpoint URL, at most 2048 bytes after URL encoding.
  - `event_types` EventWebhookEventType[], required
  - `signing_secret_id` string: Optional project-available generic secret.
  - `scope` union, required
    - ProjectEventWebhookScope
      - `type` 'project', required
    - AgentProfileEventWebhookScope
      - `type` 'profile', required
      - `agent_profile_id` string, required
    - AgentEventWebhookScope: Watches only this agent, not its descendants.
      - `type` 'agent', required
      - `agent_id` string, required
  - `scope_name` string: Current name of the selected agent or profile, derived when read. Omitted for project scope or an unavailable name; use the scope ID as a display fallback.
  - `id` string, required
  - `org_id` string, required
  - `project_id` string, required: Project ID (proj_...).
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-11-09** `4349dd4a98eb`: 1 info
  - added the optional property `scope_name` to the response with the `201` status
- **2026-10-28** `c85cb3714458`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/projects/:projectID/event-webhooks/post.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
