> ## Documentation Index
> Fetch the complete documentation index at: https://oma-codex-339-workspace-permissions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Webhook

> Create Webhook through the OMA API.

<Info>Every request requires `anthropic-beta: webhooks-2026-03-01`. Create returns the signing secret once.</Info>


## OpenAPI

````yaml /openapi/oma.en.json post /v1/webhooks
openapi: 3.1.0
info:
  title: OMA API Reference
  version: 1.0.0
  description: Open Managed Agents application API reference.
servers:
  - url: http://localhost:38080
    description: Local OMA server
security:
  - omaApiKey: []
  - omaBearer: []
paths:
  /v1/webhooks:
    post:
      summary: Create Webhook
      operationId: OMACreateWebhook
      parameters:
        - name: anthropic-beta
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
      responses:
        '200':
          description: Successful response (OK)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
components:
  schemas:
    WebhookCreate:
      type: object
      required:
        - url
        - name
        - enabled_events
      properties:
        url:
          type: string
          format: uri
        name:
          type: string
        description:
          type: string
          default: ''
        enabled_events:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            type: string
            enum:
              - session.status_run_started
              - session.status_idled
              - session.status_rescheduled
              - session.status_terminated
              - session.deleted
              - session.updated
              - session.error
              - session.thread_created
              - session.thread_status_running
              - session.thread_status_idle
              - session.thread_status_rescheduled
              - session.thread_status_terminated
              - session.thread_idled
              - session.thread_terminated
              - session.outcome_evaluation_ended
              - vault.created
              - vault.archived
              - vault.deleted
              - vault_credential.created
              - vault_credential.archived
              - vault_credential.deleted
              - vault_credential.refresh_failed
    Webhook:
      type: object
      required:
        - id
        - type
        - url
        - name
        - description
        - enabled_events
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          example: wh_01H...
        type:
          type: string
          const: webhook
        url:
          type: string
          format: uri
        name:
          type: string
        description:
          type: string
        enabled_events:
          type: array
          items:
            type: string
            enum:
              - session.status_run_started
              - session.status_idled
              - session.status_rescheduled
              - session.status_terminated
              - session.deleted
              - session.updated
              - session.error
              - session.thread_created
              - session.thread_status_running
              - session.thread_status_idle
              - session.thread_status_rescheduled
              - session.thread_status_terminated
              - session.thread_idled
              - session.thread_terminated
              - session.outcome_evaluation_ended
              - vault.created
              - vault.archived
              - vault.deleted
              - vault_credential.created
              - vault_credential.archived
              - vault_credential.deleted
              - vault_credential.refresh_failed
        status:
          type: string
          enum:
            - enabled
            - disabled
        disabled_reason:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        signing_secret:
          type: string
          writeOnly: true
          description: Returned only when the webhook is created.
  securitySchemes:
    omaApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: OMA workspace API key.
      x-default: sk-ant-local-default
    omaBearer:
      type: http
      scheme: bearer
      description: OMA workspace API key sent as a bearer token.

````