> ## Documentation Index
> Fetch the complete documentation index at: https://docs.domesystems.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Subscription

> Subscriptions.



## OpenAPI

````yaml POST /v1/webhooks/subscriptions
openapi: 3.0.3
info:
  title: Dome Platform API
  description: Connect and REST APIs for the Dome agent governance platform.
  version: 2.0.0
servers:
  - url: https://api.domesystems.ai
    description: Production
security: []
tags:
  - name: Agents
  - name: Authorization
  - name: Guards
  - name: Tools
  - name: Tool Catalog
  - name: Models
  - name: Model Pools
  - name: Quotas
  - name: Gateways
  - name: Webhooks
  - name: Audit
  - name: Workspaces
  - name: Access Control
  - name: Tenants
  - name: Platform Keys
  - name: Enrollment
  - name: Platform
  - name: Identity
paths:
  /v1/webhooks/subscriptions:
    post:
      tags:
        - Webhooks
      description: Subscriptions.
      operationId: EventingService_CreateSubscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubscriptionResponse'
components:
  schemas:
    CreateSubscriptionRequest:
      type: object
      properties:
        workspace_id:
          type: string
        destination_id:
          type: string
          description: >-
            destination_id supports subscriptions that already point at an
            existing
             endpoint. New user-facing creates instead send delivery_endpoint so the
             endpoint and subscription can be committed atomically.
        name:
          type: string
        event_types:
          type: array
          items:
            type: string
        filters:
          type: object
        delivery_endpoint:
          $ref: '#/components/schemas/CreateDestinationRequest'
    CreateSubscriptionResponse:
      type: object
      properties:
        subscription:
          $ref: '#/components/schemas/Subscription'
        delivery_endpoint:
          $ref: '#/components/schemas/Destination'
        signing_secret:
          type: string
        signing_key_id:
          type: string
    CreateDestinationRequest:
      type: object
      properties:
        workspace_id:
          type: string
        name:
          type: string
        endpoint_url:
          type: string
        headers:
          type: array
          items:
            $ref: '#/components/schemas/HeaderSpec'
          description: >-
            Custom headers sent with every delivery. A source="secret" header
            carries
             its value here on WRITE ONLY — the value is stored in Vault (never in a
             relational column) and is never echoed back on reads (see HeaderSpec).
        content_format:
          type: string
          description: >-
            Body shape: "object" (default when empty) or "array" (single-element
            JSON
             array wrap, for array-only intakes).
        provider_key:
          type: string
          description: |-
            provider_key selects an off-the-shelf provider preset (see
             ListDestinationProviders). When set, destination_type is derived as
             "provider", the endpoint URL is BUILT from provider_settings (endpoint_url
             must be empty), custom headers are rejected (the provider authenticates via
             its credentials), and content_format must be "" or "object" (array is a
             custom-only knob). Empty ⇒ a "webhook" (Custom) destination.
        provider_settings:
          type: object
          additionalProperties:
            type: string
          description: >-
            provider_settings are the provider's non-secret settings
            (site/region/
             dataset/owner_repo/…), validated against the provider's settings schema and
             used to build the endpoint URL. Persisted in a relational column.
        provider_credentials:
          type: object
          additionalProperties:
            type: string
          description: >-
            provider_credentials are the provider's secret credentials
            (api_key/token/
             routing_key/…). WRITE ONLY — stored in Vault, never persisted to a column or
             echoed on reads. Required credentials must be supplied on create.
    Subscription:
      type: object
      properties:
        id:
          type: string
        workspace_id:
          type: string
        tenant_id:
          type: string
        destination_id:
          type: string
        name:
          type: string
        event_types:
          type: array
          items:
            type: string
        filters:
          type: object
        active:
          type: boolean
        created_by_user_id:
          type: string
        updated_by_user_id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      description: >-
        Subscription is the customer-visible routing rule. User-facing surfaces
        pair
         it with its delivery endpoint; destination_id remains the relational link.
    Destination:
      type: object
      properties:
        id:
          type: string
        workspace_id:
          type: string
        tenant_id:
          type: string
        name:
          type: string
        destination_type:
          type: string
        endpoint_url:
          type: string
        active:
          type: boolean
        health_status:
          type: string
        circuit_state:
          type: string
        rate_limit_per_second:
          type: integer
          format: int32
        concurrency_limit:
          type: integer
          format: int32
        request_timeout_seconds:
          type: integer
          format: int32
        max_body_bytes:
          type: integer
          format: int32
        signing_key_id:
          type: string
        last_success_at:
          type: string
          format: date-time
        last_failure_at:
          type: string
          format: date-time
        created_by_user_id:
          type: string
        updated_by_user_id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        headers:
          type: array
          items:
            $ref: '#/components/schemas/HeaderSpec'
          description: |-
            Custom headers sent with every delivery (secret values blanked — see
             HeaderSpec).
        provider_key:
          type: string
          description: |-
            Provider destinations: the registry key plus its non-secret settings
             (site/region/dataset/...). Both empty for destination_type="webhook".
        provider_settings:
          type: object
          additionalProperties:
            type: string
        content_format:
          type: string
          description: |-
            Body shape for custom destinations: "object" (default) or "array"
             (single-element JSON array wrap, for array-only intakes).
    HeaderSpec:
      type: object
      properties:
        name:
          type: string
        source:
          type: string
        value:
          type: string
      description: >-
        Destination is the customer-visible view of an eventing destination. It
        never
         exposes the signing secret or its Vault reference — only safe display metadata
         and worker-enforced health/circuit state.
         HeaderSpec is one custom header on a webhook destination. For
         source="literal" the value is stored and echoed on reads. For
         source="secret" the value is accepted on WRITE ONLY (it is stored in Vault,
         never in a relational column) and is NEVER echoed — reads return value="".

````