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

# Create endpoint

> Register a webhook endpoint (201). The response carries the signing secret ONCE.



## OpenAPI

````yaml /schemas/operator.json post /v1/webhook_endpoints
openapi: 3.1.0
info:
  title: Omegas Operator API
  version: 0.1.0
  description: >-
    The public /v1 machine surface: cloud browser devices, tasks, live-view
    sessions, escalations, usage, webhook endpoints, and the audit trail.
    Generated from the same OpenAPI document the Rust API is checked against.
servers:
  - url: https://api.omegas.dev
    description: Production
security: []
paths:
  /v1/webhook_endpoints:
    post:
      tags:
        - Endpoints
      summary: Create endpoint
      description: >-
        Register a webhook endpoint (201). The response carries the signing
        secret ONCE.
      operationId: create_endpoint
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEndpointBody'
        required: true
      responses:
        '201':
          description: The endpoint, with its signing secret (shown once)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedEndpoint'
        '400':
          description: invalid_url, invalid_space_id, or unknown_event_type
        '401':
          description: invalid_api_key
        '403':
          description: insufficient_scope or product_not_entitled
        '429':
          description: rate_limited
        '503':
          description: signing_unavailable — OMEGA_SECRET_KEY is not configured
      security:
        - bearer_operator: []
components:
  schemas:
    CreateEndpointBody:
      type: object
      required:
        - url
      properties:
        description:
          type:
            - string
            - 'null'
          description: Free-text label for humans reading the settings list.
        event_types:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Event types to receive. Omit or leave empty for ALL of them.
        space_id:
          type:
            - string
            - 'null'
          description: >-
            Raw uuid of the Space to scope deliveries to. Omit for org-wide
            (every Space).
        url:
          type: string
          description: '`https://…`, publicly resolvable. Rejected otherwise.'
    CreatedEndpoint:
      allOf:
        - $ref: '#/components/schemas/Endpoint'
        - type: object
          required:
            - secret
          properties:
            secret:
              type: string
              description: >-
                The signing key, `whsec_…`. Store it now: it is not recoverable,
                and rotation means creating

                a new endpoint.
      description: >-
        A freshly created endpoint. `secret` appears HERE and nowhere else,
        ever.
    Endpoint:
      type: object
      description: An endpoint as read back. Deliberately has NO secret field of any kind.
      required:
        - id
        - object
        - url
        - event_types
        - enabled
        - failure_count
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
        description:
          type:
            - string
            - 'null'
        disabled_at:
          type:
            - string
            - 'null'
        enabled:
          type: boolean
        event_types:
          type: array
          items:
            type: string
          description: Empty = every event type.
        failure_count:
          type: integer
          format: int32
          description: Consecutive failed delivery attempts since the last success.
        id:
          type: string
          description: '`whe_<uuid>`.'
        last_error:
          type:
            - string
            - 'null'
          description: >-
            A clamped failure summary — a status code or transport class, never
            a response body.
        last_success_at:
          type:
            - string
            - 'null'
        object:
          type: string
          description: >-
            Discriminator for polymorphic SDK decoders. Always
            `"webhook_endpoint"`.
        space_id:
          type:
            - string
            - 'null'
          description: '`null` = org-wide.'
        updated_at:
          type: string
        url:
          type: string
  securitySchemes:
    bearer_operator:
      type: http
      scheme: bearer
      bearerFormat: Opaque

````