openapi: 3.1.2
info:
  title: 'TrolyPage Public API'
  version: 1.0.0
  description: 'TrolyPage Public API Platform v1 across Workspace, Client Chat, and Partner Management planes.'
servers:
  -
    url: 'https://api.trolypage.com/v1'
    description: 'Production Public API'
  -
    url: 'https://sandbox-api.trolypage.com/v1'
    description: 'Sandbox Public API'
components:
  securitySchemes:
    WorkspaceBearer:
      type: http
      scheme: bearer
      description: 'Workspace private token (tp_live_*, tp_test_*) or OAuth access token (tp_oa_*).'
    ClientSessionBearer:
      type: http
      scheme: bearer
      description: 'Short-lived visitor client chat token (tp_cs_*).'
    PartnerBasic:
      type: http
      scheme: basic
    PartnerClientId:
      type: apiKey
      in: header
      name: X-Partner-Client-Id
    PartnerClientSecret:
      type: apiKey
      in: header
      name: X-Partner-Client-Secret
  schemas:
    Money:
      type: object
      required:
        - amount_minor
        - currency
      properties:
        amount_minor:
          type: integer
        currency:
          type: string
          example: VND
    ItemEnvelope:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: object
          additionalProperties: true
        meta:
          type: object
          properties:
            request_id:
              type: string
    CollectionEnvelope:
      type: object
      required:
        - data
        - meta
        - links
      properties:
        data:
          type: array
          items:
            type: object
        meta:
          type: object
          properties:
            request_id:
              type: string
            has_more:
              type: boolean
            next_cursor:
              type:
                - string
                - 'null'
        links:
          type: object
          properties:
            next:
              type:
                - string
                - 'null'
    OAuthToken:
      type: object
      required:
        - token_type
        - access_token
        - refresh_token
        - expires_in
        - scope
        - installation_id
        - workspace_id
      properties:
        token_type:
          const: Bearer
        access_token:
          type: string
        refresh_token:
          type: string
        expires_in:
          type: integer
        scope:
          type: string
        installation_id:
          type: string
        workspace_id:
          type: string
    OAuthIntrospection:
      type: object
      required:
        - active
      properties:
        active:
          type: boolean
        scope:
          type:
            - string
            - 'null'
        exp:
          type:
            - integer
            - 'null'
        installation_id:
          type:
            - string
            - 'null'
    OAuthRevocation:
      type: object
      required:
        - revoked
      properties:
        revoked:
          const: true
    ProblemDetails:
      type: object
      required:
        - type
        - title
        - status
        - detail
        - code
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
        code:
          type: string
        request_id:
          type: string
        retryable:
          type: boolean
    WebhookEvent:
      type: object
      required:
        - id
        - type
        - schema_version
        - workspace_id
        - occurred_at
        - data
      properties:
        id:
          type: string
        type:
          type: string
        schema_version:
          type: string
        workspace_id:
          type: string
        occurred_at:
          type: string
          format: date-time
        data:
          type: object
          additionalProperties: true
paths:
  '/agent-alerts/{id}':
    get:
      operationId: get_agent_alerts_show
      summary: 'Get /agent-alerts/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-alerts.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_alerts_update
      summary: 'Patch /agent-alerts/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-alerts.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                severity:
                  description: 'Merge patch field.'
                is_active:
                  type: boolean
              additionalProperties: false
    delete:
      operationId: delete_agent_alerts_destroy
      summary: 'Delete /agent-alerts/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-alerts.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /agent-config-imports:
    post:
      operationId: post_agent_config_imports_store
      summary: 'Post /agent-config-imports'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-config-imports.store
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                bundle:
                  type: [array, object]
                dry_run:
                  type: boolean
                target_agent_id:
                  type: [string, 'null']
              required:
                - bundle
              additionalProperties: true
  /agent-configuration-diffs:
    post:
      operationId: post_agent_configuration_diffs_store
      summary: 'Post /agent-configuration-diffs'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-configuration-diffs.store
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  type: string
                base_version_id:
                  type: [string, 'null']
              required:
                - agent_id
              additionalProperties: true
  /agent-diffs:
    get:
      operationId: get_agent_diffs_show
      summary: 'Get /agent-diffs'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-diffs.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/agent-knowledge-bindings/{id}':
    get:
      operationId: get_agent_knowledge_bindings_show
      summary: 'Get /agent-knowledge-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-knowledge-bindings.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_knowledge_bindings_update
      summary: 'Patch /agent-knowledge-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-knowledge-bindings.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                priority:
                  type: integer
              additionalProperties: false
    delete:
      operationId: delete_agent_knowledge_bindings_destroy
      summary: 'Delete /agent-knowledge-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-knowledge-bindings.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agent-media-bindings/{id}':
    get:
      operationId: get_agent_media_bindings_show
      summary: 'Get /agent-media-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-media-bindings.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_media_bindings_update
      summary: 'Patch /agent-media-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-media-bindings.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                caption:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_agent_media_bindings_destroy
      summary: 'Delete /agent-media-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-media-bindings.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /agent-memory-records:
    post:
      operationId: post_agent_memory_records_store
      summary: 'Post /agent-memory-records'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-memory-records.store
      x-required-scopes:
        - 'agents:write|memory:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  type: string
                subscriber_id:
                  type: string
                key:
                  type: string
                  maxLength: 80
                value:
                  type: string
                  maxLength: 2000
                type:
                  type: string
                  maxLength: 32
              required:
                - agent_id
                - subscriber_id
                - key
                - value
              additionalProperties: true
  '/agent-memory-records/{id}':
    get:
      operationId: get_agent_memory_records_show
      summary: 'Get /agent-memory-records/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-memory-records.show
      x-required-scopes:
        - 'agents:read|memory:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    delete:
      operationId: delete_agent_memory_records_destroy
      summary: 'Delete /agent-memory-records/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-memory-records.destroy
      x-required-scopes:
        - 'agents:write|memory:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /agent-routing-rules:
    get:
      operationId: get_agent_routing_rules_index
      summary: 'Get /agent-routing-rules'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-routing-rules.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_agent_routing_rules_store
      summary: 'Post /agent-routing-rules'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-routing-rules.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                is_enabled:
                  type: boolean
                priority:
                  type: integer
                conditions:
                  type: [array, object]
                agent_config:
                  type: [array, object]
              required:
                - name
                - agent_config
              additionalProperties: true
  /agent-routing-rules/reorders:
    post:
      operationId: post_agent_routing_rules_reorder
      summary: 'Post /agent-routing-rules/reorders'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-routing-rules.reorder
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rule_ids:
                  type: [array, object]
                  minItems: 1
              required:
                - rule_ids
              additionalProperties: true
  '/agent-routing-rules/{id}':
    get:
      operationId: get_agent_routing_rules_show
      summary: 'Get /agent-routing-rules/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-routing-rules.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_routing_rules_update
      summary: 'Patch /agent-routing-rules/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-routing-rules.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                is_enabled:
                  type: boolean
                priority:
                  type: integer
                conditions:
                  description: 'Merge patch field.'
                agent_config:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_agent_routing_rules_destroy
      summary: 'Delete /agent-routing-rules/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-routing-rules.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agent-runs/{id}':
    get:
      operationId: get_agent_runs_show
      summary: 'Get /agent-runs/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-runs.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/agent-runs/{id}/cancellations':
    post:
      operationId: post_agent_runs_cancellations
      summary: 'Post /agent-runs/{id}/cancellations'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-runs.cancellations
      x-required-scopes:
        - 'agents:execute'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/agent-runs/{id}/events':
    get:
      operationId: get_agent_runs_events
      summary: 'Get /agent-runs/{id}/events'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-runs.events
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            text/event-stream:
              schema:
                type: string
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Last-Event-ID
          in: header
          schema:
            type: string
  '/agent-runs/{id}/feedback':
    post:
      operationId: post_agent_runs_feedback
      summary: 'Post /agent-runs/{id}/feedback'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-runs.feedback
      x-required-scopes:
        - 'agents:execute'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rating:
                  type: string
                  enum: [positive, negative]
                comment:
                  type: [string, 'null']
                  maxLength: 1000
                expected_answer:
                  type: [string, 'null']
                  maxLength: 2000
              required:
                - rating
              additionalProperties: true
  /agent-sessions:
    get:
      operationId: get_agent_sessions_index
      summary: 'Get /agent-sessions'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-sessions.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_agent_sessions_store
      summary: 'Post /agent-sessions'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-sessions.store
      x-required-scopes:
        - 'agents:execute'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  type: string
                  maxLength: 64
                customer_id:
                  type: [string, 'null']
                  maxLength: 64
                subscriber_id:
                  type: [string, 'null']
                  maxLength: 128
                external_session_ref:
                  type: [string, 'null']
                  maxLength: 190
                metadata:
                  type: [array, object]
              required:
                - agent_id
              additionalProperties: true
  '/agent-sessions/{id}':
    get:
      operationId: get_agent_sessions_show
      summary: 'Get /agent-sessions/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-sessions.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_sessions_update
      summary: 'Patch /agent-sessions/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-sessions.update
      x-required-scopes:
        - 'agents:execute'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                status:
                  description: 'Merge patch field.'
                metadata:
                  description: 'Merge patch field.'
              additionalProperties: false
  '/agent-sessions/{id}/runs':
    post:
      operationId: post_agent_sessions_runs_store
      summary: 'Post /agent-sessions/{id}/runs'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-sessions.runs.store
      x-required-scopes:
        - 'agents:execute'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input_message:
                  type: string
                  maxLength: 8000
                mode:
                  type: string
                  enum: [sandbox, simulate, live]
                simulate_tools:
                  type: array
                  maxItems: 20
                  items: { type: object, properties: { tool: { type: string, maxLength: 120 }, arguments: { type: [array, object] } }, required: [tool] }
                defer_completion:
                  type: boolean
                variables:
                  type: [array, object]
                  maxItems: 20
              required:
                - input_message
              additionalProperties: true
  /agent-setups:
    post:
      operationId: post_agent_setups_store
      summary: 'Post /agent-setups'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-setups.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                template_key:
                  type: [string, 'null']
                  maxLength: 64
                input:
                  type: [array, object]
              required:
                - name
              additionalProperties: true
  '/agent-setups/{id}':
    get:
      operationId: get_agent_setups_show
      summary: 'Get /agent-setups/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-setups.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_setups_update
      summary: 'Patch /agent-setups/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-setups.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                input:
                  description: 'Merge patch field.'
                blueprint:
                  description: 'Merge patch field.'
              additionalProperties: false
  '/agent-skills/{id}':
    get:
      operationId: get_agent_skills_show
      summary: 'Get /agent-skills/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-skills.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_skills_update
      summary: 'Patch /agent-skills/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-skills.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                description:
                  description: 'Merge patch field.'
                instructions:
                  description: 'Merge patch field.'
                is_enabled:
                  type: boolean
              additionalProperties: false
    delete:
      operationId: delete_agent_skills_destroy
      summary: 'Delete /agent-skills/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-skills.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /agent-templates:
    get:
      operationId: get_agent_templates_index
      summary: 'Get /agent-templates'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-templates.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/agent-test-cases/{id}':
    get:
      operationId: get_agent_test_cases_show
      summary: 'Get /agent-test-cases/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-test-cases.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_test_cases_update
      summary: 'Patch /agent-test-cases/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-test-cases.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                input_messages:
                  description: 'Merge patch field.'
                expected_assertions:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_agent_test_cases_destroy
      summary: 'Delete /agent-test-cases/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-test-cases.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agent-tool-bindings/{id}':
    get:
      operationId: get_agent_tool_bindings_show
      summary: 'Get /agent-tool-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-tool-bindings.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_tool_bindings_update
      summary: 'Patch /agent-tool-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-tool-bindings.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                is_enabled:
                  type: boolean
                config:
                  description: 'Merge patch field.'
                description:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_agent_tool_bindings_destroy
      summary: 'Delete /agent-tool-bindings/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-tool-bindings.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agent-triggers/{id}':
    get:
      operationId: get_agent_triggers_show
      summary: 'Get /agent-triggers/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-triggers.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_triggers_update
      summary: 'Patch /agent-triggers/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-triggers.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                is_active:
                  type: boolean
                config:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_agent_triggers_destroy
      summary: 'Delete /agent-triggers/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-triggers.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agent-variables/{id}':
    get:
      operationId: get_agent_variables_show
      summary: 'Get /agent-variables/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-variables.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agent_variables_update
      summary: 'Patch /agent-variables/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-variables.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                value:
                  description: 'Merge patch field.'
                description:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_agent_variables_destroy
      summary: 'Delete /agent-variables/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-variables.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agent-versions/{id}':
    get:
      operationId: get_agent_versions_show
      summary: 'Get /agent-versions/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agent-versions.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /agents:
    get:
      operationId: get_agents_index
      summary: 'Get /agents'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_agents_store
      summary: 'Post /agents'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                description:
                  type: [string, 'null']
                  maxLength: 1000
                template_key:
                  type: [string, 'null']
                  maxLength: 64
                provider:
                  type: string
                  maxLength: 40
                model:
                  type: string
                  maxLength: 80
                system_prompt:
                  type: [string, 'null']
                  maxLength: 32000
                temperature:
                  type: number
                  minimum: 0
                  maximum: 2
                max_tokens:
                  type: integer
                  minimum: 1
                  maximum: 128000
                memory_config:
                  type: [array, object]
                safety_config:
                  type: [array, object]
              required:
                - name
              additionalProperties: true
  '/agents/{id}':
    get:
      operationId: get_agents_show
      summary: 'Get /agents/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agents_update
      summary: 'Patch /agents/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
    delete:
      operationId: delete_agents_destroy
      summary: 'Delete /agents/{id}'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.destroy
      x-required-scopes:
        - 'agents:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agents/{id}/alerts':
    get:
      operationId: get_agents_alerts_index
      summary: 'Get /agents/{id}/alerts'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.alerts.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_agents_alerts_store
      summary: 'Post /agents/{id}/alerts'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.alerts.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                type:
                  type: string
                  maxLength: 60
                severity:
                  type: string
                  enum: [info, warning, critical]
                conditions:
                  type: [array, object]
                notify_config:
                  type: [array, object]
              required:
                - name
                - type
              additionalProperties: true
  '/agents/{id}/clones':
    post:
      operationId: post_agents_clones
      summary: 'Post /agents/{id}/clones'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.clones
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: [string, 'null']
                  maxLength: 120
                sections:
                  type: array
                  items: { type: string, enum: [prompt, tools, skills, variables, knowledge] }
              additionalProperties: true
  '/agents/{id}/config-exports':
    post:
      operationId: post_agents_config_exports
      summary: 'Post /agents/{id}/config-exports'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.config-exports
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/agents/{id}/configuration-schema':
    get:
      operationId: get_agents_configuration_schema
      summary: 'Get /agents/{id}/configuration-schema'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.configuration-schema
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/agents/{id}/deactivate':
    post:
      operationId: post_agents_deactivate
      summary: 'Post /agents/{id}/deactivate'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.deactivate
      x-required-scopes:
        - 'agents:publish'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/agents/{id}/deactivations':
    post:
      operationId: post_agents_deactivations_store
      summary: 'Post /agents/{id}/deactivations'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.deactivations.store
      x-required-scopes:
        - 'agents:publish'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/agents/{id}/draft':
    get:
      operationId: get_agents_draft_show
      summary: 'Get /agents/{id}/draft'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.draft.show
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agents_draft_update
      summary: 'Patch /agents/{id}/draft'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.draft.update
      x-required-scopes:
        - 'agents:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agents/{id}/knowledge-bindings':
    get:
      operationId: get_agents_knowledge_bindings_index
      summary: 'Get /agents/{id}/knowledge-bindings'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.knowledge-bindings.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_agents_knowledge_bindings_store
      summary: 'Post /agents/{id}/knowledge-bindings'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.knowledge-bindings.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                knowledge_source_id:
                  type: string
                priority:
                  type: integer
              required:
                - knowledge_source_id
              additionalProperties: true
  '/agents/{id}/media-bindings':
    get:
      operationId: get_agents_media_bindings_index
      summary: 'Get /agents/{id}/media-bindings'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.media-bindings.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_agents_media_bindings_store
      summary: 'Post /agents/{id}/media-bindings'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.media-bindings.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                asset_id:
                  type: string
                variable_key:
                  type: string
                  maxLength: 80
                caption:
                  type: [string, 'null']
                  maxLength: 500
              required:
                - asset_id
                - variable_key
              additionalProperties: true
  '/agents/{id}/memory-config':
    get:
      operationId: get_agents_memory_config_show
      summary: 'Get /agents/{id}/memory-config'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.memory-config.show
      x-required-scopes:
        - 'agents:read|memory:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agents_memory_config_update
      summary: 'Patch /agents/{id}/memory-config'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.memory-config.update
      x-required-scopes:
        - 'agents:write|memory:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agents/{id}/memory-configuration':
    get:
      operationId: get_agents_memory_configuration_show
      summary: 'Get /agents/{id}/memory-configuration'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.memory-configuration.show
      x-required-scopes:
        - 'agents:read|memory:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_agents_memory_configuration_update
      summary: 'Patch /agents/{id}/memory-configuration'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.memory-configuration.update
      x-required-scopes:
        - 'agents:write|memory:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/agents/{id}/publications':
    post:
      operationId: post_agents_publications_store
      summary: 'Post /agents/{id}/publications'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.publications.store
      x-required-scopes:
        - 'agents:publish'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fingerprint:
                  type: string
                  minLength: 64
                  maxLength: 64
                change_reason:
                  type: [string, 'null']
                  maxLength: 255
                require_approval:
                  type: boolean
              required:
                - fingerprint
              additionalProperties: true
  '/agents/{id}/publish':
    post:
      operationId: post_agents_publish
      summary: 'Post /agents/{id}/publish'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.publish
      x-required-scopes:
        - 'agents:publish'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fingerprint:
                  type: string
                  minLength: 64
                  maxLength: 64
                change_reason:
                  type: [string, 'null']
                  maxLength: 255
                require_approval:
                  type: boolean
              required:
                - fingerprint
              additionalProperties: true
  '/agents/{id}/readiness':
    get:
      operationId: get_agents_readiness
      summary: 'Get /agents/{id}/readiness'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.readiness
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/agents/{id}/restorations':
    post:
      operationId: post_agents_restorations_store
      summary: 'Post /agents/{id}/restorations'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.restorations.store
      x-required-scopes:
        - 'agents:publish'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version_id:
                  type: string
                reason:
                  type: [string, 'null']
                  maxLength: 255
              required:
                - version_id
              additionalProperties: true
  '/agents/{id}/restore':
    post:
      operationId: post_agents_restore
      summary: 'Post /agents/{id}/restore'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.restore
      x-required-scopes:
        - 'agents:publish'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version_id:
                  type: string
                reason:
                  type: [string, 'null']
                  maxLength: 255
              required:
                - version_id
              additionalProperties: true
  '/agents/{id}/scenario-reviews':
    post:
      operationId: post_agents_scenario_reviews_store
      summary: 'Post /agents/{id}/scenario-reviews'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.scenario-reviews.store
      x-required-scopes:
        - 'agents:publish'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                fingerprint:
                  type: string
                  minLength: 64
                  maxLength: 64
                verdict:
                  type: string
                  enum: [passed, failed]
                evidence:
                  type: [array, object]
                notes:
                  type: [string, 'null']
                  maxLength: 1000
              required:
                - fingerprint
                - verdict
                - evidence
              additionalProperties: true
  '/agents/{id}/skills':
    get:
      operationId: get_agents_skills_index
      summary: 'Get /agents/{id}/skills'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.skills.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_agents_skills_store
      summary: 'Post /agents/{id}/skills'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.skills.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 100
                description:
                  type: [string, 'null']
                  maxLength: 500
                instructions:
                  type: string
                  maxLength: 20000
                is_enabled:
                  type: boolean
              required:
                - name
                - instructions
              additionalProperties: true
  '/agents/{id}/test-cases':
    get:
      operationId: get_agents_test_cases_index
      summary: 'Get /agents/{id}/test-cases'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.test-cases.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_agents_test_cases_store
      summary: 'Post /agents/{id}/test-cases'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.test-cases.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 160
                input_messages:
                  type: [array, object]
                  minItems: 1
                expected_assertions:
                  type: [array, object]
                context_variables:
                  type: [array, object]
              required:
                - name
                - input_messages
              additionalProperties: true
  '/agents/{id}/test-runs':
    post:
      operationId: post_agents_test_runs_store
      summary: 'Post /agents/{id}/test-runs'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.test-runs.store
      x-required-scopes:
        - 'agents:execute|agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  type: string
                  maxLength: 4000
                simulate_tools:
                  type: array
                  maxItems: 20
                  items: { type: object, properties: { tool: { type: string, maxLength: 120 }, arguments: { type: [array, object] } }, required: [tool] }
                mode:
                  type: string
                  enum: [sandbox, live]
              required:
                - input
              additionalProperties: true
  '/agents/{id}/tool-bindings':
    get:
      operationId: get_agents_tool_bindings_index
      summary: 'Get /agents/{id}/tool-bindings'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.tool-bindings.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_agents_tool_bindings_store
      summary: 'Post /agents/{id}/tool-bindings'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.tool-bindings.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  maxLength: 80
                name:
                  type: string
                  maxLength: 120
                description:
                  type: [string, 'null']
                  maxLength: 500
                is_enabled:
                  type: boolean
                config:
                  type: [array, object]
              required:
                - slug
                - name
              additionalProperties: true
  '/agents/{id}/triggers':
    get:
      operationId: get_agents_triggers_index
      summary: 'Get /agents/{id}/triggers'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.triggers.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_agents_triggers_store
      summary: 'Post /agents/{id}/triggers'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.triggers.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                type:
                  type: string
                  enum: [schedule, idle, event, webhook, api]
                config:
                  type: [array, object]
                is_active:
                  type: boolean
              required:
                - name
                - type
              additionalProperties: true
  '/agents/{id}/validations':
    post:
      operationId: post_agents_validations
      summary: 'Post /agents/{id}/validations'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.validations
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/agents/{id}/variables':
    get:
      operationId: get_agents_variables_index
      summary: 'Get /agents/{id}/variables'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.variables.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_agents_variables_store
      summary: 'Post /agents/{id}/variables'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.variables.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  type: string
                  maxLength: 80
                value:
                  type: string
                  maxLength: 10000
                type:
                  type: string
                  enum: [text, number, boolean, secret, media_url]
                description:
                  type: [string, 'null']
                  maxLength: 500
              required:
                - key
                - value
              additionalProperties: true
  '/agents/{id}/versions':
    get:
      operationId: get_agents_versions_index
      summary: 'Get /agents/{id}/versions'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.versions.index
      x-required-scopes:
        - 'agents:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_agents_versions_store
      summary: 'Post /agents/{id}/versions'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.agents.versions.store
      x-required-scopes:
        - 'agents:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /approvals:
    get:
      operationId: get_approvals_index
      summary: 'Get /approvals'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.approvals.index
      x-required-scopes:
        - 'approvals:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/approvals/{id}':
    get:
      operationId: get_approvals_show
      summary: 'Get /approvals/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.approvals.show
      x-required-scopes:
        - 'approvals:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/approvals/{id}/decisions':
    post:
      operationId: post_approvals_decide
      summary: 'Post /approvals/{id}/decisions'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.approvals.decide
      x-required-scopes:
        - 'approvals:decide'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                decision:
                  type: string
                  enum: [approved, rejected]
                reason:
                  type: [string, 'null']
                  maxLength: 500
                expected_revision:
                  type: [integer, 'null']
                  minimum: 1
              required:
                - decision
              additionalProperties: true
  /asset-imports:
    post:
      operationId: post_asset_imports_store
      summary: 'Post /asset-imports'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.asset-imports.store
      x-required-scopes:
        - 'assets:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  description: 'Value accepted by the runtime validator.'
                file_name:
                  type: [string, 'null']
                  maxLength: 255
                type:
                  type: string
                  enum: [image, video, document]
              required:
                - url
              additionalProperties: true
  /asset-upload-policies:
    get:
      operationId: get_asset_upload_policies_index
      summary: 'Get /asset-upload-policies'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.asset-upload-policies.index
      x-required-scopes:
        - 'assets:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /asset-upload-sessions:
    post:
      operationId: post_asset_upload_sessions_store
      summary: 'Post /asset-upload-sessions'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.asset-upload-sessions.store
      x-required-scopes:
        - 'assets:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file_name:
                  type: string
                  maxLength: 255
                content_type:
                  type: string
                  maxLength: 100
                size_bytes:
                  type: integer
                  minimum: 1
                checksum_sha256:
                  type: string
                  minLength: 64
                  maxLength: 64
                purpose:
                  type: string
                  enum: [social_media, knowledge, chat]
              required:
                - file_name
                - content_type
                - size_bytes
                - checksum_sha256
              additionalProperties: true
  '/asset-upload-sessions/{id}':
    get:
      operationId: get_asset_upload_sessions_show
      summary: 'Get /asset-upload-sessions/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.asset-upload-sessions.show
      x-required-scopes:
        - 'assets:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/asset-upload-sessions/{id}/cancellations':
    post:
      operationId: post_asset_upload_sessions_cancellations
      summary: 'Post /asset-upload-sessions/{id}/cancellations'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.asset-upload-sessions.cancellations
      x-required-scopes:
        - 'assets:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/asset-upload-sessions/{id}/completions':
    post:
      operationId: post_asset_upload_sessions_completions
      summary: 'Post /asset-upload-sessions/{id}/completions'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.asset-upload-sessions.completions
      x-required-scopes:
        - 'assets:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/asset-upload-sessions/{id}/part-urls':
    post:
      operationId: post_asset_upload_sessions_part_urls
      summary: 'Post /asset-upload-sessions/{id}/part-urls'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.asset-upload-sessions.part-urls
      x-required-scopes:
        - 'assets:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                part_numbers:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items: { type: integer, minimum: 1 }
              required:
                - part_numbers
              additionalProperties: true
  /assets:
    get:
      operationId: get_assets_index
      summary: 'Get /assets'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.assets.index
      x-required-scopes:
        - 'assets:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/assets/{id}':
    get:
      operationId: get_assets_show
      summary: 'Get /assets/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.assets.show
      x-required-scopes:
        - 'assets:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_assets_update
      summary: 'Patch /assets/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.assets.update
      x-required-scopes:
        - 'assets:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                alt_text:
                  description: 'Merge patch field.'
                tags:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_assets_destroy
      summary: 'Delete /assets/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.assets.destroy
      x-required-scopes:
        - 'assets:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /audit-events:
    get:
      operationId: get_audit_events_index
      summary: 'Get /audit-events'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.audit-events.index
      x-required-scopes:
        - 'audit:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  /automation-catalog:
    get:
      operationId: get_automation_catalog_show
      summary: 'Get /automation-catalog'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.automation-catalog.show
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /batch-jobs:
    post:
      operationId: post_batch_jobs_store
      summary: 'Post /batch-jobs'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.batch-jobs.store
      x-required-scopes:
        - 'sync:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_type:
                  type: string
                  enum: [customer, product]
                action:
                  type: string
                  enum: [upsert, validate]
                atomicity_mode:
                  type: string
                  enum: [partial, atomic]
                dry_run:
                  type: boolean
                items:
                  type: array
                  minItems: 1
                  maxItems: 100
                  items: { type: object, properties: { client_ref: { type: string, maxLength: 128 }, data: { type: [array, object] } }, required: [client_ref, data] }
              required:
                - resource_type
                - action
                - items
              additionalProperties: true
  '/batch-jobs/{id}':
    get:
      operationId: get_batch_jobs_show
      summary: 'Get /batch-jobs/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.batch-jobs.show
      x-required-scopes:
        - 'sync:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /booking-availability-queries:
    post:
      operationId: post_booking_availability_queries_store
      summary: 'Post /booking-availability-queries'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-availability-queries.store
      x-required-scopes:
        - 'bookings:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_id:
                  type: string
                  maxLength: 64
                start_at:
                  description: 'Value accepted by the runtime validator.'
                duration_minutes:
                  type: integer
                  minimum: 15
                  maximum: 480
                capacity_units:
                  type: integer
                  minimum: 1
              required:
                - resource_id
                - start_at
              additionalProperties: true
  /booking-holds:
    post:
      operationId: post_booking_holds_store
      summary: 'Post /booking-holds'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-holds.store
      x-required-scopes:
        - 'bookings:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_id:
                  type: string
                  maxLength: 64
                scheduled_at:
                  description: 'Value accepted by the runtime validator.'
                duration_minutes:
                  type: integer
                  minimum: 15
                  maximum: 480
                capacity_units:
                  type: integer
                  minimum: 1
                ttl_seconds:
                  type: integer
                  minimum: 60
                  maximum: 3600
              required:
                - resource_id
                - scheduled_at
              additionalProperties: true
  '/booking-holds/{id}':
    delete:
      operationId: delete_booking_holds_destroy
      summary: 'Delete /booking-holds/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-holds.destroy
      x-required-scopes:
        - 'bookings:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /booking-resources:
    get:
      operationId: get_booking_resources_index
      summary: 'Get /booking-resources'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-resources.index
      x-required-scopes:
        - 'bookings:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_booking_resources_store
      summary: 'Post /booking-resources'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-resources.store
      x-required-scopes:
        - 'bookings:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                type:
                  type: string
                  maxLength: 40
                capacity:
                  type: integer
                  minimum: 1
                  maximum: 500
                working_hours:
                  type: string
                  maxLength: 40
                timezone:
                  type: string
                  maxLength: 64
                is_default:
                  type: boolean
              required:
                - name
              additionalProperties: true
  '/booking-resources/{id}':
    get:
      operationId: get_booking_resources_show
      summary: 'Get /booking-resources/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-resources.show
      x-required-scopes:
        - 'bookings:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_booking_resources_update
      summary: 'Patch /booking-resources/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-resources.update
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                capacity:
                  type: integer
                working_hours:
                  description: 'Merge patch field.'
                timezone:
                  description: 'Merge patch field.'
                is_active:
                  type: boolean
              additionalProperties: false
    delete:
      operationId: delete_booking_resources_destroy
      summary: 'Delete /booking-resources/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.booking-resources.destroy
      x-required-scopes:
        - 'bookings:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /bookings:
    get:
      operationId: get_bookings_index
      summary: 'Get /bookings'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.index
      x-required-scopes:
        - 'bookings:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_bookings_store
      summary: 'Post /bookings'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.store
      x-required-scopes:
        - 'bookings:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: [string, 'null']
                  maxLength: 64
                resource_id:
                  type: string
                  maxLength: 64
                hold_id:
                  type: [string, 'null']
                  maxLength: 64
                scheduled_at:
                  description: 'Value accepted by the runtime validator.'
                duration_minutes:
                  type: integer
                  minimum: 15
                  maximum: 480
                capacity_units:
                  type: integer
                  minimum: 1
                customer_note:
                  type: [string, 'null']
                  maxLength: 1000
              required:
                - resource_id
                - scheduled_at
              additionalProperties: true
  '/bookings/{id}':
    get:
      operationId: get_bookings_show
      summary: 'Get /bookings/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.show
      x-required-scopes:
        - 'bookings:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_bookings_update
      summary: 'Patch /bookings/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.update
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                customer_note:
                  description: 'Merge patch field.'
                intake_data:
                  description: 'Merge patch field.'
              additionalProperties: false
  '/bookings/{id}/cancellations':
    post:
      operationId: post_bookings_cancellations
      summary: 'Post /bookings/{id}/cancellations'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.cancellations
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/bookings/{id}/completions':
    post:
      operationId: post_bookings_completions
      summary: 'Post /bookings/{id}/completions'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.completions
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/bookings/{id}/confirmations':
    post:
      operationId: post_bookings_confirmations
      summary: 'Post /bookings/{id}/confirmations'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.confirmations
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/bookings/{id}/no-shows':
    post:
      operationId: post_bookings_no_shows
      summary: 'Post /bookings/{id}/no-shows'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.no-shows
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/bookings/{id}/reschedules':
    post:
      operationId: post_bookings_reschedules
      summary: 'Post /bookings/{id}/reschedules'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.bookings.reschedules
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scheduled_at:
                  description: 'Value accepted by the runtime validator.'
                duration_minutes:
                  type: integer
                  minimum: 15
                  maximum: 480
              required:
                - scheduled_at
              additionalProperties: true
  /brand-kit:
    get:
      operationId: get_brand_kit_show
      summary: 'Get /brand-kit'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.brand-kit.show
      x-required-scopes:
        - 'brand:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    patch:
      operationId: patch_brand_kit_update
      summary: 'Patch /brand-kit'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.brand-kit.update
      x-required-scopes:
        - 'brand:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /brand-kit/restorations:
    post:
      operationId: post_brand_kit_restorations
      summary: 'Post /brand-kit/restorations'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.brand-kit.restorations
      x-required-scopes:
        - 'brand:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version_id:
                  type: string
                  maxLength: 64
              required:
                - version_id
              additionalProperties: true
  /brand-kit/versions:
    get:
      operationId: get_brand_kit_versions
      summary: 'Get /brand-kit/versions'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.brand-kit.versions
      x-required-scopes:
        - 'brand:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /campaigns:
    get:
      operationId: get_campaigns_index
      summary: 'Get /campaigns'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.index
      x-required-scopes:
        - 'campaigns:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_campaigns_store
      summary: 'Post /campaigns'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.store
      x-required-scopes:
        - 'campaigns:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                message_content:
                  type: string
                  maxLength: 4000
                message_type:
                  type: string
                  enum: [text, image, template]
                audience_filters:
                  type: [array, object]
                sender_channel_ids:
                  type: array
                  maxItems: 20
                  items: { type: string, maxLength: 128 }
              required:
                - name
                - message_content
              additionalProperties: true
  '/campaigns/{id}':
    get:
      operationId: get_campaigns_show
      summary: 'Get /campaigns/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.show
      x-required-scopes:
        - 'campaigns:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_campaigns_update
      summary: 'Patch /campaigns/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.update
      x-required-scopes:
        - 'campaigns:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                message_content:
                  description: 'Merge patch field.'
                audience_filters:
                  description: 'Merge patch field.'
                sender_channel_ids:
                  description: 'Merge patch field.'
              additionalProperties: false
  '/campaigns/{id}/cancellations':
    post:
      operationId: post_campaigns_cancellations
      summary: 'Post /campaigns/{id}/cancellations'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.cancellations
      x-required-scopes:
        - 'campaigns:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/campaigns/{id}/dispatches':
    post:
      operationId: post_campaigns_dispatches
      summary: 'Post /campaigns/{id}/dispatches'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.dispatches
      x-required-scopes:
        - 'campaigns:send'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/campaigns/{id}/dry-runs':
    post:
      operationId: post_campaigns_dry_runs
      summary: 'Post /campaigns/{id}/dry-runs'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.dry-runs
      x-required-scopes:
        - 'campaigns:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/campaigns/{id}/previews':
    post:
      operationId: post_campaigns_previews
      summary: 'Post /campaigns/{id}/previews'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.previews
      x-required-scopes:
        - 'campaigns:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/campaigns/{id}/schedules':
    post:
      operationId: post_campaigns_schedules
      summary: 'Post /campaigns/{id}/schedules'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.schedules
      x-required-scopes:
        - 'campaigns:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scheduled_at:
                  description: 'Value accepted by the runtime validator.'
              required:
                - scheduled_at
              additionalProperties: true
  '/campaigns/{id}/sends':
    post:
      operationId: post_campaigns_sends
      summary: 'Post /campaigns/{id}/sends'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.sends
      x-required-scopes:
        - 'campaigns:send'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/campaigns/{id}/submissions':
    post:
      operationId: post_campaigns_submissions
      summary: 'Post /campaigns/{id}/submissions'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.campaigns.submissions
      x-required-scopes:
        - 'campaigns:write'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /capabilities:
    get:
      operationId: get_capabilities
      summary: 'Get /capabilities'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.capabilities
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /channel-agent-sync-previews:
    post:
      operationId: post_channel_agent_sync_previews_store
      summary: 'Post /channel-agent-sync-previews'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channel-agent-sync-previews.store
      x-required-scopes:
        - 'channels:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_id:
                  type: string
              required:
                - channel_id
              additionalProperties: true
  /channel-agent-syncs:
    post:
      operationId: post_channel_agent_syncs_store
      summary: 'Post /channel-agent-syncs'
      tags:
        - 'AI Agents'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channel-agent-syncs.store
      x-required-scopes:
        - 'channels:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_id:
                  type: string
              required:
                - channel_id
              additionalProperties: true
  /channel-connection-sessions:
    post:
      operationId: post_channel_connection_sessions_store
      summary: 'Post /channel-connection-sessions'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channel-connection-sessions.store
      x-required-scopes:
        - 'channels:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                provider:
                  type: string
                  enum: [facebook_msg, instagram_dm, zalo_oa, telegram, whatsapp, webchat, custom, zalo_personal]
                name:
                  type: [string, 'null']
                  maxLength: 120
                outbound_webhook_url:
                  description: 'Value accepted by the runtime validator.'
              required:
                - provider
              additionalProperties: true
  '/channel-connection-sessions/{id}':
    get:
      operationId: get_channel_connection_sessions_show
      summary: 'Get /channel-connection-sessions/{id}'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channel-connection-sessions.show
      x-required-scopes:
        - 'channels:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /channels:
    get:
      operationId: get_channels_index
      summary: 'Get /channels'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channels.index
      x-required-scopes:
        - 'channels:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/channels/{id}':
    get:
      operationId: get_channels_show
      summary: 'Get /channels/{id}'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channels.show
      x-required-scopes:
        - 'channels:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/channels/{id}/agent':
    get:
      operationId: get_channels_agent_show
      summary: 'Get /channels/{id}/agent'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channels.agent.show
      x-required-scopes:
        - 'channels:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    put:
      operationId: put_channels_agent_update
      summary: 'Put /channels/{id}/agent'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channels.agent.update
      x-required-scopes:
        - 'channels:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/channels/{id}/agent-assignment':
    get:
      operationId: get_channels_agent_assignment_show
      summary: 'Get /channels/{id}/agent-assignment'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channels.agent-assignment.show
      x-required-scopes:
        - 'channels:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_channels_agent_assignment_update
      summary: 'Patch /channels/{id}/agent-assignment'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channels.agent-assignment.update
      x-required-scopes:
        - 'channels:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/channels/{id}/capabilities':
    get:
      operationId: get_channels_capabilities
      summary: 'Get /channels/{id}/capabilities'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.channels.capabilities
      x-required-scopes:
        - 'channels:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /client-sessions:
    post:
      operationId: post_client_sessions_store
      summary: 'Post /client-sessions'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.client-sessions.store
      x-required-scopes:
        - 'client_sessions:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                visitor_external_id:
                  type: string
                  maxLength: 190
                customer_id:
                  type: [string, 'null']
                channel_id:
                  type: [string, 'null']
                allowed_origin:
                  description: 'Value accepted by the runtime validator.'
                ttl_minutes:
                  type: integer
                  minimum: 5
                  maximum: 1440
                identity_proof:
                  type: [string, 'null']
                  maxLength: 128
              required:
                - visitor_external_id
              additionalProperties: true
  '/client-sessions/{id}':
    get:
      operationId: get_client_sessions_show
      summary: 'Get /client-sessions/{id}'
      tags:
        - 'Channels & Inbox'
      security:
        -
          ClientSessionBearer: {}
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.client-sessions.show
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/client-sessions/{id}/events':
    get:
      operationId: get_client_sessions_events
      summary: 'Get /client-sessions/{id}/events'
      tags:
        - 'Channels & Inbox'
      security:
        -
          ClientSessionBearer: {}
      x-route-name: public.v1.client-sessions.events
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            text/event-stream:
              schema:
                type: string
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Last-Event-ID
          in: header
          schema:
            type: string
  '/client-sessions/{id}/messages':
    get:
      operationId: get_client_sessions_messages_index
      summary: 'Get /client-sessions/{id}/messages'
      tags:
        - 'Channels & Inbox'
      security:
        -
          ClientSessionBearer: {}
      x-route-name: public.v1.client-sessions.messages.index
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_client_sessions_messages_store
      summary: 'Post /client-sessions/{id}/messages'
      tags:
        - 'Channels & Inbox'
      security:
        -
          ClientSessionBearer: {}
      x-route-name: public.v1.client-sessions.messages.store
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  maxLength: 4000
                client_message_id:
                  type: [string, 'null']
                  maxLength: 128
              required:
                - text
              additionalProperties: true
  '/client-sessions/{id}/uploads':
    post:
      operationId: post_client_sessions_uploads_store
      summary: 'Post /client-sessions/{id}/uploads'
      tags:
        - 'Channels & Inbox'
      security:
        -
          ClientSessionBearer: {}
      x-route-name: public.v1.client-sessions.uploads.store
      x-required-scopes: {}
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filename:
                  type: string
                  maxLength: 190
                mime_type:
                  type: string
                  enum: [image/png, image/jpeg, image/webp, application/pdf]
                size_bytes:
                  type: integer
                  minimum: 1
                  maximum: 10485760
              required:
                - filename
                - mime_type
                - size_bytes
              additionalProperties: true
  /conversations:
    get:
      operationId: get_conversations_index
      summary: 'Get /conversations'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.index
      x-required-scopes:
        - 'conversations:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_conversations_store
      summary: 'Post /conversations'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.store
      x-required-scopes:
        - 'conversations:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: string
                platform:
                  type: string
                  maxLength: 40
                channel_id:
                  type: [string, 'null']
                subject_id:
                  type: [string, 'null']
                  maxLength: 190
                ai_enabled:
                  type: boolean
              required:
                - customer_id
              additionalProperties: true
  '/conversations/{id}':
    get:
      operationId: get_conversations_show
      summary: 'Get /conversations/{id}'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.show
      x-required-scopes:
        - 'conversations:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_conversations_update
      summary: 'Patch /conversations/{id}'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.update
      x-required-scopes:
        - 'conversations:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                ai_enabled:
                  type: boolean
                agent_pinned:
                  type: boolean
              additionalProperties: false
  '/conversations/{id}/assignments':
    post:
      operationId: post_conversations_assignments
      summary: 'Post /conversations/{id}/assignments'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.assignments
      x-required-scopes:
        - 'conversations:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                assignee_member_id:
                  type: [string, 'null']
                agent_id:
                  type: [string, 'null']
                pin_agent:
                  type: boolean
              additionalProperties: true
  '/conversations/{id}/handoffs':
    post:
      operationId: post_conversations_handoffs
      summary: 'Post /conversations/{id}/handoffs'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.handoffs
      x-required-scopes:
        - 'conversations:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  maxLength: 255
                team_id:
                  type: [string, 'null']
                summary:
                  type: [string, 'null']
                  maxLength: 2000
              required:
                - reason
              additionalProperties: true
  '/conversations/{id}/messages':
    get:
      operationId: get_conversations_messages_index
      summary: 'Get /conversations/{id}/messages'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.messages.index
      x-required-scopes:
        - 'conversations:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_conversations_messages_store
      summary: 'Post /conversations/{id}/messages'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.messages.store
      x-required-scopes:
        - 'messages:send'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_message_id:
                  type: string
                  maxLength: 128
                purpose:
                  type: string
                  enum: [service, marketing, transactional, notifications]
                parts:
                  type: array
                  minItems: 1
                  maxItems: 20
                  items: { description: 'Value accepted by the runtime validator.', type: object, properties: { type: { type: string, enum: [text, image, file, audio, video, template, interactive] }, text: { type: [string, 'null'], maxLength: 8000 }, url: { description: 'Value accepted by the runtime validator.' } }, required: [type] }
              required:
                - client_message_id
                - parts
              additionalProperties: true
  '/conversations/{id}/takeovers':
    post:
      operationId: post_conversations_takeovers
      summary: 'Post /conversations/{id}/takeovers'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.takeovers
      x-required-scopes:
        - 'conversations:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  enum: [takeover, resume_ai]
                pause_minutes:
                  type: [integer, 'null']
                  minimum: 1
                  maximum: 43200
                reason:
                  type: [string, 'null']
                  maxLength: 255
              required:
                - action
              additionalProperties: true
  '/conversations/{id}/transitions':
    post:
      operationId: post_conversations_transitions
      summary: 'Post /conversations/{id}/transitions'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.conversations.transitions
      x-required-scopes:
        - 'conversations:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum: [open, closed, archived]
              required:
                - status
              additionalProperties: true
  /custom-channel-events:
    post:
      operationId: post_custom_channel_events_store
      summary: 'Post /custom-channel-events'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.custom-channel-events.store
      x-required-scopes:
        - 'channels:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
        -
          name: X-Custom-Channel-Secret
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_id:
                  type: string
                external_event_id:
                  type: string
                  maxLength: 190
                external_sender_id:
                  type: string
                  maxLength: 190
                sender_name:
                  type: [string, 'null']
                  maxLength: 190
                direction:
                  type: string
                  enum: [inbound, status]
                text:
                  type: [string, 'null']
                  maxLength: 8000
                attachment_url:
                  description: 'Value accepted by the runtime validator.'
                delivery_status:
                  type: [string, 'null']
                  enum: [sent, delivered, read, failed, null]
                target_message_id:
                  type: [string, 'null']
              required:
                - channel_id
                - external_event_id
                - external_sender_id
              additionalProperties: true
  /custom-field-definitions:
    get:
      operationId: get_custom_field_definitions_index
      summary: 'Get /custom-field-definitions'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.custom-field-definitions.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_custom_field_definitions_store
      summary: 'Post /custom-field-definitions'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.custom-field-definitions.store
      x-required-scopes:
        - 'customers:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  type: string
                  maxLength: 64
                name:
                  type: string
                  maxLength: 120
                field_type:
                  type: string
                  enum: [string, number, boolean, date, enum, multi_enum]
                options:
                  type: [array, object, 'null']
                is_required:
                  type: boolean
                is_pii:
                  type: boolean
              required:
                - key
                - name
                - field_type
              additionalProperties: true
  '/custom-field-definitions/{id}':
    get:
      operationId: get_custom_field_definitions_show
      summary: 'Get /custom-field-definitions/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.custom-field-definitions.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_custom_field_definitions_update
      summary: 'Patch /custom-field-definitions/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.custom-field-definitions.update
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                options:
                  description: 'Merge patch field.'
                is_required:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_custom_field_definitions_destroy
      summary: 'Delete /custom-field-definitions/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.custom-field-definitions.destroy
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/customer-addresses/{id}':
    get:
      operationId: get_customer_addresses_show
      summary: 'Get /customer-addresses/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-addresses.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_customer_addresses_update
      summary: 'Patch /customer-addresses/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-addresses.update
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                label:
                  description: 'Merge patch field.'
                recipient_name:
                  description: 'Merge patch field.'
                phone:
                  description: 'Merge patch field.'
                street:
                  description: 'Merge patch field.'
                is_default_shipping:
                  type: boolean
              additionalProperties: false
    delete:
      operationId: delete_customer_addresses_destroy
      summary: 'Delete /customer-addresses/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-addresses.destroy
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/customer-consents/{id}':
    get:
      operationId: get_customer_consents_show
      summary: 'Get /customer-consents/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-consents.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_customer_consents_update
      summary: 'Patch /customer-consents/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-consents.update
      x-required-scopes:
        - 'consents:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                status:
                  description: 'Merge patch field.'
                source:
                  description: 'Merge patch field.'
                evidence:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_customer_consents_destroy
      summary: 'Delete /customer-consents/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-consents.destroy
      x-required-scopes:
        - 'consents:manage'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/customer-identities/{id}':
    get:
      operationId: get_customer_identities_show
      summary: 'Get /customer-identities/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-identities.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    delete:
      operationId: delete_customer_identities_destroy
      summary: 'Delete /customer-identities/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-identities.destroy
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /customer-lookups:
    get:
      operationId: get_customer_lookups_show
      summary: 'Get /customer-lookups'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-lookups.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /customer-merges:
    post:
      operationId: post_customer_merges_store
      summary: 'Post /customer-merges'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-merges.store
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                primary_customer_id:
                  type: string
                duplicate_customer_id:
                  type: string
                dry_run:
                  type: boolean
              required:
                - primary_customer_id
                - duplicate_customer_id
              additionalProperties: true
  '/customer-notes/{id}':
    get:
      operationId: get_customer_notes_show
      summary: 'Get /customer-notes/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-notes.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_customer_notes_update
      summary: 'Patch /customer-notes/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-notes.update
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                content:
                  description: 'Merge patch field.'
                type:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_customer_notes_destroy
      summary: 'Delete /customer-notes/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-notes.destroy
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /customer-upserts:
    post:
      operationId: post_customer_upserts_store
      summary: 'Post /customer-upserts'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customer-upserts.store
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                namespace:
                  type: string
                  maxLength: 80
                external_id:
                  type: string
                  maxLength: 190
                external_version:
                  type: [string, 'null']
                  maxLength: 64
                source_updated_at:
                  description: 'Value accepted by the runtime validator.'
                name:
                  type: [string, 'null']
                  maxLength: 190
                phone:
                  type: [string, 'null']
                  maxLength: 40
                email:
                  description: 'Value accepted by the runtime validator.'
                lifecycle_stage:
                  type: [string, 'null']
                  maxLength: 48
                custom_fields:
                  type: [array, object, 'null']
                metadata:
                  type: [array, object, 'null']
              required:
                - namespace
                - external_id
              additionalProperties: true
  /customers:
    get:
      operationId: get_customers_index
      summary: 'Get /customers'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_customers_store
      summary: 'Post /customers'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.store
      x-required-scopes:
        - 'customers:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: [string, 'null']
                  maxLength: 190
                phone:
                  type: [string, 'null']
                  maxLength: 40
                email:
                  description: 'Value accepted by the runtime validator.'
                birthday:
                  description: 'Value accepted by the runtime validator.'
                gender:
                  type: [string, 'null']
                  maxLength: 24
                lifecycle_stage:
                  type: [string, 'null']
                  maxLength: 48
                source:
                  type: [string, 'null']
                  maxLength: 120
                custom_fields:
                  type: [array, object, 'null']
                metadata:
                  type: [array, object, 'null']
                external_reference:
                  type: [object, 'null']
                  properties: { namespace: { type: string, maxLength: 80 }, external_id: { type: string, maxLength: 190 } }
              additionalProperties: true
  '/customers/{id}':
    get:
      operationId: get_customers_show
      summary: 'Get /customers/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_customers_update
      summary: 'Patch /customers/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.update
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                phone:
                  description: 'Merge patch field.'
                email:
                  description: 'Merge patch field.'
                birthday:
                  description: 'Merge patch field.'
                gender:
                  description: 'Merge patch field.'
                lifecycle_stage:
                  description: 'Merge patch field.'
                custom_fields:
                  description: 'Merge patch field.'
                metadata:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_customers_destroy
      summary: 'Delete /customers/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.destroy
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/customers/{id}/addresses':
    get:
      operationId: get_customers_addresses_index
      summary: 'Get /customers/{id}/addresses'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.addresses.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_customers_addresses_store
      summary: 'Post /customers/{id}/addresses'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.addresses.store
      x-required-scopes:
        - 'customers:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: [string, 'null']
                  maxLength: 60
                recipient_name:
                  type: [string, 'null']
                  maxLength: 190
                phone:
                  type: [string, 'null']
                  maxLength: 40
                street:
                  type: string
                  maxLength: 255
                city_code:
                  type: [string, 'null']
                  maxLength: 40
                city_name:
                  type: [string, 'null']
                  maxLength: 120
                district_code:
                  type: [string, 'null']
                  maxLength: 40
                district_name:
                  type: [string, 'null']
                  maxLength: 120
                ward_code:
                  type: [string, 'null']
                  maxLength: 40
                ward_name:
                  type: [string, 'null']
                  maxLength: 120
                country_code:
                  type: [string, 'null']
                  minLength: 2
                  maxLength: 2
                is_default_shipping:
                  type: boolean
              required:
                - street
              additionalProperties: true
  '/customers/{id}/consents':
    get:
      operationId: get_customers_consents_index
      summary: 'Get /customers/{id}/consents'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.consents.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_customers_consents_store
      summary: 'Post /customers/{id}/consents'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.consents.store
      x-required-scopes:
        - 'consents:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                purpose:
                  type: string
                  enum: [service, marketing, transactional, notifications]
                channel:
                  type: string
                  maxLength: 48
                status:
                  type: string
                  enum: [opted_in, opted_out, suppressed]
                source:
                  type: string
                  maxLength: 120
                evidence:
                  type: [array, object, 'null']
              required:
                - purpose
                - channel
                - status
                - source
              additionalProperties: true
  '/customers/{id}/identities':
    get:
      operationId: get_customers_identities_index
      summary: 'Get /customers/{id}/identities'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.identities.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_customers_identities_store
      summary: 'Post /customers/{id}/identities'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.identities.store
      x-required-scopes:
        - 'customers:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                channel_connection_id:
                  type: [string, 'null']
                platform:
                  type: string
                  maxLength: 40
                provider_subject_id:
                  type: string
                  maxLength: 190
                verified:
                  type: boolean
              required:
                - platform
                - provider_subject_id
              additionalProperties: true
  '/customers/{id}/notes':
    get:
      operationId: get_customers_notes_index
      summary: 'Get /customers/{id}/notes'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.notes.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_customers_notes_store
      summary: 'Post /customers/{id}/notes'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.notes.store
      x-required-scopes:
        - 'customers:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  maxLength: 10000
                type:
                  type: string
                  enum: [note, call, follow_up, important]
                visibility:
                  type: string
                  enum: [internal]
              required:
                - content
              additionalProperties: true
  '/customers/{id}/tags/{tag_id}':
    post:
      operationId: post_customers_tags_attach
      summary: 'Post /customers/{id}/tags/{tag_id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.tags.attach
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: tag_id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
    delete:
      operationId: delete_customers_tags_detach
      summary: 'Delete /customers/{id}/tags/{tag_id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.customers.tags.detach
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: tag_id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /data-erasure-requests:
    post:
      operationId: post_data_erasure_requests_store
      summary: 'Post /data-erasure-requests'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.data-erasure-requests.store
      x-required-scopes:
        - 'privacy:manage'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: string
                  maxLength: 64
                legal_hold_reason:
                  type: [string, 'null']
                  maxLength: 255
              required:
                - customer_id
              additionalProperties: true
  '/data-erasure-requests/{id}':
    get:
      operationId: get_data_erasure_requests_show
      summary: 'Get /data-erasure-requests/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.data-erasure-requests.show
      x-required-scopes:
        - 'privacy:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /data-export-requests:
    post:
      operationId: post_data_export_requests_store
      summary: 'Post /data-export-requests'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.data-export-requests.store
      x-required-scopes:
        - 'data:export'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: string
                  maxLength: 64
              required:
                - customer_id
              additionalProperties: true
  '/data-export-requests/{id}':
    get:
      operationId: get_data_export_requests_show
      summary: 'Get /data-export-requests/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.data-export-requests.show
      x-required-scopes:
        - 'data:export'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /event-types:
    get:
      operationId: get_event_types_index
      summary: 'Get /event-types'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.event-types.index
      x-required-scopes:
        - 'webhooks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /events:
    get:
      operationId: get_events_index
      summary: 'Get /events'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.events.index
      x-required-scopes:
        - 'webhooks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/events/{id}':
    get:
      operationId: get_events_show
      summary: 'Get /events/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.events.show
      x-required-scopes:
        - 'webhooks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /external-events:
    post:
      operationId: post_external_events_store
      summary: 'Post /external-events'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.external-events.store
      x-required-scopes:
        - 'integrations:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                event_type:
                  type: string
                  maxLength: 120
                external_id:
                  type: [string, 'null']
                  maxLength: 190
                data:
                  type: [array, object]
              required:
                - event_type
              additionalProperties: true
  /identity:
    get:
      operationId: get_identity
      summary: 'Get /identity'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.identity
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /integration-catalog:
    get:
      operationId: get_integration_catalog_index
      summary: 'Get /integration-catalog'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-catalog.index
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /integration-connections:
    get:
      operationId: get_integration_connections_index
      summary: 'Get /integration-connections'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-connections.index
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_integration_connections_store
      summary: 'Post /integration-connections'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-connections.store
      x-required-scopes:
        - 'integrations:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                provider:
                  type: string
                  maxLength: 40
                base_url:
                  description: 'Value accepted by the runtime validator.'
                credentials:
                  type: [array, object]
                scopes:
                  type: [array, object]
                modules:
                  type: [array, object]
              required:
                - name
              additionalProperties: true
  '/integration-connections/{id}':
    get:
      operationId: get_integration_connections_show
      summary: 'Get /integration-connections/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-connections.show
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_integration_connections_update
      summary: 'Patch /integration-connections/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-connections.update
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                base_url:
                  description: 'Merge patch field.'
                settings:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_integration_connections_destroy
      summary: 'Delete /integration-connections/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-connections.destroy
      x-required-scopes:
        - 'integrations:manage'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/integration-connections/{id}/{action}':
    post:
      operationId: post_integration_connections_transition
      summary: 'Post /integration-connections/{id}/{action}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-connections.transition
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: action
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /integration-endpoints:
    get:
      operationId: get_integration_endpoints_index
      summary: 'Get /integration-endpoints'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-endpoints.index
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_integration_endpoints_store
      summary: 'Post /integration-endpoints'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-endpoints.store
      x-required-scopes:
        - 'integrations:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                auth_mode:
                  type: string
                  enum: [hmac, bearer]
                mapping:
                  type: [array, object]
                create_customer:
                  type: boolean
              required:
                - name
              additionalProperties: true
  '/integration-endpoints/{id}':
    get:
      operationId: get_integration_endpoints_show
      summary: 'Get /integration-endpoints/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-endpoints.show
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_integration_endpoints_update
      summary: 'Patch /integration-endpoints/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-endpoints.update
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                mapping:
                  description: 'Merge patch field.'
                status:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_integration_endpoints_destroy
      summary: 'Delete /integration-endpoints/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-endpoints.destroy
      x-required-scopes:
        - 'integrations:manage'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/integration-endpoints/{id}/secret-rotations':
    post:
      operationId: post_integration_endpoints_rotate_secret
      summary: 'Post /integration-endpoints/{id}/secret-rotations'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-endpoints.rotate-secret
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /integration-executions:
    get:
      operationId: get_integration_executions_index
      summary: 'Get /integration-executions'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-executions.index
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/integration-executions/{id}':
    get:
      operationId: get_integration_executions_show
      summary: 'Get /integration-executions/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-executions.show
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/integration-executions/{id}/replays':
    post:
      operationId: post_integration_executions_replays
      summary: 'Post /integration-executions/{id}/replays'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-executions.replays
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /integration-operations:
    get:
      operationId: get_integration_operations_index
      summary: 'Get /integration-operations'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-operations.index
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_integration_operations_store
      summary: 'Post /integration-operations'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-operations.store
      x-required-scopes:
        - 'integrations:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                connection_id:
                  type: string
                  maxLength: 64
                name:
                  type: string
                  maxLength: 120
                method:
                  type: string
                  enum: [GET, POST, PUT, PATCH, DELETE]
                path:
                  type: string
                  maxLength: 500
              required:
                - connection_id
                - name
                - path
              additionalProperties: true
  '/integration-operations/{id}':
    get:
      operationId: get_integration_operations_show
      summary: 'Get /integration-operations/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-operations.show
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_integration_operations_update
      summary: 'Patch /integration-operations/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-operations.update
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                path:
                  description: 'Merge patch field.'
                status:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_integration_operations_destroy
      summary: 'Delete /integration-operations/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-operations.destroy
      x-required-scopes:
        - 'integrations:manage'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/integration-operations/{id}/executions':
    post:
      operationId: post_integration_operations_executions
      summary: 'Post /integration-operations/{id}/executions'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-operations.executions
      x-required-scopes:
        - 'integrations:manage'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /integration-subscriptions:
    get:
      operationId: get_integration_subscriptions_index
      summary: 'Get /integration-subscriptions'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-subscriptions.index
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_integration_subscriptions_store
      summary: 'Post /integration-subscriptions'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-subscriptions.store
      x-required-scopes:
        - 'integrations:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                event_type:
                  type: string
                  maxLength: 120
                workflow_id:
                  type: [string, 'null']
                  maxLength: 64
              required:
                - name
                - event_type
              additionalProperties: true
  '/integration-subscriptions/{id}':
    get:
      operationId: get_integration_subscriptions_show
      summary: 'Get /integration-subscriptions/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-subscriptions.show
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_integration_subscriptions_update
      summary: 'Patch /integration-subscriptions/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-subscriptions.update
      x-required-scopes:
        - 'integrations:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                event_type:
                  description: 'Merge patch field.'
                status:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_integration_subscriptions_destroy
      summary: 'Delete /integration-subscriptions/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.integration-subscriptions.destroy
      x-required-scopes:
        - 'integrations:manage'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /inventory-adjustments:
    post:
      operationId: post_inventory_adjustments_store
      summary: 'Post /inventory-adjustments'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.inventory-adjustments.store
      x-required-scopes:
        - 'inventory:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_id:
                  type: string
                  maxLength: 64
                variant_id:
                  type: [string, 'null']
                  maxLength: 64
                delta:
                  type: integer
                reason:
                  type: string
                  maxLength: 160
                external_reference:
                  type: [string, 'null']
                  maxLength: 190
              required:
                - product_id
                - delta
                - reason
              additionalProperties: true
  /inventory-items:
    get:
      operationId: get_inventory_items_index
      summary: 'Get /inventory-items'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.inventory-items.index
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /inventory-levels:
    get:
      operationId: get_inventory_levels_index
      summary: 'Get /inventory-levels'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.inventory-levels.index
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /inventory-reservations:
    post:
      operationId: post_inventory_reservations_store
      summary: 'Post /inventory-reservations'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.inventory-reservations.store
      x-required-scopes:
        - 'inventory:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_id:
                  type: string
                  maxLength: 64
                variant_id:
                  type: [string, 'null']
                  maxLength: 64
                quantity:
                  type: integer
                  minimum: 1
                ttl_seconds:
                  type: integer
                  minimum: 60
                  maximum: 86400
                external_reference:
                  type: [string, 'null']
                  maxLength: 190
              required:
                - product_id
                - quantity
              additionalProperties: true
  '/inventory-reservations/{id}/commits':
    post:
      operationId: post_inventory_reservations_commits
      summary: 'Post /inventory-reservations/{id}/commits'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.inventory-reservations.commits
      x-required-scopes:
        - 'inventory:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/inventory-reservations/{id}/releases':
    post:
      operationId: post_inventory_reservations_releases
      summary: 'Post /inventory-reservations/{id}/releases'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.inventory-reservations.releases
      x-required-scopes:
        - 'inventory:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /invitations:
    post:
      operationId: post_invitations_store
      summary: 'Post /invitations'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.invitations.store
      x-required-scopes:
        - 'members:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  description: 'Value accepted by the runtime validator.'
                role:
                  type: string
                  enum: [admin, member]
                see_all_conversations:
                  type: boolean
              required:
                - email
              additionalProperties: true
  /knowledge-facts:
    get:
      operationId: get_knowledge_facts_index
      summary: 'Get /knowledge-facts'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-facts.index
      x-required-scopes:
        - 'knowledge:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_knowledge_facts_store
      summary: 'Post /knowledge-facts'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-facts.store
      x-required-scopes:
        - 'knowledge:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_id:
                  type: string
                  maxLength: 64
                attribute:
                  type: string
                  maxLength: 120
                value:
                  type: string
                  maxLength: 2000
                value_type:
                  type: string
                  maxLength: 32
                unit:
                  type: [string, 'null']
                  maxLength: 32
                confidence:
                  type: number
                  minimum: 0
                  maximum: 1
              required:
                - agent_id
                - attribute
                - value
              additionalProperties: true
  '/knowledge-facts/{id}':
    get:
      operationId: get_knowledge_facts_show
      summary: 'Get /knowledge-facts/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-facts.show
      x-required-scopes:
        - 'knowledge:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_knowledge_facts_update
      summary: 'Patch /knowledge-facts/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-facts.update
      x-required-scopes:
        - 'knowledge:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                attribute:
                  description: 'Merge patch field.'
                value:
                  description: 'Merge patch field.'
                unit:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_knowledge_facts_destroy
      summary: 'Delete /knowledge-facts/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-facts.destroy
      x-required-scopes:
        - 'knowledge:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/knowledge-facts/{id}/reviews':
    post:
      operationId: post_knowledge_facts_reviews
      summary: 'Post /knowledge-facts/{id}/reviews'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-facts.reviews
      x-required-scopes:
        - 'knowledge:review'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                decision:
                  type: string
                  enum: [approved, rejected]
                reason:
                  type: [string, 'null']
                  maxLength: 1000
                evidence:
                  type: [array, object]
              required:
                - decision
              additionalProperties: true
  /knowledge-searches:
    post:
      operationId: post_knowledge_searches_store
      summary: 'Post /knowledge-searches'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-searches.store
      x-required-scopes:
        - 'knowledge:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  minLength: 1
                  maxLength: 500
                limit:
                  type: integer
                  minimum: 1
                  maximum: 50
                agent_id:
                  type: [string, 'null']
                  maxLength: 64
              required:
                - query
              additionalProperties: true
  /knowledge-sources:
    get:
      operationId: get_knowledge_sources_index
      summary: 'Get /knowledge-sources'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-sources.index
      x-required-scopes:
        - 'knowledge:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_knowledge_sources_store
      summary: 'Post /knowledge-sources'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-sources.store
      x-required-scopes:
        - 'knowledge:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  maxLength: 255
                source_kind:
                  type: string
                  enum: [text, faq, file, url]
                content_text:
                  type: [string, 'null']
                  maxLength: 200000
                source_url:
                  description: 'Value accepted by the runtime validator.'
                asset_id:
                  type: [string, 'null']
                  maxLength: 64
                review_state:
                  type: string
                  enum: [pending_review, approved, rejected]
                crawl_config:
                  type: [array, object]
              required:
                - title
                - source_kind
              additionalProperties: true
  '/knowledge-sources/{id}':
    get:
      operationId: get_knowledge_sources_show
      summary: 'Get /knowledge-sources/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-sources.show
      x-required-scopes:
        - 'knowledge:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_knowledge_sources_update
      summary: 'Patch /knowledge-sources/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-sources.update
      x-required-scopes:
        - 'knowledge:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                title:
                  description: 'Merge patch field.'
                content_text:
                  description: 'Merge patch field.'
                source_url:
                  description: 'Merge patch field.'
                review_state:
                  description: 'Merge patch field.'
                crawl_config:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_knowledge_sources_destroy
      summary: 'Delete /knowledge-sources/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-sources.destroy
      x-required-scopes:
        - 'knowledge:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/knowledge-sources/{id}/ingestions':
    post:
      operationId: post_knowledge_sources_ingestions
      summary: 'Post /knowledge-sources/{id}/ingestions'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-sources.ingestions
      x-required-scopes:
        - 'knowledge:write'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                content_text:
                  type: [string, 'null']
                  maxLength: 200000
                source_url:
                  description: 'Value accepted by the runtime validator.'
                parser_version:
                  type: string
                  maxLength: 32
              additionalProperties: true
  '/knowledge-sources/{id}/versions':
    get:
      operationId: get_knowledge_sources_versions
      summary: 'Get /knowledge-sources/{id}/versions'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.knowledge-sources.versions
      x-required-scopes:
        - 'knowledge:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /lead-stages:
    get:
      operationId: get_lead_stages_index
      summary: 'Get /lead-stages'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.lead-stages.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_lead_stages_store
      summary: 'Post /lead-stages'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.lead-stages.store
      x-required-scopes:
        - 'customers:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  type: string
                  maxLength: 48
                name:
                  type: string
                  maxLength: 120
                color:
                  type: [string, 'null']
                  maxLength: 20
                position:
                  type: integer
                  minimum: 0
              required:
                - key
                - name
              additionalProperties: true
  '/lead-stages/{id}':
    get:
      operationId: get_lead_stages_show
      summary: 'Get /lead-stages/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.lead-stages.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_lead_stages_update
      summary: 'Patch /lead-stages/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.lead-stages.update
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                color:
                  description: 'Merge patch field.'
                position:
                  description: 'Merge patch field.'
                is_active:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_lead_stages_destroy
      summary: 'Delete /lead-stages/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.lead-stages.destroy
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /limits:
    get:
      operationId: get_limits
      summary: 'Get /limits'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.limits
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /manual-payment-records:
    post:
      operationId: post_manual_payment_records_store
      summary: 'Post /manual-payment-records'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.manual-payment-records.store
      x-required-scopes:
        - 'payments:record'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                external_transaction_ref:
                  type: string
                  maxLength: 190
                amount_minor:
                  type: integer
                  minimum: 1
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                method:
                  type: string
                  maxLength: 48
                evidence:
                  type: [array, object]
              required:
                - order_id
                - external_transaction_ref
                - amount_minor
                - method
              additionalProperties: true
  /media-generation-jobs:
    post:
      operationId: post_media_generation_jobs_store
      summary: 'Post /media-generation-jobs'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.media-generation-jobs.store
      x-required-scopes:
        - 'assets:write'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum: [image, video, voice]
                prompt:
                  type: string
                  maxLength: 4000
                action:
                  type: string
                  enum: [generate, text2video]
                model:
                  type: string
                  maxLength: 64
                metadata:
                  type: [array, object]
              required:
                - type
                - prompt
              additionalProperties: true
  '/media-generation-jobs/{id}':
    get:
      operationId: get_media_generation_jobs_show
      summary: 'Get /media-generation-jobs/{id}'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.media-generation-jobs.show
      x-required-scopes:
        - 'assets:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/media-generation-jobs/{id}/cancellations':
    post:
      operationId: post_media_generation_jobs_cancellations
      summary: 'Post /media-generation-jobs/{id}/cancellations'
      tags:
        - 'Knowledge & Assets'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.media-generation-jobs.cancellations
      x-required-scopes:
        - 'assets:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /members:
    get:
      operationId: get_members_index
      summary: 'Get /members'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.members.index
      x-required-scopes:
        - 'members:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/members/{id}':
    patch:
      operationId: patch_members_update
      summary: 'Patch /members/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.members.update
      x-required-scopes:
        - 'members:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                role:
                  description: 'Merge patch field.'
                see_all_conversations:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_members_destroy
      summary: 'Delete /members/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.members.destroy
      x-required-scopes:
        - 'members:manage'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /message-eligibility-checks:
    post:
      operationId: post_message_eligibility_checks_store
      summary: 'Post /message-eligibility-checks'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.message-eligibility-checks.store
      x-required-scopes:
        - 'conversations:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                conversation_id:
                  type: string
                purpose:
                  type: string
                  enum: [service, marketing, transactional, notifications]
              required:
                - conversation_id
              additionalProperties: true
  '/messages/{id}':
    get:
      operationId: get_messages_show
      summary: 'Get /messages/{id}'
      tags:
        - 'Channels & Inbox'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.messages.show
      x-required-scopes:
        - 'conversations:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /notification-preferences:
    get:
      operationId: get_notification_preferences_show
      summary: 'Get /notification-preferences'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.notification-preferences.show
      x-required-scopes:
        - 'notifications:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    patch:
      operationId: patch_notification_preferences_update
      summary: 'Patch /notification-preferences'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.notification-preferences.update
      x-required-scopes:
        - 'notifications:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                email_enabled:
                  type: boolean
                push_enabled:
                  type: boolean
                quiet_hours_enabled:
                  type: boolean
              additionalProperties: false
  /notifications:
    get:
      operationId: get_notifications_index
      summary: 'Get /notifications'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.notifications.index
      x-required-scopes:
        - 'notifications:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/notifications/{id}':
    get:
      operationId: get_notifications_show
      summary: 'Get /notifications/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.notifications.show
      x-required-scopes:
        - 'notifications:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/notifications/{id}/acknowledgements':
    post:
      operationId: post_notifications_acknowledgements
      summary: 'Post /notifications/{id}/acknowledgements'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.notifications.acknowledgements
      x-required-scopes:
        - 'notifications:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/notifications/{id}/reads':
    post:
      operationId: post_notifications_reads
      summary: 'Post /notifications/{id}/reads'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.notifications.reads
      x-required-scopes:
        - 'notifications:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/notifications/{id}/resolutions':
    post:
      operationId: post_notifications_resolutions
      summary: 'Post /notifications/{id}/resolutions'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.notifications.resolutions
      x-required-scopes:
        - 'notifications:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /oauth/introspect:
    post:
      operationId: post_oauth_introspect
      summary: 'Post /oauth/introspect'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
        - {}
      x-route-name: public.v1.oauth.introspect
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthIntrospection'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                  writeOnly: true
                token:
                  type: string
                  writeOnly: true
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                  writeOnly: true
                token:
                  type: string
                  writeOnly: true
  /oauth/revoke:
    post:
      operationId: post_oauth_revoke
      summary: 'Post /oauth/revoke'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
        - {}
      x-route-name: public.v1.oauth.revoke
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthRevocation'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                  writeOnly: true
                token:
                  type: string
                  writeOnly: true
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                  writeOnly: true
                token:
                  type: string
                  writeOnly: true
  /oauth/token:
    post:
      operationId: post_oauth_token
      summary: 'Post /oauth/token'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerBasic: {}
        - {}
      x-route-name: public.v1.oauth.token
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthToken'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                  writeOnly: true
                grant_type:
                  type: string
                  enum: [authorization_code, refresh_token]
                code:
                  type: string
                redirect_uri:
                  type: string
                  format: uri
                code_verifier:
                  type: string
                  minLength: 43
                refresh_token:
                  type: string
                  writeOnly: true
              required:
                - grant_type
              oneOf:
                -
                  properties: { grant_type: { const: authorization_code } }
                  required: [code, redirect_uri, code_verifier]
                -
                  properties: { grant_type: { const: refresh_token } }
                  required: [refresh_token]
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                  writeOnly: true
                grant_type:
                  type: string
                  enum: [authorization_code, refresh_token]
                code:
                  type: string
                redirect_uri:
                  type: string
                  format: uri
                code_verifier:
                  type: string
                  minLength: 43
                refresh_token:
                  type: string
                  writeOnly: true
              required:
                - grant_type
              oneOf:
                -
                  properties: { grant_type: { const: authorization_code } }
                  required: [code, redirect_uri, code_verifier]
                -
                  properties: { grant_type: { const: refresh_token } }
                  required: [refresh_token]
  '/operations/{id}':
    get:
      operationId: get_operations_show
      summary: 'Get /operations/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.operations.show
      x-required-scopes:
        - 'operations:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/operations/{id}/cancellations':
    post:
      operationId: post_operations_cancel
      summary: 'Post /operations/{id}/cancellations'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.operations.cancel
      x-required-scopes:
        - 'operations:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /orders:
    get:
      operationId: get_orders_index
      summary: 'Get /orders'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.index
      x-required-scopes:
        - 'orders:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_orders_store
      summary: 'Post /orders'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.store
      x-required-scopes:
        - 'orders:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: [string, 'null']
                  maxLength: 64
                customer_name:
                  type: string
                  maxLength: 255
                customer_phone:
                  type: string
                  maxLength: 30
                shipping_address:
                  type: [string, 'null']
                  maxLength: 500
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                notes:
                  type: [string, 'null']
                  maxLength: 2000
                reservation_id:
                  type: [string, 'null']
                  maxLength: 64
                items:
                  type: array
                  minItems: 1
                  items: { type: object, properties: { product_id: { type: string, maxLength: 64 }, variant_id: { type: [string, 'null'], maxLength: 64 }, quantity: { type: integer, minimum: 1 } }, required: [product_id, quantity] }
              required:
                - customer_name
                - customer_phone
                - items
              additionalProperties: true
  '/orders/{id}':
    get:
      operationId: get_orders_show
      summary: 'Get /orders/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.show
      x-required-scopes:
        - 'orders:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_orders_update
      summary: 'Patch /orders/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.update
      x-required-scopes:
        - 'orders:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                notes:
                  description: 'Merge patch field.'
                shipping_address:
                  description: 'Merge patch field.'
                shipping_method:
                  description: 'Merge patch field.'
                custom_fields:
                  description: 'Merge patch field.'
              additionalProperties: false
  '/orders/{id}/cancellations':
    post:
      operationId: post_orders_cancellations
      summary: 'Post /orders/{id}/cancellations'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.cancellations
      x-required-scopes:
        - 'orders:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/orders/{id}/confirmations':
    post:
      operationId: post_orders_confirmations
      summary: 'Post /orders/{id}/confirmations'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.confirmations
      x-required-scopes:
        - 'orders:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/orders/{id}/fulfillments':
    post:
      operationId: post_orders_fulfillments
      summary: 'Post /orders/{id}/fulfillments'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.fulfillments
      x-required-scopes:
        - 'orders:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/orders/{id}/manual-payment-records':
    post:
      operationId: post_orders_manual_payment_records
      summary: 'Post /orders/{id}/manual-payment-records'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.manual-payment-records
      x-required-scopes:
        - 'payments:record'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                external_transaction_ref:
                  type: string
                  maxLength: 190
                amount_minor:
                  type: integer
                  minimum: 1
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                method:
                  type: string
                  maxLength: 48
                evidence:
                  type: [array, object]
              required:
                - order_id
                - external_transaction_ref
                - amount_minor
                - method
              additionalProperties: true
  '/orders/{id}/payment-requests':
    post:
      operationId: post_orders_payment_requests
      summary: 'Post /orders/{id}/payment-requests'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.payment-requests
      x-required-scopes:
        - 'payments:record|orders:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                provider:
                  type: string
                  maxLength: 48
              required:
                - order_id
              additionalProperties: true
  '/orders/{id}/refunds':
    post:
      operationId: post_orders_refunds
      summary: 'Post /orders/{id}/refunds'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.refunds
      x-required-scopes:
        - 'payments:refund'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                amount_minor:
                  type: integer
                  minimum: 1
                reason:
                  type: string
                  maxLength: 255
                provider:
                  type: string
                  maxLength: 48
              required:
                - order_id
                - amount_minor
                - reason
              additionalProperties: true
  '/orders/{id}/shipments':
    post:
      operationId: post_orders_shipments
      summary: 'Post /orders/{id}/shipments'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.orders.shipments
      x-required-scopes:
        - 'shipping:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                carrier:
                  type: string
                  maxLength: 40
                cod_minor:
                  type: integer
                  minimum: 0
              required:
                - order_id
              additionalProperties: true
  /partner/app:
    get:
      operationId: get_partner_app_show
      summary: 'Get /partner/app'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.app.show
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /partner/app/secret-rotations:
    post:
      operationId: post_partner_app_rotate_secret
      summary: 'Post /partner/app/secret-rotations'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.app.rotate-secret
      x-required-scopes: {}
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /partner/apps:
    get:
      operationId: get_partner_apps_index
      summary: 'Get /partner/apps'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.apps.index
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_partner_apps_store
      summary: 'Post /partner/apps'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.apps.store
      x-required-scopes: {}
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
                redirect_uris:
                  type: array
                  minItems: 1
                  items: { description: 'Value accepted by the runtime validator.' }
                requested_scopes:
                  type: array
                  minItems: 1
                  items: { type: string }
              required:
                - name
                - redirect_uris
                - requested_scopes
              additionalProperties: true
  '/partner/apps/{id}':
    get:
      operationId: get_partner_apps_show
      summary: 'Get /partner/apps/{id}'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.apps.show
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_partner_apps_update
      summary: 'Patch /partner/apps/{id}'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.apps.update
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                redirect_uris:
                  description: 'Merge patch field.'
                requested_scopes:
                  description: 'Merge patch field.'
              additionalProperties: false
  '/partner/apps/{id}/secret-rotations':
    post:
      operationId: post_partner_apps_rotate_secret
      summary: 'Post /partner/apps/{id}/secret-rotations'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.apps.rotate-secret
      x-required-scopes: {}
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /partner/installations:
    get:
      operationId: get_partner_installations_index
      summary: 'Get /partner/installations'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.installations.index
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_partner_installations_store
      summary: 'Post /partner/installations'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.installations.store
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: [string, 'null']
                  maxLength: 64
                granted_scopes:
                  type: array
                  items: { type: string }
              additionalProperties: true
  '/partner/installations/{id}':
    get:
      operationId: get_partner_installations_show
      summary: 'Get /partner/installations/{id}'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.installations.show
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/partner/installations/{id}/revocations':
    post:
      operationId: post_partner_installations_revocations
      summary: 'Post /partner/installations/{id}/revocations'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.installations.revocations
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/partner/installations/{id}/uninstalls':
    post:
      operationId: post_partner_installations_uninstalls
      summary: 'Post /partner/installations/{id}/uninstalls'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.installations.uninstalls
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /partner/workspace-provisions:
    get:
      operationId: get_partner_workspace_provisions_index
      summary: 'Get /partner/workspace-provisions'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.workspace-provisions.index
      x-required-scopes: {}
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_partner_workspace_provisions_store
      summary: 'Post /partner/workspace-provisions'
      tags:
        - 'Partner & OAuth'
      security:
        -
          PartnerClientId: {}
          PartnerClientSecret: {}
        -
          PartnerBasic: {}
      x-route-name: public.v1.partner.workspace-provisions.store
      x-required-scopes: {}
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
              required:
                - name
              additionalProperties: true
  /payment-requests:
    post:
      operationId: post_payment_requests_store
      summary: 'Post /payment-requests'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.payment-requests.store
      x-required-scopes:
        - 'payments:record|orders:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                provider:
                  type: string
                  maxLength: 48
              required:
                - order_id
              additionalProperties: true
  /payments:
    get:
      operationId: get_payments_index
      summary: 'Get /payments'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.payments.index
      x-required-scopes:
        - 'payments:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/payments/{id}':
    get:
      operationId: get_payments_show
      summary: 'Get /payments/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.payments.show
      x-required-scopes:
        - 'payments:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /pricing-quotes:
    post:
      operationId: post_pricing_quotes_store
      summary: 'Post /pricing-quotes'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.pricing-quotes.store
      x-required-scopes:
        - 'orders:read|orders:write|catalog:read'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_id:
                  type: [string, 'null']
                  maxLength: 64
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                discount_minor:
                  type: integer
                  minimum: 0
                shipping_minor:
                  type: integer
                  minimum: 0
                items:
                  type: array
                  minItems: 1
                  items: { type: object, properties: { product_id: { type: string, maxLength: 64 }, variant_id: { type: [string, 'null'], maxLength: 64 }, quantity: { type: integer, minimum: 1 } }, required: [product_id, quantity] }
              required:
                - items
              additionalProperties: true
  /product-categories:
    get:
      operationId: get_product_categories_index
      summary: 'Get /product-categories'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-categories.index
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_product_categories_store
      summary: 'Post /product-categories'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-categories.store
      x-required-scopes:
        - 'catalog:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 120
              required:
                - name
              additionalProperties: true
  '/product-categories/{id}':
    get:
      operationId: get_product_categories_show
      summary: 'Get /product-categories/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-categories.show
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_product_categories_update
      summary: 'Patch /product-categories/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-categories.update
      x-required-scopes:
        - 'catalog:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_product_categories_destroy
      summary: 'Delete /product-categories/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-categories.destroy
      x-required-scopes:
        - 'catalog:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/product-variants/{id}':
    get:
      operationId: get_product_variants_show
      summary: 'Get /product-variants/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-variants.show
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_product_variants_update
      summary: 'Patch /product-variants/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-variants.update
      x-required-scopes:
        - 'catalog:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                sku:
                  description: 'Merge patch field.'
                is_active:
                  type: boolean
              additionalProperties: false
    delete:
      operationId: delete_product_variants_destroy
      summary: 'Delete /product-variants/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.product-variants.destroy
      x-required-scopes:
        - 'catalog:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /products:
    get:
      operationId: get_products_index
      summary: 'Get /products'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.products.index
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_products_store
      summary: 'Post /products'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.products.store
      x-required-scopes:
        - 'catalog:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                sku:
                  type: [string, 'null']
                  maxLength: 80
                description:
                  type: [string, 'null']
                  maxLength: 5000
                price_minor:
                  type: integer
                  minimum: 0
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                stock_quantity:
                  type: integer
                  minimum: 0
                stock_tracking_enabled:
                  type: boolean
                requires_shipping:
                  type: boolean
                is_active:
                  type: boolean
                category_id:
                  type: [string, 'null']
                  maxLength: 64
              required:
                - name
                - price_minor
              additionalProperties: true
  '/products/{id}':
    get:
      operationId: get_products_show
      summary: 'Get /products/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.products.show
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_products_update
      summary: 'Patch /products/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.products.update
      x-required-scopes:
        - 'catalog:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                description:
                  description: 'Merge patch field.'
                sku:
                  description: 'Merge patch field.'
                price_minor:
                  description: 'Merge patch field.'
                currency:
                  description: 'Merge patch field.'
                stock_tracking_enabled:
                  type: boolean
                requires_shipping:
                  type: boolean
                is_active:
                  type: boolean
              additionalProperties: false
    delete:
      operationId: delete_products_destroy
      summary: 'Delete /products/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.products.destroy
      x-required-scopes:
        - 'catalog:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/products/{id}/variants':
    get:
      operationId: get_products_variants_index
      summary: 'Get /products/{id}/variants'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.products.variants.index
      x-required-scopes:
        - 'catalog:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    post:
      operationId: post_products_variants_store
      summary: 'Post /products/{id}/variants'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.products.variants.store
      x-required-scopes:
        - 'catalog:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 160
                sku:
                  type: [string, 'null']
                  maxLength: 80
                size:
                  type: [string, 'null']
                  maxLength: 40
                color:
                  type: [string, 'null']
                  maxLength: 40
                price_minor:
                  type: integer
                  minimum: 0
                stock_quantity:
                  type: integer
                  minimum: 0
                stock_tracking_enabled:
                  type: boolean
              required:
                - name
              additionalProperties: true
  /reconciliation-items:
    get:
      operationId: get_reconciliation_items_index
      summary: 'Get /reconciliation-items'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.reconciliation-items.index
      x-required-scopes:
        - 'operations:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/reconciliation-items/{id}/resolutions':
    post:
      operationId: post_reconciliation_items_resolutions
      summary: 'Post /reconciliation-items/{id}/resolutions'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.reconciliation-items.resolutions
      x-required-scopes:
        - 'operations:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                notes:
                  type: [string, 'null']
                  maxLength: 2000
              additionalProperties: true
  /refunds:
    post:
      operationId: post_refunds_store
      summary: 'Post /refunds'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.refunds.store
      x-required-scopes:
        - 'payments:refund'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                amount_minor:
                  type: integer
                  minimum: 1
                reason:
                  type: string
                  maxLength: 255
                provider:
                  type: string
                  maxLength: 48
              required:
                - order_id
                - amount_minor
                - reason
              additionalProperties: true
  '/refunds/{id}':
    get:
      operationId: get_refunds_show
      summary: 'Get /refunds/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.refunds.show
      x-required-scopes:
        - 'payments:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/refunds/{id}/confirmations':
    post:
      operationId: post_refunds_confirm
      summary: 'Post /refunds/{id}/confirmations'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.refunds.confirm
      x-required-scopes:
        - 'payments:refund'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                external_refund_ref:
                  type: string
                  maxLength: 190
              required:
                - external_refund_ref
              additionalProperties: true
  /report-definitions:
    get:
      operationId: get_report_definitions_index
      summary: 'Get /report-definitions'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.report-definitions.index
      x-required-scopes:
        - 'reports:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /report-exports:
    post:
      operationId: post_report_exports_store
      summary: 'Post /report-exports'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.report-exports.store
      x-required-scopes:
        - 'reports:read'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                report:
                  type: string
                  enum: [overview, conversations, ai-performance, commerce, marketing, sales, customers, bookings, usage]
              required:
                - report
              additionalProperties: true
  '/report-exports/{id}':
    get:
      operationId: get_report_exports_show
      summary: 'Get /report-exports/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.report-exports.show
      x-required-scopes:
        - 'reports:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /reports/ai-performance:
    get:
      operationId: get_reports_ai_performance
      summary: 'Get /reports/ai-performance'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.reports.ai-performance
      x-required-scopes:
        - 'reports:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /reports/commerce:
    get:
      operationId: get_reports_commerce
      summary: 'Get /reports/commerce'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.reports.commerce
      x-required-scopes:
        - 'reports:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /reports/conversations:
    get:
      operationId: get_reports_conversations
      summary: 'Get /reports/conversations'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.reports.conversations
      x-required-scopes:
        - 'reports:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /reports/overview:
    get:
      operationId: get_reports_overview
      summary: 'Get /reports/overview'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.reports.overview
      x-required-scopes:
        - 'reports:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  '/reports/{report_key}':
    get:
      operationId: get_reports_show
      summary: 'Get /reports/{report_key}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.reports.show
      x-required-scopes:
        - 'reports:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: report_key
          in: path
          required: true
          schema:
            type: string
  /roles:
    get:
      operationId: get_roles_index
      summary: 'Get /roles'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.roles.index
      x-required-scopes:
        - 'members:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /segments:
    get:
      operationId: get_segments_index
      summary: 'Get /segments'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.segments.index
      x-required-scopes:
        - 'campaigns:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_segments_store
      summary: 'Post /segments'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.segments.store
      x-required-scopes:
        - 'campaigns:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum: [inclusion, exclusion]
                criteria:
                  type: [array, object]
              required:
                - criteria
              additionalProperties: true
  '/segments/{id}':
    get:
      operationId: get_segments_show
      summary: 'Get /segments/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.segments.show
      x-required-scopes:
        - 'campaigns:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_segments_update
      summary: 'Patch /segments/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.segments.update
      x-required-scopes:
        - 'campaigns:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                kind:
                  description: 'Merge patch field.'
                criteria:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_segments_destroy
      summary: 'Delete /segments/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.segments.destroy
      x-required-scopes:
        - 'campaigns:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/segments/{id}/previews':
    post:
      operationId: post_segments_previews
      summary: 'Post /segments/{id}/previews'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.segments.previews
      x-required-scopes:
        - 'campaigns:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /services:
    get:
      operationId: get_services_index
      summary: 'Get /services'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.services.index
      x-required-scopes:
        - 'bookings:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: post_services_store
      summary: 'Post /services'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.services.store
      x-required-scopes:
        - 'bookings:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                description:
                  type: [string, 'null']
                  maxLength: 5000
                price_minor:
                  type: integer
                  minimum: 0
                currency:
                  type: string
                  minLength: 3
                  maxLength: 3
                is_active:
                  type: boolean
              required:
                - name
                - price_minor
              additionalProperties: true
  '/services/{id}':
    get:
      operationId: get_services_show
      summary: 'Get /services/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.services.show
      x-required-scopes:
        - 'bookings:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_services_update
      summary: 'Patch /services/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.services.update
      x-required-scopes:
        - 'bookings:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                description:
                  description: 'Merge patch field.'
                price_minor:
                  description: 'Merge patch field.'
                currency:
                  description: 'Merge patch field.'
                is_active:
                  type: boolean
              additionalProperties: false
    delete:
      operationId: delete_services_destroy
      summary: 'Delete /services/{id}'
      tags:
        - Bookings
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.services.destroy
      x-required-scopes:
        - 'bookings:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /shipments:
    get:
      operationId: get_shipments_index
      summary: 'Get /shipments'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.shipments.index
      x-required-scopes:
        - 'shipping:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_shipments_store
      summary: 'Post /shipments'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.shipments.store
      x-required-scopes:
        - 'shipping:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  maxLength: 64
                carrier:
                  type: string
                  maxLength: 40
                cod_minor:
                  type: integer
                  minimum: 0
              required:
                - order_id
              additionalProperties: true
  '/shipments/{id}':
    get:
      operationId: get_shipments_show
      summary: 'Get /shipments/{id}'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.shipments.show
      x-required-scopes:
        - 'shipping:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/shipments/{id}/cancellations':
    post:
      operationId: post_shipments_cancellations
      summary: 'Post /shipments/{id}/cancellations'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.shipments.cancellations
      x-required-scopes:
        - 'shipping:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/shipments/{id}/tracking':
    get:
      operationId: get_shipments_tracking
      summary: 'Get /shipments/{id}/tracking'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.shipments.tracking
      x-required-scopes:
        - 'shipping:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /shipping-locations:
    get:
      operationId: get_shipping_locations_index
      summary: 'Get /shipping-locations'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.shipping-locations.index
      x-required-scopes:
        - 'shipping:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /shipping-quotes:
    post:
      operationId: post_shipping_quotes_store
      summary: 'Post /shipping-quotes'
      tags:
        - 'Commerce & Shipping'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.shipping-quotes.store
      x-required-scopes:
        - 'shipping:read'
      responses:
        201:
          description: 'Resource created'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: [string, 'null']
                  maxLength: 64
                weight_grams:
                  type: integer
                  minimum: 1
                carrier:
                  type: string
                  maxLength: 40
              additionalProperties: true
  /social-accounts:
    get:
      operationId: get_social_accounts_index
      summary: 'Get /social-accounts'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-accounts.index
      x-required-scopes:
        - 'social:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /social-posts:
    get:
      operationId: get_social_posts_index
      summary: 'Get /social-posts'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.index
      x-required-scopes:
        - 'social:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_social_posts_store
      summary: 'Post /social-posts'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.store
      x-required-scopes:
        - 'social:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: [string, 'null']
                  maxLength: 255
                content:
                  type: string
                  maxLength: 10000
                hashtags:
                  type: [string, 'null']
                  maxLength: 1000
                social_account_ids:
                  type: array
                  maxItems: 20
                  items: { type: string, maxLength: 128 }
              required:
                - content
              additionalProperties: true
  '/social-posts/{id}':
    get:
      operationId: get_social_posts_show
      summary: 'Get /social-posts/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.show
      x-required-scopes:
        - 'social:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_social_posts_update
      summary: 'Patch /social-posts/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.update
      x-required-scopes:
        - 'social:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                title:
                  description: 'Merge patch field.'
                content:
                  description: 'Merge patch field.'
                hashtags:
                  description: 'Merge patch field.'
                social_account_ids:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_social_posts_destroy
      summary: 'Delete /social-posts/{id}'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.destroy
      x-required-scopes:
        - 'social:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/social-posts/{id}/cancellations':
    post:
      operationId: post_social_posts_cancellations
      summary: 'Post /social-posts/{id}/cancellations'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.cancellations
      x-required-scopes:
        - 'social:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/social-posts/{id}/publications':
    post:
      operationId: post_social_posts_publications
      summary: 'Post /social-posts/{id}/publications'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.publications
      x-required-scopes:
        - 'social:publish'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/social-posts/{id}/schedules':
    post:
      operationId: post_social_posts_schedules
      summary: 'Post /social-posts/{id}/schedules'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.schedules
      x-required-scopes:
        - 'social:publish'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                scheduled_at:
                  description: 'Value accepted by the runtime validator.'
              required:
                - scheduled_at
              additionalProperties: true
  '/social-posts/{id}/target-retries':
    post:
      operationId: post_social_posts_target_retries
      summary: 'Post /social-posts/{id}/target-retries'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.target-retries
      x-required-scopes:
        - 'social:publish'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/social-posts/{id}/validations':
    post:
      operationId: post_social_posts_validations
      summary: 'Post /social-posts/{id}/validations'
      tags:
        - 'Marketing & Social'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.social-posts.validations
      x-required-scopes:
        - 'social:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /subscription:
    get:
      operationId: get_subscription_show
      summary: 'Get /subscription'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.subscription.show
      x-required-scopes:
        - 'usage:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /sync-changes:
    get:
      operationId: get_sync_changes_index
      summary: 'Get /sync-changes'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.sync-changes.index
      x-required-scopes:
        - 'sync:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: sync_token
          in: query
          required: true
          schema:
            type: string
  /sync-snapshots:
    post:
      operationId: post_sync_snapshots_store
      summary: 'Post /sync-snapshots'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.sync-snapshots.store
      x-required-scopes:
        - 'sync:read'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resource_type:
                  type: string
                  enum: [customer, conversation, product, order, booking, agent]
                filters:
                  type: [array, object]
              required:
                - resource_type
              additionalProperties: true
  '/sync-snapshots/{id}':
    get:
      operationId: get_sync_snapshots_show
      summary: 'Get /sync-snapshots/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.sync-snapshots.show
      x-required-scopes:
        - 'sync:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /tags:
    get:
      operationId: get_tags_index
      summary: 'Get /tags'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tags.index
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_tags_store
      summary: 'Post /tags'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tags.store
      x-required-scopes:
        - 'customers:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 80
                color:
                  type: [string, 'null']
                  maxLength: 20
              required:
                - name
              additionalProperties: true
  '/tags/{id}':
    get:
      operationId: get_tags_show
      summary: 'Get /tags/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tags.show
      x-required-scopes:
        - 'customers:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_tags_update
      summary: 'Patch /tags/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tags.update
      x-required-scopes:
        - 'customers:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                color:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_tags_destroy
      summary: 'Delete /tags/{id}'
      tags:
        - CRM
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tags.destroy
      x-required-scopes:
        - 'customers:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  /tasks:
    get:
      operationId: get_tasks_index
      summary: 'Get /tasks'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tasks.index
      x-required-scopes:
        - 'tasks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_tasks_store
      summary: 'Post /tasks'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tasks.store
      x-required-scopes:
        - 'tasks:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  maxLength: 255
                description:
                  type: [string, 'null']
                  maxLength: 2000
                due_at:
                  description: 'Value accepted by the runtime validator.'
              required:
                - title
              additionalProperties: true
  '/tasks/{id}':
    get:
      operationId: get_tasks_show
      summary: 'Get /tasks/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tasks.show
      x-required-scopes:
        - 'tasks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_tasks_update
      summary: 'Patch /tasks/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tasks.update
      x-required-scopes:
        - 'tasks:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                title:
                  description: 'Merge patch field.'
                description:
                  description: 'Merge patch field.'
              additionalProperties: false
  '/tasks/{id}/completions':
    post:
      operationId: post_tasks_completions
      summary: 'Post /tasks/{id}/completions'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.tasks.completions
      x-required-scopes:
        - 'tasks:write'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /teams:
    get:
      operationId: get_teams_index
      summary: 'Get /teams'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.teams.index
      x-required-scopes:
        - 'members:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  /telegram-notifications:
    post:
      operationId: post_telegram_notifications_store
      summary: 'Post /telegram-notifications'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.telegram-notifications.store
      x-required-scopes:
        - 'notifications:send'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                group_id:
                  type: integer
                  minimum: 1
                caption:
                  type: string
                  maxLength: 1024
                photos:
                  type: array
                  maxItems: 10
                  items: { type: string, format: uri, maxLength: 2048 }
                bold:
                  type: array
                  maxItems: 32
                  items: { description: 'Value accepted by the runtime validator.', type: object, properties: { offset: { type: integer, minimum: 0 }, length: { type: integer, minimum: 1 } }, required: [offset, length] }
              required:
                - group_id
                - caption
                - photos
              additionalProperties: true
  /usage:
    get:
      operationId: get_usage_show
      summary: 'Get /usage'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.usage.show
      x-required-scopes:
        - 'usage:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /usage-meters:
    get:
      operationId: get_usage_meters_index
      summary: 'Get /usage-meters'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.usage-meters.index
      x-required-scopes:
        - 'usage:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  /usage-summary:
    get:
      operationId: get_usage_summary_show
      summary: 'Get /usage-summary'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.usage-summary.show
      x-required-scopes:
        - 'usage:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /webhook-deliveries:
    get:
      operationId: get_webhook_deliveries_index
      summary: 'Get /webhook-deliveries'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-deliveries.index
      x-required-scopes:
        - 'webhooks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/webhook-deliveries/{id}':
    get:
      operationId: get_webhook_deliveries_show
      summary: 'Get /webhook-deliveries/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-deliveries.show
      x-required-scopes:
        - 'webhooks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/webhook-deliveries/{id}/replays':
    post:
      operationId: post_webhook_deliveries_replay
      summary: 'Post /webhook-deliveries/{id}/replays'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-deliveries.replay
      x-required-scopes:
        - 'webhooks:manage'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /webhook-endpoints:
    get:
      operationId: get_webhook_endpoints_index
      summary: 'Get /webhook-endpoints'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-endpoints.index
      x-required-scopes:
        - 'webhooks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_webhook_endpoints_store
      summary: 'Post /webhook-endpoints'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-endpoints.store
      x-required-scopes:
        - 'webhooks:manage'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  description: 'Value accepted by the runtime validator.'
                description:
                  type: [string, 'null']
                  maxLength: 255
                event_types:
                  type: array
                  minItems: 1
                  items: { type: string }
              required:
                - url
                - event_types
              additionalProperties: true
  '/webhook-endpoints/{id}':
    get:
      operationId: get_webhook_endpoints_show
      summary: 'Get /webhook-endpoints/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-endpoints.show
      x-required-scopes:
        - 'webhooks:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_webhook_endpoints_update
      summary: 'Patch /webhook-endpoints/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-endpoints.update
      x-required-scopes:
        - 'webhooks:manage'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                url:
                  description: 'Merge patch field.'
                description:
                  description: 'Merge patch field.'
                event_types:
                  description: 'Merge patch field.'
                status:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_webhook_endpoints_destroy
      summary: 'Delete /webhook-endpoints/{id}'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-endpoints.destroy
      x-required-scopes:
        - 'webhooks:manage'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/webhook-endpoints/{id}/secret-rotations':
    post:
      operationId: post_webhook_endpoints_rotate_secret
      summary: 'Post /webhook-endpoints/{id}/secret-rotations'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-endpoints.rotate-secret
      x-required-scopes:
        - 'webhooks:manage'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/webhook-endpoints/{id}/tests':
    post:
      operationId: post_webhook_endpoints_tests
      summary: 'Post /webhook-endpoints/{id}/tests'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.webhook-endpoints.tests
      x-required-scopes:
        - 'webhooks:manage'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /workflow-runs:
    get:
      operationId: get_workflow_runs_index
      summary: 'Get /workflow-runs'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflow-runs.index
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
  '/workflow-runs/{id}':
    get:
      operationId: get_workflow_runs_show
      summary: 'Get /workflow-runs/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflow-runs.show
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  '/workflow-runs/{id}/cancellations':
    post:
      operationId: post_workflow_runs_cancellations
      summary: 'Post /workflow-runs/{id}/cancellations'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflow-runs.cancellations
      x-required-scopes:
        - 'workflows:trigger'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/workflow-runs/{id}/retries':
    post:
      operationId: post_workflow_runs_retries
      summary: 'Post /workflow-runs/{id}/retries'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflow-runs.retries
      x-required-scopes:
        - 'workflows:trigger'
      responses:
        202:
          description: 'Command accepted. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  /workflow-templates:
    get:
      operationId: get_workflow_templates_index
      summary: 'Get /workflow-templates'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflow-templates.index
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /workflow-triggers:
    post:
      operationId: post_workflow_triggers_store
      summary: 'Post /workflow-triggers'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflow-triggers.store
      x-required-scopes:
        - 'workflows:trigger'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                event_id:
                  type: [string, 'null']
                  maxLength: 64
                conversation_id:
                  type: [string, 'null']
                  maxLength: 128
                subject_type:
                  description: 'Value accepted by the runtime validator.'
                  enum: [customer, order, booking, null]
                subject_id:
                  type: [string, 'null']
                  maxLength: 128
                variables:
                  type: [array, object]
              additionalProperties: true
  /workflows:
    get:
      operationId: get_workflows_index
      summary: 'Get /workflows'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.index
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
        -
          name: cursor
          in: query
          schema:
            type: string
    post:
      operationId: post_workflows_store
      summary: 'Post /workflows'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.store
      x-required-scopes:
        - 'workflows:write'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 160
                definition:
                  type: [array, object]
              required:
                - name
                - definition
              additionalProperties: true
  '/workflows/{id}':
    get:
      operationId: get_workflows_show
      summary: 'Get /workflows/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.show
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
    patch:
      operationId: patch_workflows_update
      summary: 'Patch /workflows/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.update
      x-required-scopes:
        - 'workflows:write'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
      requestBody:
        required: false
        content:
          application/merge-patch+json:
            schema:
              type: object
              properties:
                name:
                  description: 'Merge patch field.'
                definition:
                  description: 'Merge patch field.'
              additionalProperties: false
    delete:
      operationId: delete_workflows_destroy
      summary: 'Delete /workflows/{id}'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.destroy
      x-required-scopes:
        - 'workflows:write'
      responses:
        204:
          description: 'Command completed with no response body'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
  '/workflows/{id}/pauses':
    post:
      operationId: post_workflows_pauses
      summary: 'Post /workflows/{id}/pauses'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.pauses
      x-required-scopes:
        - 'workflows:publish'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/workflows/{id}/publications':
    post:
      operationId: post_workflows_publications
      summary: 'Post /workflows/{id}/publications'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.publications
      x-required-scopes:
        - 'workflows:publish'
      responses:
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/workflows/{id}/resumptions':
    post:
      operationId: post_workflows_resumptions
      summary: 'Post /workflows/{id}/resumptions'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.resumptions
      x-required-scopes:
        - 'workflows:publish'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: If-Match
          in: header
          required: true
          schema:
            type: string
            examples:
              - '"rev_1"'
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
  '/workflows/{id}/simulations':
    post:
      operationId: post_workflows_simulations
      summary: 'Post /workflows/{id}/simulations'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.simulations
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                variables:
                  type: [array, object]
              additionalProperties: true
  '/workflows/{id}/triggers':
    post:
      operationId: post_workflows_triggers
      summary: 'Post /workflows/{id}/triggers'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.triggers
      x-required-scopes:
        - 'workflows:trigger'
      responses:
        200:
          description: 'Successful response. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        201:
          description: 'Resource created. Replays return resource references without credentials or a saved response payload.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
          headers:
            Idempotency-Replayed:
              schema:
                type: boolean
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
        -
          name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                event_id:
                  type: [string, 'null']
                  maxLength: 64
                conversation_id:
                  type: [string, 'null']
                  maxLength: 128
                subject_type:
                  description: 'Value accepted by the runtime validator.'
                  enum: [customer, order, booking, null]
                subject_id:
                  type: [string, 'null']
                  maxLength: 128
                variables:
                  type: [array, object]
              additionalProperties: true
  '/workflows/{id}/validations':
    post:
      operationId: post_workflows_validations
      summary: 'Post /workflows/{id}/validations'
      tags:
        - 'Automation & Integrations'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workflows.validations
      x-required-scopes:
        - 'workflows:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      parameters:
        -
          name: id
          in: path
          required: true
          schema:
            type: string
  /workspace:
    get:
      operationId: get_workspace_show
      summary: 'Get /workspace'
      tags:
        - 'Platform & Governance'
      security:
        -
          WorkspaceBearer: {}
      x-route-name: public.v1.workspace.show
      x-required-scopes:
        - 'workspace:read'
      responses:
        200:
          description: 'Successful response'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemEnvelope'
        4XX:
          description: 'Client error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        5XX:
          description: 'Server or provider error'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
webhooks:
  customer.created:
    post:
      summary: 'Customer profile created.'
      x-domain: crm
      x-required-scope: 'customers:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  customer.updated:
    post:
      summary: 'Customer profile updated.'
      x-domain: crm
      x-required-scope: 'customers:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  customer.deleted:
    post:
      summary: 'Customer profile deleted or erased.'
      x-domain: crm
      x-required-scope: 'customers:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  customer.identity_linked:
    post:
      summary: 'Channel identity linked to customer.'
      x-domain: crm
      x-required-scope: 'customers:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  customer.consent_updated:
    post:
      summary: 'Customer opt-in/opt-out consent changed.'
      x-domain: crm
      x-required-scope: 'customers:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  conversation.created:
    post:
      summary: 'Conversation opened.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  conversation.updated:
    post:
      summary: 'Conversation metadata updated.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  conversation.assigned:
    post:
      summary: 'Conversation assigned to agent or staff.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  conversation.closed:
    post:
      summary: 'Conversation closed.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  conversation.reopened:
    post:
      summary: 'Conversation reopened.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  conversation.handoff_requested:
    post:
      summary: 'AI requested human agent handoff.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  message.received:
    post:
      summary: 'Inbound customer message received.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  message.status_updated:
    post:
      summary: 'Outbound message delivery status updated.'
      x-domain: inbox
      x-required-scope: 'conversations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent.created:
    post:
      summary: 'AI Agent created (inactive draft).'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent.draft_updated:
    post:
      summary: 'AI Agent draft configuration updated.'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent.published:
    post:
      summary: 'Immutable AI Agent version published.'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent.deactivated:
    post:
      summary: 'AI Agent deactivated.'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent_run.status_updated:
    post:
      summary: 'Agent run status transitioned.'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent_run.completed:
    post:
      summary: 'Agent run completed.'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent_run.cancelled:
    post:
      summary: 'Agent run cancelled.'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  agent_run.failed:
    post:
      summary: 'Agent run failed.'
      x-domain: agent
      x-required-scope: 'agents:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  knowledge.ingestion_completed:
    post:
      summary: 'Knowledge source ingestion ready.'
      x-domain: knowledge
      x-required-scope: 'knowledge:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  knowledge.ingestion_failed:
    post:
      summary: 'Knowledge source ingestion failed.'
      x-domain: knowledge
      x-required-scope: 'knowledge:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  asset.ready:
    post:
      summary: 'Uploaded or imported media asset is ready.'
      x-domain: assets
      x-required-scope: 'assets:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  asset.failed:
    post:
      summary: 'Media upload or import failed.'
      x-domain: assets
      x-required-scope: 'assets:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  inventory.adjusted:
    post:
      summary: 'Catalog stock level adjusted.'
      x-domain: sales
      x-required-scope: 'catalog:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  inventory.reserved:
    post:
      summary: 'Inventory reserved or released.'
      x-domain: sales
      x-required-scope: 'catalog:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  order.created:
    post:
      summary: 'Merchant order created.'
      x-domain: sales
      x-required-scope: 'orders:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  order.updated:
    post:
      summary: 'Merchant order updated or confirmed.'
      x-domain: sales
      x-required-scope: 'orders:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  order.cancelled:
    post:
      summary: 'Merchant order cancelled.'
      x-domain: sales
      x-required-scope: 'orders:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  payment.recorded:
    post:
      summary: 'Manual or gateway payment recorded.'
      x-domain: sales
      x-required-scope: 'payments:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  payment.confirmed:
    post:
      summary: 'Verified merchant payment confirmed.'
      x-domain: sales
      x-required-scope: 'payments:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  payment.failed:
    post:
      summary: 'Merchant payment attempt failed.'
      x-domain: sales
      x-required-scope: 'payments:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  payment.refunded:
    post:
      summary: 'Merchant payment refund succeeded.'
      x-domain: sales
      x-required-scope: 'payments:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  shipment.status_updated:
    post:
      summary: 'Shipment carrier state updated.'
      x-domain: sales
      x-required-scope: 'shipping:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  booking.created:
    post:
      summary: 'Service booking created.'
      x-domain: booking
      x-required-scope: 'bookings:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  booking.rescheduled:
    post:
      summary: 'Service booking rescheduled.'
      x-domain: booking
      x-required-scope: 'bookings:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  booking.cancelled:
    post:
      summary: 'Service booking cancelled.'
      x-domain: booking
      x-required-scope: 'bookings:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  booking.completed:
    post:
      summary: 'Service booking completed.'
      x-domain: booking
      x-required-scope: 'bookings:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  workflow.published:
    post:
      summary: 'Workflow version published.'
      x-domain: automation
      x-required-scope: 'workflows:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  workflow_run.completed:
    post:
      summary: 'Workflow run completed.'
      x-domain: automation
      x-required-scope: 'workflows:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  workflow_run.failed:
    post:
      summary: 'Workflow run failed.'
      x-domain: automation
      x-required-scope: 'workflows:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  task.created:
    post:
      summary: 'Human task assigned.'
      x-domain: automation
      x-required-scope: 'tasks:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  task.updated:
    post:
      summary: 'Human task status updated.'
      x-domain: automation
      x-required-scope: 'tasks:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  campaign.status_updated:
    post:
      summary: 'Campaign status transitioned.'
      x-domain: marketing
      x-required-scope: 'campaigns:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  campaign.completed:
    post:
      summary: 'Campaign dispatch completed.'
      x-domain: marketing
      x-required-scope: 'campaigns:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  social_post.target_status_updated:
    post:
      summary: 'Social post target outcome updated.'
      x-domain: social
      x-required-scope: 'social:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  operation.status_updated:
    post:
      summary: 'Async operation status changed.'
      x-domain: platform
      x-required-scope: 'operations:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  approval.requested:
    post:
      summary: 'Approval requested for gated operation.'
      x-domain: platform
      x-required-scope: 'approvals:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  approval.decided:
    post:
      summary: 'Approval approved or rejected.'
      x-domain: platform
      x-required-scope: 'approvals:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  quota.threshold_reached:
    post:
      summary: 'Workspace soft or hard quota threshold reached.'
      x-domain: platform
      x-required-scope: 'usage:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
  webhook.test:
    post:
      summary: 'Synthetic webhook connectivity verification event.'
      x-domain: platform
      x-required-scope: 'webhooks:read'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent'
      responses:
        200:
          description: 'Webhook acknowledged'
