openapi: 3.1.0
info:
  title: Pace Outbound Call API
  description: 'Outbound call orders (*Gesprächsaufträge*) for Pace''s AI voice agents, with

    structured, asynchronously delivered results.


    Every request carries `Authorization: Bearer <token>` from the OAuth2

    client-credentials flow. **The tenant is derived from the token alone** - there

    is no tenant header. Errors use `application/problem+json` (RFC 9457); branch on

    `code`, never on `title` or `detail`.


    Open registries are marked `x-extensible-enum`: they grow within v1, and a

    client MUST accept unknown values and fall back as documented. Closed `enum`s

    are contracts and do not change within a major version.

    '
  version: 1.0.0-draft.3
  contact:
    name: Pace Payments - API team
    email: api@pacepayments.ai
  x-data-region: EU - Azure Germany West Central
servers:
- url: https://api.pacepayments.ai
  description: Production (EU / Azure Germany West Central). ASSUMPTION - final host pending infra decision.
- url: https://sandbox.api.pacepayments.ai
  description: Sandbox (simulated telephony, magic test numbers).
paths:
  /v1/call-orders:
    post:
      tags:
      - Call orders
      summary: Submit a call order (Gesprächsauftrag)
      operationId: create_call_order_v1_call_orders_post
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: One unique key per logical request (a UUID is recommended). The response is stored
            against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
            409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48
            hours.
          examples:
          - 7f8c9a4e-2b1d-4e5f-9a3c-d10f2b6e8c11
          title: Idempotency-Key
        description: One unique key per logical request (a UUID is recommended). The response is stored
          against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
          409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallOrderCreate'
      responses:
        '202':
          description: Order accepted for asynchronous execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallOrder'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': &id002
          description: 'No valid access token. Client action: request a new token from the token endpoint
            and retry once. Repeated 401 with a fresh token means the client registration is disabled
            - contact Pace, do not retry in a loop.'
          content: &id001
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403': &id003
          description: Authenticated but not permitted. `insufficient_scope` names the missing scope in
            `detail`; `feature_not_enabled` means the tenant lacks the feature; `ip_not_allowlisted` means
            the source IP is not on the client registration's allowlist; `simulate_not_allowed` means
            a sandbox-only `simulate` block was sent to the live host. None of these are retryable.
          content: *id001
        '429': &id004
          description: HTTP rate limit (`rate_limited`) or execution capacity refusal (`quota_exceeded`,
            `backlog_full`) - two distinct layers. Wait for `Retry-After`, then retry the identical request
            with the same `Idempotency-Key`. `backlog_full` will not clear in seconds; back off to minutes.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds until the next attempt is permitted.
            RateLimit-Limit:
              schema:
                type: integer
            RateLimit-Remaining:
              schema:
                type: integer
            RateLimit-Reset:
              schema:
                type: integer
          content: *id001
        default: &id005
          description: Error (RFC 9457). Branch on `code`, never on `title` or `detail`.
          content: *id001
      security:
      - pace_oauth2:
        - orders:write
    get:
      tags:
      - Call orders
      summary: List call orders
      operationId: list_call_orders_v1_call_orders_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - name: order_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Order Type
      - name: client_reference
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Reference
      - name: subject_reference
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Subject Reference
      - name: enrollment_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Enrollment Id
      - name: created_after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created After
      - name: created_before
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created Before
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:read
  /v1/call-orders/{order_id}:
    get:
      tags:
      - Call orders
      summary: Fetch a call order (includes result when terminal)
      operationId: get_call_order_v1_call_orders__order_id__get
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
          title: Order Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallOrder'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:read
    patch:
      tags:
      - Call orders
      summary: Narrow pre-dial edits (schedule, metadata)
      operationId: patch_call_order_v1_call_orders__order_id__patch
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
          title: Order Id
      - name: If-Match
        in: header
        required: true
        schema:
          type: string
          title: If-Match
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallOrderPatch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallOrder'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:write
  /v1/call-orders/{order_id}/cancel:
    post:
      tags:
      - Call orders
      summary: Cancel an order (only in accepted/scheduled)
      operationId: cancel_call_order_v1_call_orders__order_id__cancel_post
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
          title: Order Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/CancelRequest'
              - type: 'null'
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallOrder'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:write
  /v1/calls:
    get:
      tags:
      - Calls
      summary: List dial attempts
      operationId: list_calls_v1_calls_get
      parameters:
      - name: call_order_id
        in: query
        required: true
        schema:
          type: string
          description: Required - attempts are always read against exactly one order.
          title: Call Order Id
        description: Required - attempts are always read against exactly one order.
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:read
  /v1/calls/{call_id}:
    get:
      tags:
      - Calls
      summary: Fetch one dial attempt
      operationId: get_call_v1_calls__call_id__get
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          title: Call Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Call'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:read
  /v1/calls/{call_id}/transcript:
    get:
      tags:
      - Calls
      summary: Fetch the structured transcript artifact
      operationId: get_transcript_v1_calls__call_id__transcript_get
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          title: Call Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transcript'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - transcripts:read
  /v1/calls/{call_id}/recording:
    get:
      tags:
      - Calls
      summary: Obtain a short-lived signed URL for the recording
      operationId: get_recording_v1_calls__call_id__recording_get
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          title: Call Id
      responses:
        '307':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - recordings:read
  /v1/order-types:
    get:
      tags:
      - Order types
      summary: List order types
      operationId: list_order_types_v1_order_types_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
    post:
      tags:
      - Order types
      summary: Create an order type (starts as a draft)
      operationId: create_order_type_v1_order_types_post
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: One unique key per logical request (a UUID is recommended). The response is stored
            against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
            409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48
            hours.
          examples:
          - 7f8c9a4e-2b1d-4e5f-9a3c-d10f2b6e8c11
          title: Idempotency-Key
        description: One unique key per logical request (a UUID is recommended). The response is stored
          against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
          409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderTypeCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderType'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/order-types/{key}:
    get:
      tags:
      - Order types
      summary: Fetch an order type
      operationId: get_order_type_v1_order_types__key__get
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          title: Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderType'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
    patch:
      tags:
      - Order types
      summary: Update an order type (bumps version on behavioural change)
      operationId: patch_order_type_v1_order_types__key__patch
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          title: Key
      - name: If-Match
        in: header
        required: true
        schema:
          type: string
          title: If-Match
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderTypeUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderType'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/order-types/{key}/archive:
    post:
      tags:
      - Order types
      summary: Archive an order type (existing orders keep their version)
      operationId: archive_order_type_v1_order_types__key__archive_post
      parameters:
      - name: key
        in: path
        required: true
        schema:
          type: string
          title: Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderType'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/sequences:
    get:
      tags:
      - Sequences
      summary: List sequences
      operationId: list_sequences_v1_sequences_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
    post:
      tags:
      - Sequences
      summary: Create a sequence (draft version 1)
      operationId: create_sequence_v1_sequences_post
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: One unique key per logical request (a UUID is recommended). The response is stored
            against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
            409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48
            hours.
          examples:
          - 7f8c9a4e-2b1d-4e5f-9a3c-d10f2b6e8c11
          title: Idempotency-Key
        description: One unique key per logical request (a UUID is recommended). The response is stored
          against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
          409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SequenceCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sequence'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/sequences/{sequence_id}:
    get:
      tags:
      - Sequences
      summary: Fetch a sequence incl. versions
      operationId: get_sequence_v1_sequences__sequence_id__get
      parameters:
      - name: sequence_id
        in: path
        required: true
        schema:
          type: string
          title: Sequence Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sequence'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
  /v1/sequences/{sequence_id}/versions:
    post:
      tags:
      - Sequences
      summary: Add a new draft version
      operationId: add_version_v1_sequences__sequence_id__versions_post
      parameters:
      - name: sequence_id
        in: path
        required: true
        schema:
          type: string
          title: Sequence Id
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: One unique key per logical request (a UUID is recommended). The response is stored
            against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
            409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48
            hours.
          examples:
          - 7f8c9a4e-2b1d-4e5f-9a3c-d10f2b6e8c11
          title: Idempotency-Key
        description: One unique key per logical request (a UUID is recommended). The response is stored
          against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
          409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SequenceVersionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sequence'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/sequences/{sequence_id}/versions/{version}/activate:
    post:
      tags:
      - Sequences
      summary: Activate a version (running enrollments keep theirs)
      operationId: activate_version_v1_sequences__sequence_id__versions__version__activate_post
      parameters:
      - name: sequence_id
        in: path
        required: true
        schema:
          type: string
          title: Sequence Id
      - name: version
        in: path
        required: true
        schema:
          type: integer
          minimum: 1
          title: Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sequence'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/sequences/{sequence_id}/archive:
    post:
      tags:
      - Sequences
      summary: Archive (no new enrollments; running ones finish)
      operationId: archive_sequence_v1_sequences__sequence_id__archive_post
      parameters:
      - name: sequence_id
        in: path
        required: true
        schema:
          type: string
          title: Sequence Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sequence'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/enrollments:
    get:
      tags:
      - Enrollments
      summary: List enrollments
      operationId: list_enrollments_v1_enrollments_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - name: sequence_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Sequence Id
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - name: subject_reference
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Subject Reference
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:read
  /v1/enrollments/{enrollment_id}:
    get:
      tags:
      - Enrollments
      summary: Fetch an enrollment (step pointer, created orders, next action)
      operationId: get_enrollment_v1_enrollments__enrollment_id__get
      parameters:
      - name: enrollment_id
        in: path
        required: true
        schema:
          type: string
          title: Enrollment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Enrollment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:read
  /v1/enrollments/{enrollment_id}/pause:
    post:
      tags:
      - Enrollments
      summary: Pause an active enrollment
      operationId: pause_enrollment_v1_enrollments__enrollment_id__pause_post
      parameters:
      - name: enrollment_id
        in: path
        required: true
        schema:
          type: string
          title: Enrollment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Enrollment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:write
  /v1/enrollments/{enrollment_id}/resume:
    post:
      tags:
      - Enrollments
      summary: Resume a paused enrollment
      operationId: resume_enrollment_v1_enrollments__enrollment_id__resume_post
      parameters:
      - name: enrollment_id
        in: path
        required: true
        schema:
          type: string
          title: Enrollment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Enrollment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:write
  /v1/enrollments/{enrollment_id}/cancel:
    post:
      tags:
      - Enrollments
      summary: Cancel an enrollment (pending call orders are canceled too)
      operationId: cancel_enrollment_v1_enrollments__enrollment_id__cancel_post
      parameters:
      - name: enrollment_id
        in: path
        required: true
        schema:
          type: string
          title: Enrollment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Enrollment'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:write
  /v1/signals:
    post:
      tags:
      - Signals
      summary: Emit a business signal (Model B input)
      operationId: create_signal_v1_signals_post
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: One unique key per logical request (a UUID is recommended). The response is stored
            against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
            409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48
            hours.
          examples:
          - 7f8c9a4e-2b1d-4e5f-9a3c-d10f2b6e8c11
          title: Idempotency-Key
        description: One unique key per logical request (a UUID is recommended). The response is stored
          against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
          409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignalCreate'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Signal'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:write
  /v1/signals/{signal_id}:
    get:
      tags:
      - Signals
      summary: Fetch a signal and what it triggered
      operationId: get_signal_v1_signals__signal_id__get
      parameters:
      - name: signal_id
        in: path
        required: true
        schema:
          type: string
          title: Signal Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Signal'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - orders:read
  /v1/suppressions:
    get:
      tags:
      - Suppressions
      summary: List do-not-call entries
      operationId: list_suppressions_v1_suppressions_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
    post:
      tags:
      - Suppressions
      summary: Add a do-not-call entry
      operationId: create_suppression_v1_suppressions_post
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: One unique key per logical request (a UUID is recommended). The response is stored
            against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
            409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48
            hours.
          examples:
          - 7f8c9a4e-2b1d-4e5f-9a3c-d10f2b6e8c11
          title: Idempotency-Key
        description: One unique key per logical request (a UUID is recommended). The response is stored
          against `(tenant, key, method, RESOLVED path)` - the same key against a different path returns
          409 `idempotency_key_conflict`. Same key plus same body replays the stored response for 48 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SuppressionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Suppression'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - suppressions:write
  /v1/suppressions/{suppression_id}:
    delete:
      tags:
      - Suppressions
      summary: Remove a do-not-call entry
      operationId: delete_suppression_v1_suppressions__suppression_id__delete
      parameters:
      - name: suppression_id
        in: path
        required: true
        schema:
          type: string
          title: Suppression Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - suppressions:write
  /v1/tenant:
    get:
      tags:
      - Tenant
      summary: Own configuration snapshot
      operationId: get_tenant_v1_tenant_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantInfo'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
  /v1/webhook-endpoints:
    get:
      tags:
      - Webhooks
      summary: List webhook endpoints
      operationId: list_endpoints_v1_webhook_endpoints_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
    post:
      tags:
      - Webhooks
      summary: Register an endpoint (starts verification challenge)
      operationId: create_endpoint_v1_webhook_endpoints_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEndpointCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointWithSecret'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/webhook-endpoints/{endpoint_id}:
    get:
      tags:
      - Webhooks
      summary: Fetch an endpoint incl. health stats
      operationId: get_endpoint_v1_webhook_endpoints__endpoint_id__get
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
          title: Endpoint Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpoint'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
    patch:
      tags:
      - Webhooks
      summary: Update url, event_types, payload_mode, status
      operationId: patch_endpoint_v1_webhook_endpoints__endpoint_id__patch
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
          title: Endpoint Id
      - name: If-Match
        in: header
        required: true
        schema:
          type: string
          title: If-Match
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEndpointUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpoint'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
    delete:
      tags:
      - Webhooks
      summary: Delete an endpoint
      operationId: delete_endpoint_v1_webhook_endpoints__endpoint_id__delete
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
          title: Endpoint Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/webhook-endpoints/{endpoint_id}/rotate-secret:
    post:
      tags:
      - Webhooks
      summary: Rotate the signing secret (24h overlap, both secrets sign)
      operationId: rotate_secret_v1_webhook_endpoints__endpoint_id__rotate_secret_post
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
          title: Endpoint Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointWithSecret'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/webhook-endpoints/{endpoint_id}/test:
    post:
      tags:
      - Webhooks
      summary: Send a ping now (or re-send verification while pending)
      operationId: test_endpoint_v1_webhook_endpoints__endpoint_id__test_post
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
          title: Endpoint Id
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDelivery'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
  /v1/webhook-endpoints/{endpoint_id}/replay:
    post:
      tags:
      - Webhooks
      summary: Re-dispatch events from a cursor or time range
      operationId: replay_v1_webhook_endpoints__endpoint_id__replay_post
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
          title: Endpoint Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplayRequest'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplayJob'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:write
        - events:read
  /v1/webhook-deliveries:
    get:
      tags:
      - Webhooks
      summary: Delivery log (incl. dead-lettered with status=failed)
      operationId: list_deliveries_v1_webhook_deliveries_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - name: endpoint_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Endpoint Id
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - name: event_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - config:read
  /v1/events:
    get:
      tags:
      - Events
      summary: Pollable event feed (webhook fallback / reconciliation)
      operationId: list_events_v1_events_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 100
            minimum: 1
          - type: 'null'
          title: Limit
      - name: after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: The previous page's cursor OR a bare event ID (`evt_…`) - both are accepted.
          title: After
        description: The previous page's cursor OR a bare event ID (`evt_…`) - both are accepted.
      - name: event_types
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated. Exact types, or a resource wildcard (`call_order.*`).
          title: Event Types
        description: Comma-separated. Exact types, or a resource wildcard (`call_order.*`).
      - name: created_after
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created After
      - name: call_order_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Call Order Id
      - name: enrollment_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Enrollment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageEnvelope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - events:read
  /v1/events/{event_id}:
    get:
      tags:
      - Events
      summary: Fetch one event
      operationId: get_event_v1_events__event_id__get
      parameters:
      - name: event_id
        in: path
        required: true
        schema:
          type: string
          title: Event Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '401': *id002
        '403': *id003
        '429': *id004
        default: *id005
      security:
      - pace_oauth2:
        - events:read
components:
  schemas:
    AgentIdentity:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
          description: A stable agent identity, so a result is always traceable to the agent that produced
            it.
          examples:
          - agt_lea_de_v4
        kind:
          anyOf:
          - type: string
            enum:
            - ai
            - human
          - type: 'null'
          title: Kind
      type: object
      title: AgentIdentity
    AiDisclosure:
      properties:
        disclosed:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Disclosed
        at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: At
      type: object
      title: AiDisclosure
    Call:
      properties:
        id:
          type: string
          title: Id
        call_order_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Call Order Id
        attempt:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Attempt
        disposition:
          type: string
          enum:
          - answered
          - no_answer
          - busy
          - voicemail
          - failed
          - canceled
          title: Disposition
        direction:
          type: string
          title: Direction
          x-extensible-enum:
          - outbound
          x-registry-note: '`inbound` ist geplant (Sec. 14 Phase 4).'
        started_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Started At
        answered_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Answered At
        ended_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Ended At
        duration_seconds:
          anyOf:
          - type: integer
          - type: 'null'
          title: Duration Seconds
        from_number:
          anyOf:
          - type: string
          - type: 'null'
          title: From Number
        agent:
          anyOf:
          - $ref: '#/components/schemas/AgentIdentity'
          - type: 'null'
        transcript:
          anyOf:
          - $ref: '#/components/schemas/TranscriptRef'
          - type: 'null'
        recording:
          anyOf:
          - $ref: '#/components/schemas/RecordingRef'
          - type: 'null'
      type: object
      required:
      - id
      - disposition
      - direction
      title: Call
    CallOrder:
      properties:
        order_type:
          type: string
          title: Order Type
        client_reference:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Reference
        subject:
          $ref: '#/components/schemas/Subject'
        contacts:
          items:
            $ref: '#/components/schemas/ContactChannel'
          type: array
          title: Contacts
        context:
          $ref: '#/components/schemas/OrderContext'
        scheduling:
          anyOf:
          - $ref: '#/components/schemas/Scheduling'
          - type: 'null'
        negotiation:
          anyOf:
          - $ref: '#/components/schemas/Negotiation'
          - type: 'null'
        delivery:
          anyOf:
          - $ref: '#/components/schemas/DeliveryPrefs'
          - type: 'null'
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
            description: Your own opaque key-value pairs; mirrored on resources and in every event. CONTRACTUALLY
              free of personal data - Pace does not inspect the values. Whatever you put here falls outside
              the deletion and retention machinery that protects the rest of the order.
            examples:
            - campaign: q3-onboarding
              cost_center: '77'
          - type: 'null'
          title: Metadata
        id:
          type: string
          title: Id
          examples:
          - ord_01J32K7M2QW9RT
        status:
          type: string
          enum:
          - accepted
          - scheduled
          - in_progress
          - completed
          - canceled
          - expired
          - failed
          title: Status
        order_type_version:
          type: integer
          minimum: 1.0
          title: Order Type Version
          description: The order-type version that applied at acceptance. Burned in, so the result stays
            interpretable after a configuration change.
        enrollment_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Enrollment Id
          description: Set when an escalation sequence created this order, null otherwise.
        attempt_count:
          type: integer
          minimum: 0.0
          title: Attempt Count
          default: 0
        next_attempt_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Next Attempt At
          description: Planned instant of the next dial attempt. Non-null only in status `scheduled`.
        decisive_call_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Decisive Call Id
          description: The attempt that produced the conversation result. Null until an attempt has reached
            a live counterpart.
        cancel_reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Cancel Reason
          description: Non-null exactly when `status` is `canceled`.
          x-extensible-enum:
          - client_request
          - suppressed
          - enrollment_exited
          - superseded
        result:
          anyOf:
          - $ref: '#/components/schemas/Result'
          - type: 'null'
          description: Present on EVERY terminal status; absent only while the order is still running.
        compliance:
          $ref: '#/components/schemas/ComplianceBlock'
        calls:
          items:
            $ref: '#/components/schemas/Call'
          type: array
          title: Calls
          description: Attempts, oldest first.
        problem:
          anyOf:
          - $ref: '#/components/schemas/Problem'
          - type: 'null'
          description: 'Present exactly when `status` is `failed` - that is, on a platform error. Never
            on a business result: ''the debtor hung up'' is not an error.'
        created_at:
          type: string
          format: date-time
          title: Created At
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
      type: object
      required:
      - order_type
      - subject
      - contacts
      - context
      - id
      - status
      - order_type_version
      - created_at
      title: CallOrder
    CallOrderCreate:
      properties:
        order_type:
          type: string
          maxLength: 64
          minLength: 2
          pattern: ^[a-z][a-z0-9_]{1,63}$
          title: Order Type
          examples:
          - zahlungserinnerung
        client_reference:
          anyOf:
          - type: string
            maxLength: 128
            minLength: 1
          - type: 'null'
          title: Client Reference
          description: Your business key (invoice, case file). Mirrored on the resource and in EVERY event,
            and filterable. It does not have to be unique.
          examples:
          - INV-2026-118442
        subject:
          $ref: '#/components/schemas/Subject'
        contacts:
          items:
            $ref: '#/components/schemas/ContactChannel'
          type: array
          maxItems: 10
          minItems: 1
          title: Contacts
        context:
          $ref: '#/components/schemas/OrderContext'
        scheduling:
          anyOf:
          - $ref: '#/components/schemas/Scheduling'
          - type: 'null'
        negotiation:
          anyOf:
          - $ref: '#/components/schemas/Negotiation'
          - type: 'null'
        delivery:
          anyOf:
          - $ref: '#/components/schemas/DeliveryPrefs'
          - type: 'null'
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
            description: Your own opaque key-value pairs; mirrored on resources and in every event. CONTRACTUALLY
              free of personal data - Pace does not inspect the values. Whatever you put here falls outside
              the deletion and retention machinery that protects the rest of the order.
            examples:
            - campaign: q3-onboarding
              cost_center: '77'
          - type: 'null'
          title: Metadata
        simulate:
          anyOf:
          - $ref: '#/components/schemas/SimulateBlock'
          - type: 'null'
          description: 'SANDBOX ONLY. Forces outcomes, per-attempt dispositions and artificial delays.
            Sent to the live host: 403 `simulate_not_allowed` - never a silent ignore.'
      additionalProperties: false
      type: object
      required:
      - order_type
      - subject
      - contacts
      - context
      title: CallOrderCreate
      description: '`POST /v1/call-orders`. Everything else has sensible defaults.'
    CallOrderPatch:
      properties:
        scheduling:
          anyOf:
          - $ref: '#/components/schemas/Scheduling'
          - type: 'null'
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
            description: Your own opaque key-value pairs; mirrored on resources and in every event. CONTRACTUALLY
              free of personal data - Pace does not inspect the values. Whatever you put here falls outside
              the deletion and retention machinery that protects the rest of the order.
            examples:
            - campaign: q3-onboarding
              cost_center: '77'
          - type: 'null'
          title: Metadata
      additionalProperties: false
      type: object
      title: CallOrderPatch
      description: '`PATCH /v1/call-orders/{id}` - only before the first dial attempt.


        Deliberately tiny. Everything that bears on the conversation is immutable

        after acceptance: a claim amount that changed between acceptance and the

        call would no longer be explicable in the result.'
    CallStep:
      properties:
        id:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Id
          description: A stable step identifier, unique within a sequence version.
          examples:
          - wait_settle
        type:
          type: string
          const: call
          title: Type
        order_type:
          type: string
          maxLength: 64
          minLength: 2
          pattern: ^[a-z][a-z0-9_]{1,63}$
          title: Order Type
        scheduling:
          anyOf:
          - $ref: '#/components/schemas/Scheduling'
          - type: 'null'
        negotiation:
          anyOf:
          - $ref: '#/components/schemas/Negotiation'
          - type: 'null'
      additionalProperties: false
      type: object
      required:
      - id
      - type
      - order_type
      title: CallStep
      description: 'CREATE an order and wait for its result.


        The step does not dial by itself. It creates an ordinary call order that

        runs the full Model A lifecycle and emits the same events as one you

        submitted directly - which is why Model B has no second dial path and no

        second result derivation.'
    CancelRequest:
      properties:
        reason:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Reason
      additionalProperties: false
      type: object
      title: CancelRequest
    Claim:
      properties:
        outstanding:
          $ref: '#/components/schemas/Money'
        original:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
        breakdown:
          anyOf:
          - $ref: '#/components/schemas/ClaimBreakdown'
          - type: 'null'
        creditor_name:
          type: string
          maxLength: 200
          minLength: 2
          title: Creditor Name
          description: The CREDITOR on whose behalf you are collecting - not your own name. Named to the
            debtor on first contact and whenever asked.
          examples:
          - Truman Textilien GmbH
        basis:
          $ref: '#/components/schemas/ClaimBasis'
        titled:
          type: boolean
          title: Titled
          description: True when the claim carries an enforcement title (Mahnbescheid, Vollstreckungsbescheid,
            judgment). It changes what the agent may say about consequences and it extends the limitation
            period, so it is NEVER inferred.
          default: false
        title_reference:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Title Reference
        disclosure:
          anyOf:
          - $ref: '#/components/schemas/ClaimDisclosure'
          - type: 'null'
        reference:
          anyOf:
          - $ref: '#/components/schemas/ClaimReference'
          - type: 'null'
        due_date:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Due Date
        in_default_since:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: In Default Since
          description: Date the debtor fell into default.
        description:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Description
      additionalProperties: false
      type: object
      required:
      - outstanding
      - creditor_name
      - basis
      title: Claim
    ClaimBasis:
      properties:
        kind:
          type: string
          title: Kind
          x-extensible-enum:
          - contract
          - invoice
          - loan
          - rent
          - subscription
          - damages
          - other
        description:
          anyOf:
          - type: string
            maxLength: 300
          - type: 'null'
          title: Description
          description: One sentence a debtor will recognise.
          examples:
          - Jahresabo Textilpflege Premium, abgeschlossen am 12.06.2025
        concluded_on:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Concluded On
      additionalProperties: false
      type: object
      required:
      - kind
      title: ClaimBasis
      description: Where the claim comes from - the answer to "what is this about?".
    ClaimBreakdown:
      properties:
        principal:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
          description: Principal
        interest:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
          description: Interest
        dunning_fees:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
          description: Dunning fees
        collection_fees:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
          description: Collection fees
        expenses:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
          description: Expenses
        already_paid:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
          description: Already paid
      additionalProperties: false
      type: object
      title: ClaimBreakdown
      description: Itemisation of the claim.
    ClaimDisclosure:
      properties:
        sent_at:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Sent At
        reference:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Reference
      additionalProperties: false
      type: object
      title: ClaimDisclosure
      description: 'The written statutory notice you have already sent.


        It lets the agent REFER to that notice instead of improvising the

        disclosure. Whether your calls must carry the disclosure as well is your

        determination - this field is the record that you have provided it.'
    ClaimReference:
      properties:
        contract_number:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Contract Number
        invoice_number:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Invoice Number
        invoice_date:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Invoice Date
        case_number:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Case Number
          description: Your case reference, if you keep one.
      additionalProperties: false
      type: object
      title: ClaimReference
    ComplianceBlock:
      properties:
        ai_disclosure:
          anyOf:
          - $ref: '#/components/schemas/AiDisclosure'
          - type: 'null'
          description: Evidence that the agent identified itself as AI. Platform behaviour and not switchable
            - this is your per-call record of it.
        recording:
          anyOf:
          - $ref: '#/components/schemas/RecordingState'
          - type: 'null'
        statutory_disclosure:
          anyOf:
          - $ref: '#/components/schemas/StatutoryDisclosure'
          - type: 'null'
        contact_window_policy:
          anyOf:
          - type: string
          - type: 'null'
          title: Contact Window Policy
          description: Which calling-window rule set was applied.
          examples:
          - de_uwg7_default
      type: object
      title: ComplianceBlock
    ConsentRecord:
      properties:
        granted:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Granted
        at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: At
        method:
          anyOf:
          - type: string
          - type: 'null'
          title: Method
          x-extensible-enum:
          - verbal_in_call
      type: object
      title: ConsentRecord
    ContactChannel:
      properties:
        channel:
          type: string
          title: Channel
          description: v1 dials `phone` entries only; anything else is context for the agent ('we emailed
            you the link').
          examples:
          - phone
          x-extensible-enum:
          - phone
          - email
        value:
          type: string
          maxLength: 320
          minLength: 3
          title: Value
        type:
          anyOf:
          - type: string
          - type: 'null'
          title: Type
          x-extensible-enum:
          - mobile
          - landline
          - work
          - other
        priority:
          anyOf:
          - type: integer
            minimum: 1.0
          - type: 'null'
          title: Priority
          description: 1 is dialled first. Mobile first is a sensible tenant default.
      additionalProperties: false
      type: object
      required:
      - channel
      - value
      title: ContactChannel
    ConversationOutcome:
      properties:
        type:
          type: string
          title: Type
          x-extensible-enum:
          - payment_promise
          - payment_claimed
          - installment_plan_requested
          - dispute_raised
          - callback_requested
          - contact_update
          - do_not_call_requested
          - escalation_to_human
          - hardship_reported
          - information_provided
          - recording_objection
          - debtor_deceased
          - address_invalid
          - insolvency_reported
          - claim_already_settled
        data:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Data
      type: object
      required:
      - type
      title: ConversationOutcome
      description: One structured outcome. A client MUST ignore types it does not know.
    DeliveryAttempt:
      properties:
        at:
          type: string
          format: date-time
          title: At
        response_status:
          anyOf:
          - type: integer
          - type: 'null'
          title: Response Status
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        duration_ms:
          anyOf:
          - type: integer
          - type: 'null'
          title: Duration Ms
      type: object
      required:
      - at
      title: DeliveryAttempt
    DeliveryPrefs:
      properties:
        webhook_endpoint_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Webhook Endpoint Ids
          description: null = every endpoint subscribed to the event type.
        transcript:
          type: string
          enum:
          - none
          - summary_only
          - structured
          title: Transcript
          description: Capped by your tenant retention rule - `structured` never delivers more than the
            tenant is allowed to retain.
          default: structured
        include_recording_reference:
          type: boolean
          title: Include Recording Reference
          default: false
      additionalProperties: false
      type: object
      title: DeliveryPrefs
    EndpointHealth:
      properties:
        consecutive_failures:
          type: integer
          minimum: 0.0
          title: Consecutive Failures
          default: 0
        last_success_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Success At
        last_failure_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Failure At
      type: object
      title: EndpointHealth
    Enrollment:
      properties:
        id:
          type: string
          title: Id
          examples:
          - enr_01J40H7S
        sequence_id:
          type: string
          title: Sequence Id
        sequence_key:
          type: string
          title: Sequence Key
        sequence_version:
          type: integer
          minimum: 1.0
          title: Sequence Version
          description: Pinned at enrollment; never changes. Activating a new version leaves running enrollments
            untouched.
        status:
          type: string
          enum:
          - active
          - paused
          - completed
          - exited
          - canceled
          - failed
          title: Status
        exit_reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Exit Reason
          description: Machine-readable, e.g. `goal_met:payment.received`, `suppressed`, `client_cancel`,
            `superseded`. Kept separate from `status` so a typed client can branch on one and log the
            other.
        subject_reference:
          type: string
          title: Subject Reference
        triggered_by_signal_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Triggered By Signal Id
        current_step_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Current Step Id
        next_action_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Next Action At
          description: When the runner will next touch this enrollment. Null while nothing is scheduled.
        call_order_ids:
          items:
            type: string
          type: array
          title: Call Order Ids
          description: The orders this ladder created - oldest first. Retrievable via `GET /v1/call-orders?enrollment_id=…`.
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
            description: Your own opaque key-value pairs; mirrored on resources and in every event. CONTRACTUALLY
              free of personal data - Pace does not inspect the values. Whatever you put here falls outside
              the deletion and retention machinery that protects the rest of the order.
            examples:
            - campaign: q3-onboarding
              cost_center: '77'
          - type: 'null'
          title: Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
        ended_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Ended At
      type: object
      required:
      - id
      - sequence_id
      - sequence_key
      - sequence_version
      - status
      - subject_reference
      - created_at
      title: Enrollment
    Event:
      properties:
        id:
          type: string
          title: Id
          description: The deduplication key. Stable across retries AND replays.
        type:
          type: string
          title: Type
          x-extensible-enum:
          - call_order.accepted
          - call_order.scheduled
          - call_order.in_progress
          - call_order.completed
          - call_order.canceled
          - call_order.expired
          - call_order.failed
          - call.started
          - call.ended
          - enrollment.created
          - enrollment.step_advanced
          - enrollment.paused
          - enrollment.resumed
          - enrollment.completed
          - enrollment.exited
          - enrollment.canceled
          - enrollment.failed
          - suppression.created
          - webhook_endpoint.verification
          - webhook_endpoint.verification_failed
          - webhook_endpoint.disabled
          - ping
        occurred_at:
          type: string
          format: date-time
          title: Occurred At
        api_version:
          type: string
          title: Api Version
          default: v1
        environment:
          type: string
          enum:
          - live
          - sandbox
          title: Environment
          description: Check against your own tenant environment BEFORE processing - never mix the two
            streams.
        sequence:
          anyOf:
          - type: integer
          - type: 'null'
          title: Sequence
          description: 'Gapless and 1-based PER AGGREGATE (one counter per call_order, one per enrollment).
            Null wherever there is no aggregate: `ping`, the `webhook_endpoint.*` class and `suppression.created`.
            Use it only to discard stale state snapshots - NOT to deduplicate (that is `id`) and not to
            detect loss.'
        related:
          $ref: '#/components/schemas/EventRelated'
        data:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Data
          description: 'The full resource. Under `payload_mode: thin` the key is ABSENT entirely - test
            with `"data" in event`, never against an empty object.'
      type: object
      required:
      - id
      - type
      - occurred_at
      - environment
      - related
      title: Event
      description: One envelope for both routes - webhook delivery and the feed.
    EventRelated:
      properties:
        call_order_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Call Order Id
        call_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Call Id
        enrollment_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Enrollment Id
        signal_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Signal Id
        client_reference:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Reference
        subject_reference:
          anyOf:
          - type: string
          - type: 'null'
          title: Subject Reference
      type: object
      title: EventRelated
    ExitCondition:
      properties:
        type:
          type: string
          title: Type
          examples:
          - signal
          x-extensible-enum:
          - signal
          - suppression
        signal_type:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Signal Type
      additionalProperties: false
      type: object
      required:
      - type
      title: ExitCondition
      description: 'When a ladder is broken off.


        `suppression` is always implicitly present - a do-not-call entry stops

        every sequence whether or not it is listed here. You may still write it

        out, for clarity.'
    ExitStep:
      properties:
        id:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Id
          description: A stable step identifier, unique within a sequence version.
          examples:
          - wait_settle
        type:
          type: string
          const: exit
          title: Type
        reason:
          type: string
          maxLength: 64
          title: Reason
          description: Recorded verbatim as the enrollment's `exit_reason`.
          default: ladder_exhausted
      additionalProperties: false
      type: object
      required:
      - id
      - type
      title: ExitStep
    FieldError:
      properties:
        pointer:
          type: string
          title: Pointer
          description: RFC 6901 pointer to the offending field in the request body. Errors outside the
            body carry their source as the first segment (e.g. /query/limit).
        code:
          type: string
          title: Code
          description: Stable field error code (open registry).
        message:
          anyOf:
          - type: string
          - type: 'null'
          title: Message
          description: Human-readable; not stable, never parse it.
      type: object
      required:
      - pointer
      - code
      title: FieldError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HistoryEntry:
      properties:
        channel:
          type: string
          title: Channel
          x-extensible-enum:
          - call
          - email
          - sms
          - letter
          - whatsapp
          - other
        direction:
          type: string
          enum:
          - outbound
          - inbound
          title: Direction
        occurred_at:
          type: string
          format: date-time
          title: Occurred At
        kind:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Kind
          description: Your own free taxonomy (payment_reminder, dunning_notice, ...).
        outcome:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Outcome
        summary:
          anyOf:
          - type: string
            maxLength: 1000
          - type: 'null'
          title: Summary
        reference:
          anyOf:
          - type: string
            maxLength: 128
          - type: 'null'
          title: Reference
      additionalProperties: false
      type: object
      required:
      - channel
      - direction
      - occurred_at
      title: HistoryEntry
      description: 'An earlier touch, on ANY channel.


        The asymmetry with `contacts` is deliberate: `sms`, `letter` and `whatsapp`

        are allowed here because they record what YOU have already done. `contacts`

        does not know them, because Pace only makes calls. The agent uses the

        history for tone and continuity ("we have already written to you twice").'
    Identity:
      properties:
        verified:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Verified
        method:
          anyOf:
          - type: string
          - type: 'null'
          title: Method
          x-extensible-enum:
          - date_of_birth
          - name_address
          - address_birthday
          - none
        attempts:
          anyOf:
          - type: integer
          - type: 'null'
          title: Attempts
      type: object
      title: Identity
    InstallmentPolicy:
      properties:
        allowed:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Allowed
        max_count:
          anyOf:
          - type: integer
            maximum: 24.0
            minimum: 2.0
          - type: 'null'
          title: Max Count
        min_installment:
          anyOf:
          - $ref: '#/components/schemas/Money'
          - type: 'null'
        conclusion_mode:
          type: string
          const: record_wish_only
          title: Conclusion Mode
          description: The agent RECORDS THE WISH. It concludes nothing - the binding agreement is one
            you make afterwards, in writing. There is deliberately no second value.
          default: record_wish_only
      additionalProperties: false
      type: object
      title: InstallmentPolicy
    LocalCallTime:
      properties:
        days:
          items:
            type: string
            enum:
            - mon
            - tue
            - wed
            - thu
            - fri
            - sat
            - sun
          type: array
          maxItems: 7
          minItems: 1
          title: Days
        from:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          title: From
          description: Lokale Wanduhrzeit, 24 h, fuehrende Null.
          examples:
          - 09:00
        to:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          title: To
          description: Lokale Wanduhrzeit, 24 h, fuehrende Null.
          examples:
          - 09:00
      additionalProperties: false
      type: object
      required:
      - days
      - from
      - to
      title: LocalCallTime
      description: A window in the timezone of the person BEING CALLED, not ours.
    Money:
      properties:
        value:
          type: string
          pattern: ^-?\d+(\.\d{1,2})?$
          title: Value
          description: An exact decimal, as a string - no float drift.
          examples:
          - '129.90'
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          title: Currency
          description: ISO 4217.
          examples:
          - EUR
      additionalProperties: false
      type: object
      required:
      - value
      - currency
      title: Money
    Negotiation:
      properties:
        installments:
          anyOf:
          - $ref: '#/components/schemas/InstallmentPolicy'
          - type: 'null'
        settlement:
          anyOf:
          - $ref: '#/components/schemas/SettlementPolicy'
          - type: 'null'
        promise_to_pay:
          anyOf:
          - $ref: '#/components/schemas/PromiseToPayPolicy'
          - type: 'null'
        payment_rails:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Payment Rails
          x-extensible-enum:
          - bank_transfer
          - payment_link
      additionalProperties: false
      type: object
      title: Negotiation
      description: The decision corridor. The agent never goes beyond it.
    OrderContext:
      properties:
        claim:
          $ref: '#/components/schemas/Claim'
        history:
          items:
            $ref: '#/components/schemas/HistoryEntry'
          type: array
          maxItems: 50
          title: History
          description: Earlier touches, newest last. Capped - send what matters, not half your CRM.
        variables:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Variables
          description: Validated against the order type's `variables_schema`.
        notes:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Notes
          description: Free text, visible to the agent.
      additionalProperties: false
      type: object
      required:
      - claim
      title: OrderContext
      description: Everything the agent needs for this conversation.
    OrderType:
      properties:
        key:
          type: string
          pattern: ^[a-z][a-z0-9_]{1,63}$
          title: Key
        title:
          type: string
          maxLength: 200
          title: Title
        description:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Description
        conversation_profile:
          type: string
          maxLength: 64
          title: Conversation Profile
          description: Agent behaviour provided by Pace. A new profile is created during onboarding with
            Pace; the mapping is yours to manage afterwards.
        goal:
          anyOf:
          - type: string
          - type: 'null'
          title: Goal
          x-extensible-enum:
          - payment_commitment
          - payment_arrangement
          - claim_clarification
          - information
          - verification
          - relationship
        required_context:
          items:
            type: string
          type: array
          title: Required Context
        optional_context:
          items:
            type: string
          type: array
          title: Optional Context
        defaults:
          anyOf:
          - $ref: '#/components/schemas/OrderTypeDefaults'
          - type: 'null'
        variables_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Variables Schema
          description: JSON Schema for `context.variables`.
        version:
          type: integer
          minimum: 1.0
          title: Version
        status:
          type: string
          title: Status
          x-extensible-enum:
          - draft
          - active
          - archived
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
      type: object
      required:
      - key
      - title
      - conversation_profile
      - version
      - status
      - created_at
      title: OrderType
      description: 'An order type - data, not code.


        `conversation_profile` binds the order type to agent behaviour vetted by

        Pace. That binding is what makes the promise of no marketing calls over

        this API enforceable rather than merely written down: a tenant cannot

        reference a profile Pace has not created.'
    OrderTypeCreate:
      properties:
        key:
          type: string
          pattern: ^[a-z][a-z0-9_]{1,63}$
          title: Key
          examples:
          - zahlungserinnerung
        title:
          type: string
          maxLength: 200
          title: Title
        description:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Description
        conversation_profile:
          type: string
          maxLength: 64
          minLength: 1
          title: Conversation Profile
          description: Agent behaviour provided by Pace. Only values from the list configured for your
            tenant - another tenant's profile would speak that tenant's name aloud.
        goal:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Goal
          x-extensible-enum:
          - payment_commitment
          - payment_arrangement
          - claim_clarification
          - information
          - verification
          - relationship
        required_context:
          items:
            type: string
          type: array
          maxItems: 20
          title: Required Context
        optional_context:
          items:
            type: string
          type: array
          maxItems: 20
          title: Optional Context
        defaults:
          anyOf:
          - $ref: '#/components/schemas/OrderTypeDefaultsInput'
          - type: 'null'
        variables_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Variables Schema
          description: JSON Schema for `context.variables`.
      additionalProperties: false
      type: object
      required:
      - key
      - title
      - conversation_profile
      title: OrderTypeCreate
    OrderTypeDefaults:
      properties:
        scheduling:
          anyOf:
          - $ref: '#/components/schemas/Scheduling'
          - type: 'null'
        negotiation:
          anyOf:
          - $ref: '#/components/schemas/Negotiation'
          - type: 'null'
        locale:
          anyOf:
          - type: string
          - type: 'null'
          title: Locale
      type: object
      title: OrderTypeDefaults
    OrderTypeDefaultsInput:
      properties:
        scheduling:
          anyOf:
          - $ref: '#/components/schemas/Scheduling'
          - type: 'null'
        negotiation:
          anyOf:
          - $ref: '#/components/schemas/Negotiation'
          - type: 'null'
        locale:
          anyOf:
          - type: string
          - type: 'null'
          title: Locale
      additionalProperties: false
      type: object
      title: OrderTypeDefaultsInput
      description: 'The defaults, as a REQUEST - and therefore fail-closed.


        Unknown fields are rejected here. A typo in a request has to surface:

        otherwise you would create an order type carrying the default negotiation

        corridor and never find out. The response form of the same object is

        deliberately fail-open, so a client does not break when the response is

        extended.'
    OrderTypeUpdate:
      properties:
        title:
          anyOf:
          - type: string
            maxLength: 200
            minLength: 1
          - type: 'null'
          title: Title
        description:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Description
        conversation_profile:
          anyOf:
          - type: string
            maxLength: 64
            minLength: 1
          - type: 'null'
          title: Conversation Profile
        goal:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Goal
          x-extensible-enum:
          - payment_commitment
          - payment_arrangement
          - claim_clarification
          - information
          - verification
          - relationship
        required_context:
          anyOf:
          - items:
              type: string
            type: array
            maxItems: 20
          - type: 'null'
          title: Required Context
        optional_context:
          anyOf:
          - items:
              type: string
            type: array
            maxItems: 20
          - type: 'null'
          title: Optional Context
        defaults:
          anyOf:
          - $ref: '#/components/schemas/OrderTypeDefaultsInput'
          - type: 'null'
        variables_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Variables Schema
        status:
          anyOf:
          - type: string
            enum:
            - draft
            - active
          - type: 'null'
          title: Status
          description: '`active` publishes a draft. Archiving goes through the sub-action, not here -
            archiving is an operation with its own conflict case, not a field change.'
      additionalProperties: false
      type: object
      title: OrderTypeUpdate
      description: '`PATCH /v1/order-types/{key}` - change only the fields listed here.


        `key` is deliberately absent: it is the identifier, and orders carry it.

        Renaming it would alter the provenance of completed orders.'
    PageEnvelope:
      properties:
        data:
          items: {}
          type: array
          title: Data
          description: The rows on this page.
        has_more:
          type: boolean
          title: Has More
          description: Authoritative. Never infer it from the length of `data`.
        next_cursor:
          anyOf:
          - type: string
          - type: 'null'
          title: Next Cursor
          description: Pass as `after` for the next page. Null exactly when `has_more` is false. Opaque
            - never parse, construct or compare it.
      type: object
      required:
      - data
      - has_more
      title: PageEnvelope
      description: The one list envelope, used by every list endpoint.
    PersonName:
      properties:
        given_name:
          anyOf:
          - type: string
            maxLength: 100
          - type: 'null'
          title: Given Name
        family_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Family Name
        salutation:
          anyOf:
          - type: string
            maxLength: 30
          - type: 'null'
          title: Salutation
          description: Spoken salutation (Frau/Herr/none). Free text; the agent derives the register of
            politeness from it.
      additionalProperties: false
      type: object
      required:
      - family_name
      title: PersonName
    PostalAddress:
      properties:
        street:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          title: Street
        house_number:
          anyOf:
          - type: string
            maxLength: 20
          - type: 'null'
          title: House Number
        postal_code:
          anyOf:
          - type: string
            maxLength: 12
          - type: 'null'
          title: Postal Code
        city:
          anyOf:
          - type: string
            maxLength: 100
          - type: 'null'
          title: City
        country:
          anyOf:
          - type: string
            pattern: ^[A-Z]{2}$
          - type: 'null'
          title: Country
      additionalProperties: false
      type: object
      title: PostalAddress
    Problem:
      properties:
        type:
          type: string
          title: Type
        title:
          type: string
          title: Title
        status:
          type: integer
          title: Status
        code:
          type: string
          title: Code
        detail:
          anyOf:
          - type: string
          - type: 'null'
          title: Detail
        instance:
          anyOf:
          - type: string
          - type: 'null'
          title: Instance
        trace_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Trace Id
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/FieldError'
            type: array
          - type: 'null'
          title: Errors
      type: object
      required:
      - type
      - title
      - status
      - code
      title: Problem
    PromiseToPayPolicy:
      properties:
        allowed:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Allowed
        max_days:
          anyOf:
          - type: integer
            maximum: 90.0
            minimum: 1.0
          - type: 'null'
          title: Max Days
      additionalProperties: false
      type: object
      title: PromiseToPayPolicy
    RecordingRef:
      properties:
        available:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Available
        url:
          anyOf:
          - type: string
          - type: 'null'
          title: Url
        retention_until:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Retention Until
      type: object
      title: RecordingRef
    RecordingState:
      properties:
        mode:
          anyOf:
          - type: string
            enum:
            - disabled
            - enabled
          - type: 'null'
          title: Mode
        consent:
          anyOf:
          - $ref: '#/components/schemas/ConsentRecord'
          - type: 'null'
      type: object
      title: RecordingState
    ReplayJob:
      properties:
        id:
          type: string
          title: Id
        endpoint_id:
          type: string
          title: Endpoint Id
        event_count:
          type: integer
          minimum: 0.0
          title: Event Count
        dry_run:
          type: boolean
          title: Dry Run
        status:
          type: string
          enum:
          - accepted
          - rejected
          title: Status
          description: 'Acceptance only. Progress is NOT observable in v1: there is no GET for a replay.
            You see the effect in the delivery log, where the events reappear under their original `event.id`.'
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
      type: object
      required:
      - id
      - endpoint_id
      - event_count
      - dry_run
      - status
      title: ReplayJob
    ReplayRequest:
      properties:
        after:
          anyOf:
          - type: string
          - type: 'null'
          title: After
          description: 'Events AFTER this ID, exclusive. The reconciliation form: the last ID you processed
            successfully.'
        since:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Since
          description: Events from this instant onwards. Must not predate the retention window - that
            would silently deliver too little.
        event_types:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Event Types
        dry_run:
          type: boolean
          title: Dry Run
          description: Counts the matches and dispatches NOTHING. Run a wide range this way first.
          default: false
      additionalProperties: false
      type: object
      title: ReplayRequest
      description: 'The range MUST be bounded: exactly `after` OR `since`.


        An unbounded replay would re-dispatch the entire retained feed. That is

        refused rather than guessed at.'
    Result:
      properties:
        reachability:
          type: string
          enum:
          - reached
          - not_reached
          - voicemail_only
          - wrong_party
          - invalid_contact
          title: Reachability
        engagement:
          type: string
          enum:
          - none
          - hangup_no_interaction
          - identified_then_hangup
          - declined_conversation
          - partial_conversation
          - conversation
          title: Engagement
        identity:
          anyOf:
          - $ref: '#/components/schemas/Identity'
          - type: 'null'
        termination:
          $ref: '#/components/schemas/Termination'
        summary_code:
          type: string
          title: Summary Code
          description: The canonical summary - one value to branch on.
          x-extensible-enum:
          - payment_promised
          - payment_claimed
          - payment_link_sent
          - installment_plan_requested
          - unable_to_pay
          - refused
          - dispute
          - callback
          - escalated
          - info_provided
          - no_answer
          - wrong_number
          - not_debtor
          - identity_failed
          - abusive
          - unresolved
          - other
          - canceled
          - expired
          - platform_failure
          x-registry-note: Map unknown values to `other`; the original is in summary_code_raw.
        summary_code_raw:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary Code Raw
          description: The original value, when a platform-internal value was normalised to a public one.
            For traceability; do not branch on it.
        outcomes:
          items:
            $ref: '#/components/schemas/ConversationOutcome'
          type: array
          title: Outcomes
        summary_text:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Summary Text
      type: object
      required:
      - reachability
      - engagement
      - termination
      - summary_code
      title: Result
      description: 'Present on EVERY terminal order - including those with no conversation.


        Exactly ONE place a client looks to see how an order turned out. `result`

        is absent only while the order is still running.'
    RetryPolicy:
      properties:
        min_gap_hours:
          type: number
          minimum: 1.0
          title: Min Gap Hours
          description: Minimum gap between two attempts against the same person.
          default: 24
        randomize_within_window:
          type: boolean
          title: Randomize Within Window
          description: Scatters the redial instant within the permitted window, so the same person is
            not called at the same minute every day.
          default: true
        retry_on:
          items:
            type: string
          type: array
          title: Retry On
          description: Only unreached attempts can trigger a retry. A conversation that actually took
            place is never a reason to call again.
          x-extensible-enum:
          - no_answer
          - busy
          - voicemail
      additionalProperties: false
      type: object
      title: RetryPolicy
    Scheduling:
      properties:
        window:
          anyOf:
          - $ref: '#/components/schemas/SchedulingWindow'
          - type: 'null'
        local_call_times:
          anyOf:
          - items:
              $ref: '#/components/schemas/LocalCallTime'
            type: array
            maxItems: 7
          - type: 'null'
          title: Local Call Times
          description: An optional NARROWING within the statutory windows.
        max_attempts:
          type: integer
          maximum: 10.0
          minimum: 1.0
          title: Max Attempts
          default: 3
        retry:
          anyOf:
          - $ref: '#/components/schemas/RetryPolicy'
          - type: 'null'
        on_window_violation:
          type: string
          enum:
          - defer
          - reject
          title: On Window Violation
          description: 'What happens when your window and the permitted window do not intersect: `defer`
            moves the order into the permitted window (and the order may end up `expired`), `reject` refuses
            acceptance with a 422.'
          default: defer
      additionalProperties: false
      type: object
      title: Scheduling
    SchedulingWindow:
      properties:
        not_before:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Not Before
        not_after:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Not After
      additionalProperties: false
      type: object
      title: SchedulingWindow
    Sequence:
      properties:
        id:
          type: string
          title: Id
          examples:
          - seq_01J40G4Q
        key:
          type: string
          title: Key
        title:
          type: string
          title: Title
        status:
          type: string
          enum:
          - draft
          - active
          - archived
          title: Status
        active_version:
          anyOf:
          - type: integer
          - type: 'null'
          title: Active Version
          description: The version new enrollments pin themselves to. Null until one has been activated.
        versions:
          items:
            $ref: '#/components/schemas/SequenceVersion'
          type: array
          minItems: 1
          title: Versions
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
      type: object
      required:
      - id
      - key
      - title
      - status
      - versions
      - created_at
      title: Sequence
    SequenceCreate:
      properties:
        trigger:
          $ref: '#/components/schemas/SequenceTrigger'
        exit_conditions:
          items:
            $ref: '#/components/schemas/ExitCondition'
          type: array
          maxItems: 10
          title: Exit Conditions
        steps:
          items:
            oneOf:
            - $ref: '#/components/schemas/WaitStep'
            - $ref: '#/components/schemas/CallStep'
            - $ref: '#/components/schemas/ExitStep'
            discriminator:
              propertyName: type
              mapping:
                call: '#/components/schemas/CallStep'
                exit: '#/components/schemas/ExitStep'
                wait: '#/components/schemas/WaitStep'
          type: array
          maxItems: 20
          minItems: 1
          title: Steps
        key:
          type: string
          pattern: ^[a-z][a-z0-9_]{1,63}$
          title: Key
          examples:
          - standard_mahnstrecke
        title:
          type: string
          maxLength: 200
          minLength: 1
          title: Title
      additionalProperties: false
      type: object
      required:
      - trigger
      - steps
      - key
      - title
      title: SequenceCreate
    SequenceTrigger:
      properties:
        signal_type:
          type: string
          maxLength: 64
          minLength: 3
          pattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
          title: Signal Type
          description: 'Your own taxonomy (dot.case). Three types the platform interprets itself, and
            each stops a sequence: `payment.received`, `claim.withdrawn`, `claim.disputed`.'
          examples:
          - payment.received
        enrollment_policy:
          type: string
          enum:
          - one_active_per_subject
          - replace_active
          title: Enrollment Policy
          description: 'There is deliberately NO `allow_parallel`: running two ladders against the same
            person at once only raises contact pressure, and that is the one thing this field must not
            be there for.'
          default: one_active_per_subject
      additionalProperties: false
      type: object
      required:
      - signal_type
      title: SequenceTrigger
    SequenceVersion:
      properties:
        trigger:
          $ref: '#/components/schemas/SequenceTrigger'
        exit_conditions:
          items:
            $ref: '#/components/schemas/ExitCondition'
          type: array
          title: Exit Conditions
        steps:
          items:
            oneOf:
            - $ref: '#/components/schemas/WaitStep'
            - $ref: '#/components/schemas/CallStep'
            - $ref: '#/components/schemas/ExitStep'
            discriminator:
              propertyName: type
              mapping:
                call: '#/components/schemas/CallStep'
                exit: '#/components/schemas/ExitStep'
                wait: '#/components/schemas/WaitStep'
          type: array
          title: Steps
        version:
          type: integer
          minimum: 1.0
          title: Version
        status:
          type: string
          enum:
          - draft
          - active
          - archived
          title: Status
          description: Only a `draft` can be activated, and an `active` version is immutable. At most
            one is active.
        created_at:
          type: string
          format: date-time
          title: Created At
        activated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Activated At
      type: object
      required:
      - trigger
      - steps
      - version
      - status
      - created_at
      title: SequenceVersion
    SequenceVersionCreate:
      properties:
        trigger:
          $ref: '#/components/schemas/SequenceTrigger'
        exit_conditions:
          items:
            $ref: '#/components/schemas/ExitCondition'
          type: array
          maxItems: 10
          title: Exit Conditions
        steps:
          items:
            oneOf:
            - $ref: '#/components/schemas/WaitStep'
            - $ref: '#/components/schemas/CallStep'
            - $ref: '#/components/schemas/ExitStep'
            discriminator:
              propertyName: type
              mapping:
                call: '#/components/schemas/CallStep'
                exit: '#/components/schemas/ExitStep'
                wait: '#/components/schemas/WaitStep'
          type: array
          maxItems: 20
          minItems: 1
          title: Steps
      additionalProperties: false
      type: object
      required:
      - trigger
      - steps
      title: SequenceVersionCreate
    SettlementPolicy:
      properties:
        allowed:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Allowed
        min_ratio:
          anyOf:
          - type: number
            maximum: 1.0
            minimum: 0.0
          - type: 'null'
          title: Min Ratio
          description: Lower bound, as a fraction of `claim.outstanding`, that the agent may RECORD as
            a proposal. 0.6 means it may note a 60 per cent offer and nothing lower.
        conclusion_mode:
          type: string
          const: record_wish_only
          title: Conclusion Mode
          default: record_wish_only
      additionalProperties: false
      type: object
      title: SettlementPolicy
    Signal:
      properties:
        signal_type:
          type: string
          title: Signal Type
        subject_reference:
          type: string
          title: Subject Reference
        dedupe_key:
          type: string
          title: Dedupe Key
        occurred_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Occurred At
        subject:
          anyOf:
          - $ref: '#/components/schemas/Subject'
          - type: 'null'
        contacts:
          anyOf:
          - items:
              $ref: '#/components/schemas/ContactChannel'
            type: array
          - type: 'null'
          title: Contacts
        context:
          anyOf:
          - $ref: '#/components/schemas/OrderContext'
          - type: 'null'
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
            description: Your own opaque key-value pairs; mirrored on resources and in every event. CONTRACTUALLY
              free of personal data - Pace does not inspect the values. Whatever you put here falls outside
              the deletion and retention machinery that protects the rest of the order.
            examples:
            - campaign: q3-onboarding
              cost_center: '77'
          - type: 'null'
          title: Metadata
        id:
          type: string
          title: Id
          examples:
          - sig_01J40FQ2ZK
        received_at:
          type: string
          format: date-time
          title: Received At
        duplicate:
          type: boolean
          title: Duplicate
          description: true when `dedupe_key` matched an earlier signal. This is then the ORIGINAL signal
            - the repeat triggered nothing again.
          default: false
        triggered:
          items:
            $ref: '#/components/schemas/SignalTriggered'
          type: array
          title: Triggered
          description: Enrollments this signal created, and exit conditions it satisfied.
      type: object
      required:
      - signal_type
      - subject_reference
      - dedupe_key
      - id
      - received_at
      title: Signal
    SignalCreate:
      properties:
        signal_type:
          type: string
          maxLength: 64
          minLength: 3
          pattern: ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$
          title: Signal Type
          description: 'Your own taxonomy (dot.case). Three types the platform interprets itself, and
            each stops a sequence: `payment.received`, `claim.withdrawn`, `claim.disputed`.'
          examples:
          - payment.received
        subject_reference:
          type: string
          maxLength: 128
          minLength: 1
          title: Subject Reference
          description: The same person key as `subject.reference` on an order. It is how the signal finds
            the sequence.
          examples:
          - CUST-88213
        dedupe_key:
          type: string
          maxLength: 255
          minLength: 1
          title: Dedupe Key
          description: 'A business key, not a technical one. A repeat returns the ORIGINAL signal with
            `duplicate: true` and triggers nothing again. Scoped to (tenant, signal_type), retained 90
            days - longer than the `Idempotency-Key` header, which is why THIS value is what makes an
            at-least-once producer safe.'
          examples:
          - payment.received:INV-2026-118442
        occurred_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Occurred At
          description: When the fact occurred, if that is not now. Orders this signal against others;
            without it, the time of receipt applies.
        subject:
          anyOf:
          - $ref: '#/components/schemas/Subject'
          - type: 'null'
        contacts:
          anyOf:
          - items:
              $ref: '#/components/schemas/ContactChannel'
            type: array
            maxItems: 10
          - type: 'null'
          title: Contacts
        context:
          anyOf:
          - $ref: '#/components/schemas/OrderContext'
          - type: 'null'
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
            description: Your own opaque key-value pairs; mirrored on resources and in every event. CONTRACTUALLY
              free of personal data - Pace does not inspect the values. Whatever you put here falls outside
              the deletion and retention machinery that protects the rest of the order.
            examples:
            - campaign: q3-onboarding
              cost_center: '77'
          - type: 'null'
          title: Metadata
      additionalProperties: false
      type: object
      required:
      - signal_type
      - subject_reference
      - dedupe_key
      title: SignalCreate
    SignalTriggered:
      properties:
        enrollment_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Enrollment Id
        effect:
          anyOf:
          - type: string
          - type: 'null'
          title: Effect
          x-extensible-enum:
          - enrollment_created
          - exit_condition_met
          - step_condition_met
          - none
      type: object
      title: SignalTriggered
      description: 'What this signal set in motion.


        While sequence execution is not yet enabled the list is ALWAYS empty. That

        is not a placeholder but the state of things: with no ladders running, a

        signal can trigger nothing. It lets you wire up your producer completely

        and check deduplication against real duplicates BEFORE any of it calls

        anyone.'
    SimulateBlock:
      properties:
        outcome:
          anyOf:
          - type: string
          - type: 'null'
          title: Outcome
          description: Forces the conversation outcome of the answered attempt. It then goes through the
            SAME normalisation as a real one (`summary_code`, `summary_code_raw`) - this value intervenes
            in the call, not in the result.
          examples:
          - payment_promised
        dispositions:
          anyOf:
          - items:
              type: string
              enum:
              - answered
              - no_answer
              - voicemail
              - failed
            type: array
            maxItems: 10
            minItems: 1
          - type: 'null'
          title: Dispositions
          description: 'One per dial attempt, in this order. If the list is shorter than the number of
            attempts, the last entry REPEATS - otherwise a single-element list would carry no sensible
            meaning. `busy` is absent on purpose: the platform maps a busy signal to `no_answer` today,
            and a sandbox that delivered `busy` would promise a value production never produces.'
          examples:
          - - no_answer
            - no_answer
            - answered
        delay_seconds:
          anyOf:
          - type: integer
            maximum: 600.0
            minimum: 0.0
          - type: 'null'
          title: Delay Seconds
          description: Artificial delay before the attempt has a result. Capped at 600 s, because the
            platform declares an attempt stuck after 30 minutes - a longer delay would deliver a platform
            error instead of the behaviour you ordered.
      additionalProperties: false
      type: object
      title: SimulateBlock
      description: 'SANDBOX ONLY.


        Three capabilities: forced outcomes, per-attempt dispositions and

        artificial delays. The block is typed rather than free-form on purpose -

        untyped, a typo such as `dispostions` would surface as a call that behaves

        wrongly instead of a 422 at submission, and in an environment that exists

        solely for trying things out that is the wrong direction.


        Sent to the LIVE host, a `simulate` block returns 403

        `simulate_not_allowed` - never a silent ignore. Otherwise you would believe

        you were testing while a real person was being called.'
    StatutoryDisclosure:
      properties:
        creditor_named:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Creditor Named
        claim_basis_given:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Claim Basis Given
        cost_basis_given:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Cost Basis Given
        references_prior_letter:
          anyOf:
          - type: boolean
          - type: 'null'
          title: References Prior Letter
        at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: At
      type: object
      title: StatutoryDisclosure
      description: 'What was actually said to the debtor in THIS call.


        Kept per call, not per order: the fields mirror the conversation, not the

        rulebook. An order nobody answered has nothing to report here - and should

        report nothing.'
    Subject:
      properties:
        reference:
          type: string
          maxLength: 128
          minLength: 1
          title: Reference
          description: A stable person key ON YOUR SIDE. It carries the suppression check, sequence deduplication
            and access/erasure requests - it MUST denote the same person across every order. An empty
            or reused value silently merges two people into one.
          examples:
          - CUST-88213
        name:
          $ref: '#/components/schemas/PersonName'
        date_of_birth:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Date Of Birth
        address:
          anyOf:
          - $ref: '#/components/schemas/PostalAddress'
          - type: 'null'
        locale:
          anyOf:
          - type: string
            pattern: ^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$
          - type: 'null'
          title: Locale
          description: Conversation language (BCP-47). Defaults from your tenant configuration.
          examples:
          - de-DE
        timezone:
          anyOf:
          - type: string
          - type: 'null'
          title: Timezone
          description: IANA zone for the local calling windows. Defaults from country, or from the tenant.
          examples:
          - Europe/Berlin
      additionalProperties: false
      type: object
      required:
      - reference
      - name
      title: Subject
    Suppression:
      properties:
        id:
          type: string
          title: Id
          examples:
          - sup_01J40M3V
        phone:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone
        subject_reference:
          anyOf:
          - type: string
          - type: 'null'
          title: Subject Reference
        scope:
          type: string
          title: Scope
          x-extensible-enum:
          - voice
        reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Reason
          x-extensible-enum:
          - subject_request
          - client_policy
          - legal_hold
          - other
        note:
          anyOf:
          - type: string
          - type: 'null'
          title: Note
        source:
          type: string
          title: Source
          description: Where the entry came from. `in_call_request` means the person objected during a
            call - that entry canNOT be deleted over the API.
          x-extensible-enum:
          - api
          - in_call_request
          - dashboard
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - id
      - scope
      - source
      - created_at
      title: Suppression
    SuppressionCreate:
      properties:
        phone:
          anyOf:
          - type: string
            maxLength: 32
          - type: 'null'
          title: Phone
          description: E.164. Provide `phone` and/or `subject_reference`.
          examples:
          - '+493514713160'
        subject_reference:
          anyOf:
          - type: string
            maxLength: 128
            minLength: 1
          - type: 'null'
          title: Subject Reference
          description: The same person key as `subject.reference` on an order. It blocks the person even
            if they change number.
          examples:
          - CUST-88213
        scope:
          type: string
          title: Scope
          description: v1 only makes calls, so an entry blocks voice contact. An open registry, so further
            channels can be added without a break - but only `voice` is accepted today.
          default: voice
          x-extensible-enum:
          - voice
        reason:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          title: Reason
          x-extensible-enum:
          - subject_request
          - client_policy
          - legal_hold
          - other
        note:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Note
      additionalProperties: false
      type: object
      title: SuppressionCreate
    TenantFeatures:
      properties:
        recording_enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Recording Enabled
        sequences_enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Sequences Enabled
      type: object
      title: TenantFeatures
    TenantInfo:
      properties:
        tenant_id:
          type: string
          title: Tenant Id
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        environment:
          type: string
          title: Environment
          description: Check this against `event.environment` BEFORE processing a webhook - never mix
            the two streams.
          x-extensible-enum:
          - live
          - sandbox
        default_locale:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Locale
        verification_mode:
          anyOf:
          - type: string
          - type: 'null'
          title: Verification Mode
          description: 'Determines which `subject` fields are mandatory when an order is accepted. `plz`
            is the single-field mode for dial-side-only tenants: the case is already fixed by the number
            dialled, and the postcode merely confirms it.'
          x-extensible-enum:
          - birthday
          - name_address
          - address_birthday
          - plz
        calling_hours:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Calling Hours
          description: 'The windows actually in force: the statutory window intersected with your tenant
            configuration.'
        quotas:
          $ref: '#/components/schemas/TenantQuotas'
        retention:
          $ref: '#/components/schemas/TenantRetention'
        features:
          $ref: '#/components/schemas/TenantFeatures'
        webhook_egress_ips:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Webhook Egress Ips
          description: Source addresses of our dispatcher, for your allowlists. PROVISIONAL and not yet
            confirmed - ask before relying on them.
      type: object
      required:
      - tenant_id
      - environment
      - retention
      title: TenantInfo
      description: 'Your own configuration - read-only.


        Capacity limits start deliberately conservative and are raised after the

        first supervised campaign. Read them here at RUNTIME rather than hard-coding

        them in your own system.'
    TenantQuotas:
      properties:
        max_concurrent_calls:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Concurrent Calls
        max_dials_per_day:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Dials Per Day
        max_contacts_per_subject_per_day:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Contacts Per Subject Per Day
      type: object
      title: TenantQuotas
    TenantRetention:
      properties:
        transcript_mode:
          type: string
          title: Transcript Mode
          x-extensible-enum:
          - none
          - summary_only
          - structured
        transcript_retention:
          anyOf:
          - type: string
          - type: 'null'
          title: Transcript Retention
          description: How long a transcript lives after the result has been delivered. Null when `transcript_mode`
            is `none`.
        recording_retention:
          anyOf:
          - type: string
          - type: 'null'
          title: Recording Retention
        result_months:
          type: integer
          minimum: 1.0
          title: Result Months
      type: object
      required:
      - transcript_mode
      - result_months
      title: TenantRetention
    Termination:
      properties:
        actor:
          type: string
          enum:
          - subject
          - agent
          - system
          title: Actor
          description: Always `system` on orders that never reached a live counterpart - the block is
            never invented.
        reason:
          type: string
          title: Reason
          x-extensible-enum:
          - completed
          - subject_hangup
          - agent_policy
          - identity_failed
          - abusive
          - recording_objection
          - technical_error
          - max_duration
          - not_connected
          - order_canceled
          - window_expired
          - never_attempted
        detail:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Detail
          description: Free text. Not stable, never parse it.
      type: object
      required:
      - actor
      - reason
      title: Termination
    Transcript:
      properties:
        call_id:
          type: string
          title: Call Id
        locale:
          anyOf:
          - type: string
          - type: 'null'
          title: Locale
        redactions:
          items:
            type: string
          type: array
          title: Redactions
          description: 'Categories removed automatically (e.g. payment_card_number). Currently always
            empty: the platform does not redact transcript content today.'
        turns:
          items:
            $ref: '#/components/schemas/TranscriptTurn'
          type: array
          title: Turns
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
      type: object
      required:
      - call_id
      - turns
      title: Transcript
    TranscriptRef:
      properties:
        available:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Available
        url:
          anyOf:
          - type: string
          - type: 'null'
          title: Url
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
          description: From this instant the transcript endpoint answers 404. If you may need the transcript
            later for a dispute, copy it into your own case file NOW.
      type: object
      title: TranscriptRef
    TranscriptTurn:
      properties:
        seq:
          type: integer
          title: Seq
        role:
          type: string
          enum:
          - agent
          - subject
          title: Role
        started_at_ms:
          anyOf:
          - type: integer
          - type: 'null'
          title: Started At Ms
          description: Versatz ab Gespraechsannahme.
        text:
          type: string
          title: Text
      type: object
      required:
      - seq
      - role
      - text
      title: TranscriptTurn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Verification:
      properties:
        state:
          type: string
          enum:
          - pending
          - succeeded
          - failed
          - expired
          title: State
        last_attempt_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Attempt At
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
          description: Deadline for echoing the challenge back. After it the endpoint moves to `disabled`
            and a `webhook_endpoint.verification_failed` goes to the remaining active endpoints.
        failure_reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Failure Reason
          x-extensible-enum:
          - non_2xx_response
          - challenge_not_echoed
          - timeout
          - tls_error
          - dns_error
          - url_rejected
      type: object
      required:
      - state
      title: Verification
    WaitAfter:
      properties:
        min:
          anyOf:
          - type: string
            pattern: ^P(?!$)(\d+D)?(T(?=\d)(\d+H)?(\d+M)?)?$
            description: ISO-8601 duration, days/hours/minutes only (no months or years - those have no
              fixed length, and a wait window that varies by month is not a wait window).
            examples:
            - PT2H
            - P3D
            - P1DT12H
          - type: 'null'
          title: Min
        max:
          anyOf:
          - type: string
            pattern: ^P(?!$)(\d+D)?(T(?=\d)(\d+H)?(\d+M)?)?$
            description: ISO-8601 duration, days/hours/minutes only (no months or years - those have no
              fixed length, and a wait window that varies by month is not a wait window).
            examples:
            - PT2H
            - P3D
            - P1DT12H
          - type: 'null'
          title: Max
      additionalProperties: false
      type: object
      title: WaitAfter
    WaitStep:
      properties:
        id:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          title: Id
          description: A stable step identifier, unique within a sequence version.
          examples:
          - wait_settle
        type:
          type: string
          const: wait
          title: Type
        after:
          anyOf:
          - $ref: '#/components/schemas/WaitAfter'
          - type: 'null'
        until:
          anyOf:
          - $ref: '#/components/schemas/WaitUntil'
          - type: 'null'
        skip_remaining_if:
          items:
            $ref: '#/components/schemas/ExitCondition'
          type: array
          maxItems: 10
          title: Skip Remaining If
      additionalProperties: false
      type: object
      required:
      - id
      - type
      title: WaitStep
      description: 'Hold - and no longer than the calling window permits.


        The computed instant is intersected with the statutory calling window at

        EXECUTION time. The actual wake-up may therefore fall later than

        `after.max`. That is not imprecision; it is the rule that lets client

        configuration narrow the window and never widen it.'
    WaitUntil:
      properties:
        date:
          type: 'null'
          title: Date
        local_time:
          anyOf:
          - type: string
            pattern: ^([01]\d|2[0-3]):[0-5]\d$
            description: Lokale Wanduhrzeit, 24 h, fuehrende Null.
            examples:
            - 09:00
          - type: 'null'
          title: Local Time
      additionalProperties: false
      type: object
      title: WaitUntil
    WebhookDelivery:
      properties:
        id:
          type: string
          title: Id
        event_id:
          type: string
          title: Event Id
        event_type:
          type: string
          title: Event Type
        endpoint_id:
          type: string
          title: Endpoint Id
        status:
          type: string
          enum:
          - pending
          - succeeded
          - retrying
          - failed
          - skipped
          title: Status
        attempts:
          items:
            $ref: '#/components/schemas/DeliveryAttempt'
          type: array
          title: Attempts
        next_attempt_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Next Attempt At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - id
      - event_id
      - event_type
      - endpoint_id
      - status
      - created_at
      title: WebhookDelivery
    WebhookEndpoint:
      properties:
        id:
          type: string
          title: Id
        url:
          type: string
          title: Url
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        event_types:
          items:
            type: string
          type: array
          title: Event Types
        payload_mode:
          type: string
          enum:
          - full
          - thin
          title: Payload Mode
          default: full
        api_version:
          type: string
          title: Api Version
          default: v1
        status:
          type: string
          enum:
          - pending_verification
          - active
          - disabled
          title: Status
        verification:
          anyOf:
          - $ref: '#/components/schemas/Verification'
          - type: 'null'
        health:
          $ref: '#/components/schemas/EndpointHealth'
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - id
      - url
      - status
      - created_at
      title: WebhookEndpoint
    WebhookEndpointCreate:
      properties:
        url:
          type: string
          maxLength: 2048
          minLength: 12
          title: Url
          description: HTTPS, publicly resolvable, port 443 or 8443. Checked at registration AND before
            every dispatch.
          examples:
          - https://hooks.example.org/pace/v1
        description:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Description
        event_types:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Event Types
          description: Exact types, or a resource wildcard (`call_order.*`). Omit for the default subscription.
        payload_mode:
          type: string
          enum:
          - full
          - thin
          title: Payload Mode
          description: '`thin` = the envelope with `related` but WITHOUT `data`. The client fetches the
            resource over the API when it needs it.'
          default: full
        api_version:
          type: string
          const: v1
          title: Api Version
          default: v1
      additionalProperties: false
      type: object
      required:
      - url
      title: WebhookEndpointCreate
    WebhookEndpointUpdate:
      properties:
        url:
          anyOf:
          - type: string
            maxLength: 2048
            minLength: 12
          - type: 'null'
          title: Url
        description:
          anyOf:
          - type: string
            maxLength: 500
          - type: 'null'
          title: Description
        event_types:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Event Types
        payload_mode:
          anyOf:
          - type: string
            enum:
            - full
            - thin
          - type: 'null'
          title: Payload Mode
        api_version:
          anyOf:
          - type: string
            const: v1
          - type: 'null'
          title: Api Version
        status:
          anyOf:
          - type: string
            enum:
            - active
            - disabled
          - type: 'null'
          title: Status
          description: '`active` re-enables an endpoint that was disabled automatically. `pending_verification`
            is assigned by the server and cannot be set.'
      additionalProperties: false
      type: object
      title: WebhookEndpointUpdate
    WebhookEndpointWithSecret:
      properties:
        id:
          type: string
          title: Id
        url:
          type: string
          title: Url
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        event_types:
          items:
            type: string
          type: array
          title: Event Types
        payload_mode:
          type: string
          enum:
          - full
          - thin
          title: Payload Mode
          default: full
        api_version:
          type: string
          title: Api Version
          default: v1
        status:
          type: string
          enum:
          - pending_verification
          - active
          - disabled
          title: Status
        verification:
          anyOf:
          - $ref: '#/components/schemas/Verification'
          - type: 'null'
        health:
          $ref: '#/components/schemas/EndpointHealth'
        created_at:
          type: string
          format: date-time
          title: Created At
        secret:
          type: string
          title: Secret
          description: SHOWN ONCE. At creation and on every rotation - never retrievable afterwards. Store
            it now.
          examples:
          - whsec_9f2c4b7e1dREDACTED
      type: object
      required:
      - id
      - url
      - status
      - created_at
      - secret
      title: WebhookEndpointWithSecret
  securitySchemes:
    pace_oauth2:
      type: oauth2
      description: OAuth2 client credentials. The tenant is derived from the token alone - there is no
        tenant header, ever. Tokens are short-lived (30 minutes); there are no refresh tokens. Multiple
        client registrations per tenant, one per integrating system, each with its own scopes and secret.
      flows:
        clientCredentials:
          tokenUrl: https://auth.pacepayments.ai/oauth2/token
          scopes:
            orders:write: 'Submit and control work: create, modify and cancel call orders, emit signals,
              control enrollments.'
            orders:read: Read orders, calls, enrollments and signals - the metadata of what happened.
              Does NOT include conversation content.
            events:read: Poll the event feed.
            config:write: Manage order types, sequences and webhook endpoints, including secret rotation
              and replay.
            config:read: Read order types, sequences, webhook endpoints, the delivery log, the suppression
              list and your own tenant configuration.
            suppressions:write: Add or remove do-not-call entries. Deliberately separate from config:write
              - this is the highest-liability write in the API.
            transcripts:read: Read transcript artifacts (conversation content).
            recordings:read: Obtain recording URLs. Recording is switched off platform-wide.
tags:
- name: Call orders
  description: Create and track outbound call orders (Model A - direct dispatch).
- name: Calls
  description: Individual dial attempts and their artifacts (transcript, recording).
- name: Order types
  description: Tenant taxonomy of call purposes (Auftragsarten).
- name: Signals
  description: Client-emitted business facts that trigger and exit sequences (Model B input).
- name: Sequences
  description: Versioned escalation ladders (Model B templates).
- name: Enrollments
  description: One subject on one ladder - the running side of Model B.
- name: Suppressions
  description: Do-not-call entries (Sperrliste).
- name: Webhooks
  description: Endpoint registration, secrets, replay and the delivery log.
- name: Events
  description: The pollable event feed - webhook fallback and reconciliation path.
- name: Tenant
  description: Own configuration, policies and quotas.
x-state-machines:
  call_order:
    states:
    - accepted
    - scheduled
    - in_progress
    - completed
    - canceled
    - expired
    - failed
    terminal:
    - canceled
    - completed
    - expired
    - failed
    transitions:
    - from: accepted
      to: scheduled
      trigger: scheduler computed the next permissible dial instant
      guard: client window ∩ statutory window ∩ tenant hours ∩ per-subject cap ∩ capacity ≠ ∅
      emits: call_order.scheduled
    - from: accepted
      to: expired
      trigger: scheduling.window.not_after passed before any dial
      guard: no permissible instant remained in the window
      emits: call_order.expired
    - from: accepted
      to: canceled
      trigger: POST /call-orders/{order_id}/cancel
      guard: none
      emits: call_order.canceled
    - from: accepted
      to: failed
      trigger: unrecoverable platform or validation error after acceptance
      guard: none
      emits: call_order.failed
    - from: scheduled
      to: in_progress
      trigger: dial planner claimed the order and began dialing
      guard: the planned instant arrived and capacity was available
      emits: call_order.in_progress
    - from: scheduled
      to: canceled
      trigger: POST /call-orders/{order_id}/cancel
      guard: no attempt has been claimed yet
      emits: call_order.canceled
    - from: scheduled
      to: expired
      trigger: scheduling.window.not_after passed with attempts remaining
      guard: none
      emits: call_order.expired
    - from: scheduled
      to: failed
      trigger: unrecoverable platform error while scheduling
      guard: none
      emits: call_order.failed
    - from: in_progress
      to: scheduled
      trigger: attempt did not reach a live counterpart and retries remain
      guard: attempt_count < scheduling.max_attempts AND disposition ∈ retry_on
      emits: call_order.scheduled
    - from: in_progress
      to: completed
      trigger: conversation concluded, or the final permitted attempt finished
      guard: none
      emits: call_order.completed
    - from: in_progress
      to: canceled
      trigger: suppression arrived for this subject mid-flight
      guard: cancel_reason = suppressed
      emits: call_order.canceled
    - from: in_progress
      to: failed
      trigger: unrecoverable platform error during the attempt
      guard: not a business outcome - telephony/config faults only
      emits: call_order.failed
  enrollment:
    states:
    - active
    - paused
    - completed
    - exited
    - canceled
    - failed
    terminal:
    - canceled
    - completed
    - exited
    - failed
    transitions:
    - from: active
      to: paused
      trigger: POST /enrollments/{id}/pause
      guard: none
      emits: enrollment.paused
    - from: paused
      to: active
      trigger: POST /enrollments/{id}/resume
      guard: none
      emits: enrollment.resumed
    - from: active
      to: completed
      trigger: the last step finished with no exit condition met
      guard: ladder exhausted
      emits: enrollment.completed
    - from: active
      to: exited
      trigger: an exit condition or skip_remaining_if matched
      guard: exit_reason records which one
      emits: enrollment.exited
    - from: active
      to: canceled
      trigger: POST /enrollments/{id}/cancel
      guard: pending call orders are canceled with cancel_reason=enrollment_exited
      emits: enrollment.canceled
    - from: paused
      to: canceled
      trigger: POST /enrollments/{id}/cancel
      guard: none
      emits: enrollment.canceled
    - from: active
      to: failed
      trigger: the sequence engine could not advance the enrollment
      guard: problem describes the fault
      emits: enrollment.failed
    - from: paused
      to: failed
      trigger: the sequence engine could not advance the enrollment
      guard: problem describes the fault
      emits: enrollment.failed
    - from: active
      to: active
      trigger: a step finished and the next was planned
      guard: not the last step
      emits: enrollment.step_advanced
