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

# Connect an external integration webhook route and rotate matching signing secrets



## OpenAPI

````yaml /openapi/control-plane-public.json post /api/v1/external-integrations/webhook-routes/connect
openapi: 3.1.0
info:
  title: AcornOps Control Plane API
  version: 0.0.1-experimental.1
  description: >-
    Control plane API for workspaces, targets, Kubernetes clusters, virtual
    machines, sessions, runs, auth, and internal execution wiring.
servers:
  - url: https://api.acornops.dev
security: []
tags:
  - name: health
    description: Health and readiness endpoints.
  - name: auth
    description: >-
      OIDC, password, browser session, and external integration account link
      endpoints.
  - name: workspaces
    description: Workspace, target, Kubernetes cluster, and VM management endpoints.
  - name: webhooks
    description: >-
      Durable webhook subscriptions, lifecycle-aware delivery, and attempt
      history.
  - name: sessions
    description: Session and message endpoints.
  - name: runs
    description: Run query, cancel, and stream endpoints.
  - name: workflows
    description: >-
      Workspace workflow definitions, schedules, sessions, and approval inbox
      endpoints.
  - name: catalog
    description: >-
      MCP registries, destination-bound browsing, scoped MCP imports, and
      credential connections.
  - name: agents
    description: >-
      Workspace-scoped custom agent definitions, triggers, versions, tests, and
      activity.
  - name: admin
    description: Operator-only admin API protected exclusively by admin bearer tokens.
  - name: internal
    description: Internal execution endpoints for execution-engine.
paths:
  /api/v1/external-integrations/webhook-routes/connect:
    post:
      tags:
        - webhooks
      summary: >-
        Connect an external integration webhook route and rotate matching
        signing secrets
      parameters:
        - in: header
          name: x-acornops-external-user-id
          required: true
          schema:
            type: string
            example: external-user-1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - deliveryUrl
              properties:
                deliveryUrl:
                  type: string
                  format: uri
                  example: https://bot.example.com/acornops/webhooks/routes/route-token
      responses:
        '200':
          description: >-
            External webhook route state. Connected subscriptions include
            freshly rotated signing secrets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalWebhookRouteConnection'
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          description: Requires a linked external integration credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '409':
          $ref: '#/components/responses/Error409'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
      security:
        - externalIntegrationClientToken: []
components:
  schemas:
    ExternalWebhookRouteConnection:
      type: object
      required:
        - status
        - connectedAt
        - lastSyncedAt
        - subscriptions
      properties:
        status:
          type: string
          enum:
            - unconfigured
            - configured
            - connected
        connectedAt:
          type: string
          format: date-time
          nullable: true
        lastSyncedAt:
          type: string
          format: date-time
          nullable: true
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/ExternalWebhookRouteSubscription'
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: object
              additionalProperties: true
              description: Optional structured error details.
    ExternalWebhookRouteSubscription:
      type: object
      required:
        - workspaceId
        - workspaceName
        - webhookId
        - eventTypes
        - enabled
        - status
        - updatedAt
      properties:
        workspaceId:
          type: string
          format: uuid
        workspaceName:
          type: string
        webhookId:
          type: string
          format: uuid
        name:
          type: string
        targetId:
          type: string
          format: uuid
          nullable: true
        eventTypes:
          type: array
          items:
            type: string
        enabled:
          type: boolean
        status:
          type: string
          enum:
            - enabled
            - disabled
        updatedAt:
          type: string
          format: date-time
        signingSecret:
          type: string
          description: >-
            Returned only by the connect endpoint after AcornOps rotates the
            webhook signing secret.
      additionalProperties: true
  responses:
    Error400:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error403:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error404:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error409:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error429:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Error500:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    externalIntegrationClientToken:
      type: http
      scheme: bearer
      bearerFormat: opaque external integration client token

````