---
title: "Create Subscription"
method: POST
path: "/webhooks/"
tags: ["Webhooks"]
---

# Create Subscription

`POST /webhooks/`

## Request body

- WebhookSubscriptionCreateRequest
  - `subscription` WebhookSubscriptionCreate, required
    - `flags` WebhookSubscriptionFlags
      - `is_valid` boolean
    - `tags` object, nullable
    - `meta` object, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `data` WebhookSubscriptionData, required
      - `url` string, uri, required
      - `headers` object, nullable
      - `payload_fields` object, nullable
      - `auth_mode` 'signature' | 'authorization', nullable
      - `event_types` WebhookEventType[], nullable
    - `secret` string, nullable

## Response `200`

Successful Response

- WebhookSubscriptionResponse
  - `count` integer
  - `subscription` WebhookSubscription
    - `flags` WebhookSubscriptionFlags
      - `is_valid` boolean
    - `tags` object, nullable
    - `meta` object, nullable
    - `name` string, nullable
    - `description` string, nullable
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `id` string, uuid, nullable
    - `data` WebhookSubscriptionData, required
      - `url` string, uri, required
      - `headers` object, nullable
      - `payload_fields` object, nullable
      - `auth_mode` 'signature' | 'authorization', nullable
      - `event_types` WebhookEventType[], nullable
    - `secret_id` string, uuid, nullable
    - `secret` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-06** `edbcb02ac8b1` — 5 info
  - added the new optional request property `subscription/data/auth_mode`
  - added the new optional request property `subscription/data/payload_fields`
  - added the new optional request property `subscription/secret`
  - added the optional property `subscription/anyOf[subschema #1: WebhookSubscription]/data/auth_mode` to the response with the `200` status
  - …1 more
- **2026-03-04** `c8917fecb5bf` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/webhooks/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/edbcb02ac8b1/schema)
