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

# Show a resolution receipt

> Read-only billing evidence for one account-scoped resolution. Requires the exact receipt API deployment switch. Administrators receive the full receipt; when the separate restricted-view switch is on, other genuine account members receive a restricted view without credits or invoice figures. Optional ledgers are shown only to administrators when their own switch is on. A receipt is evidence for one resolution, not a guarantee that an invoice is final.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/accounts/{account_id}/billing/resolution_receipts/{resolution_ref}
openapi: 3.0.4
info:
  title: Tied API
  description: >-
    The Tied REST API. Three families of endpoint, each with its own credential:
    **Application** for everything inside an account, **Platform** for
    provisioning accounts and users, and **Client** for acting as a contact from
    your own surface.
  version: 1.1.0
  termsOfService: https://tied.com/legal
  contact:
    email: hello@tied.com
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://app.tied.com
    description: Tied cloud
security: []
tags:
  - name: Account AgentBots
    description: Account-specific Agent Bots
  - name: Agents
    description: Agent management APIs
  - name: Canned Responses
    description: Pre-defined responses for common queries
  - name: Contacts
    description: Contact management APIs
  - name: Contact Labels
    description: Manage contact labels
  - name: Conversation Assignments
    description: Manage conversation assignments
  - name: Conversation Labels
    description: Manage conversation labels
  - name: Conversations
    description: Conversation management APIs
  - name: Custom Attributes
    description: Custom fields for contacts and conversations
  - name: Custom Filters
    description: Saved filters for conversations
  - name: Inboxes
    description: Communication channels setup
  - name: Integrations
    description: Third-party integrations
  - name: Messages
    description: Message management APIs
  - name: Profile
    description: User profile APIs
  - name: Reports
    description: Analytics and reporting APIs
  - name: Teams
    description: Team management APIs
  - name: Webhooks
    description: Event notification webhooks
  - name: Automation Rule
    description: Workflow automation rules
  - name: Help Center
    description: Knowledge base management
  - name: Contacts API
    description: Public contact APIs
  - name: Conversations API
    description: Public conversation APIs
  - name: Messages API
    description: Public message APIs
  - name: CSAT Survey Page
    description: Customer satisfaction survey
  - name: Account
    description: >-
      The authenticated user's own account — read and update account settings.
      Distinct from the Platform family's **Accounts**, which provisions
      accounts across an installation.
  - name: Audit Logs
    description: Read the account's audit trail
  - name: Inbox API
    description: Public inbox lookup by channel identifier
  - name: Labels
    description: >-
      Create and manage the account's labels. Applying one to a conversation or
      contact is a separate endpoint under those resources.
  - name: Macros
    description: >-
      Saved multi-step actions an agent — or an integration — can run against
      one or more conversations.
  - name: Campaigns
    description: Ongoing website campaigns and one-off SMS and WhatsApp sends.
  - name: Contact Notes
    description: Internal notes on a contact. Never visible to the contact.
  - name: Help Center Categories
    description: Categories group a portal's articles, one tree per allowed locale.
  - name: Help Center Articles
    description: The articles a portal publishes, and their draft and archived states.
  - name: Summary Reports
    description: Per-agent, per-team, per-inbox and per-label totals for a period, as JSON.
  - name: Live Reports
    description: Right-now queue counts. No date range — these describe the present.
  - name: CSAT
    description: >-
      The satisfaction ratings contacts have submitted, and the metrics computed
      from them.
  - name: Notifications
    description: >-
      The per-user notification feed, its read and snooze state, and the
      settings that decide what lands in it.
  - name: Conversation Participants
    description: >-
      The agents watching a conversation. Participants get notified about it
      without being assigned to it.
  - name: Draft Messages
    description: >-
      The unsent reply held for a conversation. Stored in Redis, one per
      conversation.
  - name: Search
    description: >-
      One search service across conversations, contacts, messages and Help
      Center articles.
  - name: Dashboard Apps
    description: Embedded pages that appear as a tab beside a conversation.
  - name: Assignment Policies
    description: How conversations are handed out, and which inbox uses which policy.
  - name: Files
    description: Storing a file so another endpoint can attach it.
  - name: Bot Flows
    description: >-
      Scripted conversation flows, their versions, and the publish and rollback
      that move between them.
  - name: Billing
    description: >-
      Credit balance, usage, invoices, spend controls and the provider-hosted
      payment flows.
  - name: AMB Templates
    description: >-
      Saved Apple Messages primitive payloads an agent can reuse from the
      composer.
  - name: AMB Onboarding
    description: The in-flight Apple Messages for Business registration for an account.
  - name: Widget Session
    description: Starting a widget session and reading the visitor it belongs to.
  - name: Widget Conversation
    description: The visitor's conversation and its messages.
  - name: Widget Context
    description: Campaigns, agents, labels, events and uploads for a widget session.
  - name: CSAT Survey
    description: The public, unauthenticated survey a contact answers from a link.
  - name: Workspace
    description: Scheduling and cancelling deletion of the whole workspace.
  - name: Widget Integrations
    description: Provider actions available to a visitor session in its own conversation.
  - name: Orchestration Studio
    description: >-
      Administrator-only read APIs for Orchestration Studio cases and knowledge
      sources.
  - name: Topic Analytics
    description: Account Topics readiness, labeling health and usage aggregates.
  - name: Analytics V2
    description: >-
      Account-scoped metrics, anonymized benchmarks and audited conversation
      drilldown.
  - name: Knowledge proposals
    description: Administrator-only proposal review and revision decisions.
  - name: Model settings
    description: Administrator-only routing profiles and Tied-hosted catalogue.
  - name: Quality Review
    description: Current quality review queue metadata and manual work state.
paths:
  /api/v1/accounts/{account_id}/billing/resolution_receipts/{resolution_ref}:
    parameters:
      - name: account_id
        in: path
        required: true
        description: Account id established by the authenticated account membership.
        schema:
          type: integer
          format: int64
      - name: resolution_ref
        in: path
        required: true
        description: >-
          Nonempty resolution reference of at most 255 UTF-8 bytes; controller
          rejects control characters, colon, slash and backslash.
        schema:
          type: string
          minLength: 1
          maxLength: 255
          pattern: ^[^\x00-\x1F\x7F:/\\]+$
    get:
      tags:
        - Billing
      summary: Show a resolution receipt
      description: >-
        Read-only billing evidence for one account-scoped resolution. Requires
        the exact receipt API deployment switch. Administrators receive the full
        receipt; when the separate restricted-view switch is on, other genuine
        account members receive a restricted view without credits or invoice
        figures. Optional ledgers are shown only to administrators when their
        own switch is on. A receipt is evidence for one resolution, not a
        guarantee that an invoice is final.
      operationId: show_resolution_receipt
      responses:
        '200':
          description: >-
            Current receipt response; the restricted receipt omits the credits
            and ledgers properties.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resolution_receipt_response'
              examples:
                correction:
                  summary: >-
                    Actual correction response using synthetic persisted
                    fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-08-02T12:00:00Z'
                        resolution_ordinal: null
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                      class:
                        resolution_class: knowledge
                        discriminator_status: category_corrected
                      credits:
                        applied: '3.0'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                evidence-names:
                  summary: >-
                    Actual evidence-names response using synthetic persisted
                    fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: confirmed
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-10-22T15:54:45Z'
                        resolution_ordinal: 1
                      confirmation:
                        state: confirmed
                        signal_type: system_verified
                        tier: 2
                        corroborator: null
                        confirmed_at: '2026-08-03T09:00:00Z'
                        verifier: payment_captured
                        verification:
                          verifier: payment_captured
                          action_key: checkout_com.capture_payment
                          read_action_key: checkout_com.get_payment
                          evaluated_at: '2026-10-08T12:30:00Z'
                      class:
                        resolution_class: read
                        discriminator_status: no_receipt
                        discriminator: null
                      credits:
                        applied: '1.25'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                ledgers:
                  summary: Actual ledgers response using synthetic persisted fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-08-02T12:00:00Z'
                        resolution_ordinal: null
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                      class:
                        resolution_class: read
                        discriminator_status: no_action_recorded
                      credits:
                        applied: '5.25'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                    ledgers:
                      receipt_ref: synthetic-day6-receipt
                      currency: USD
                      lifecycle_state: finalized
                      fee:
                        label: Resolution fee
                        voided: false
                        fee_usd: '0.525'
                        fee_credits: '5.25'
                        credit_peg_usd: '0.1'
                        provider_feature: resolution_read
                        derived_from: credits.applied * credit_peg_usd
                        provenance: {}
                        lines:
                          - category: resolution
                            reference: synthetic-day6-receipt
                            amount_usd: '0.525'
                      llm_cost:
                        label: LLM usage, passed through at cost
                        mode: itemized_passthrough
                        basis: passthrough_at_cost
                        estimate: false
                        estimate_label: null
                        llm_cost_usd: '0.0125'
                        passthrough_credits: '0.0'
                        lines:
                          - reference: llm_usage_line:2
                            provider: openai
                            model: gpt-4o
                            dimension: input
                            token_quantity: 1000
                            rate_per_token: '0.000003'
                            rate_source: published
                            invoiced_usd: '0.0125'
                            estimate: false
                        invoice_lines:
                          - reference: llm_usage_line:2
                            provider: openai
                            model: gpt-4o
                            dimension: input
                            token_quantity: 1000
                            rate_per_token: '0.000003'
                            rate_source: published
                            invoiced_usd: '0.0125'
                            estimate: false
                no-evidence:
                  summary: >-
                    Actual no-evidence response using synthetic persisted
                    fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-10-22T15:54:41Z'
                        resolution_ordinal: 1
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                      class:
                        resolution_class: read
                        discriminator_status: no_receipt
                      credits:
                        applied: '0.0'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                restricted:
                  summary: >-
                    Actual restricted response using synthetic persisted
                    fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-10-22T15:54:43Z'
                        resolution_ordinal: 1
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                      class:
                        resolution_class: read
                        discriminator_status: no_receipt
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      dispute: null
                      details_unavailable: false
                with-credit:
                  summary: >-
                    Actual with-credit response using synthetic persisted
                    fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-10-22T15:54:42Z'
                        resolution_ordinal: 1
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                      class:
                        resolution_class: read
                        discriminator_status: no_receipt
                      credits:
                        applied: '1.25'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                evidence-names-no-verification:
                  summary: >-
                    Actual evidence-names-no-verification response using
                    synthetic persisted fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-10-22T15:54:45Z'
                        resolution_ordinal: 1
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                        verifier: null
                        verification: null
                      class:
                        resolution_class: read
                        discriminator_status: no_receipt
                        discriminator: null
                      credits:
                        applied: '0.0'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                ledgers-empty:
                  summary: >-
                    Actual ledgers-empty response using synthetic persisted
                    fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-day6-receipt
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-10-22T15:54:45Z'
                        resolution_ordinal: 1
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                      class:
                        resolution_class: read
                        discriminator_status: no_receipt
                      credits:
                        applied: '0.0'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                    ledgers: null
                populated-provenance:
                  summary: >-
                    Actual populated-provenance response using synthetic
                    persisted fixtures.
                  value:
                    schema_version: '1'
                    receipt:
                      resolution_ref: synthetic-populated-provenance
                      state: awaiting_confirmation
                      trigger:
                        kind: conversation_resolved
                        resolver_type: orch_agent
                        resolved_at: '2026-08-02T12:00:00Z'
                        resolution_ordinal: null
                      confirmation:
                        state: unconfirmed
                        signal_type: null
                        tier: null
                        corroborator: null
                        confirmed_at: null
                      class:
                        resolution_class: read
                        discriminator_status: no_action_recorded
                      credits:
                        applied: '5.25'
                        unit: credit
                        voided: false
                        relayed: false
                      excluded:
                        excluded: false
                        reasons: []
                        reasons_unavailable: false
                      billed_despite_exclusion: false
                      dispute: null
                      details_unavailable: false
                    ledgers:
                      receipt_ref: synthetic-populated-provenance
                      currency: USD
                      lifecycle_state: finalized
                      fee:
                        label: Resolution fee
                        voided: false
                        fee_usd: '0.525'
                        fee_credits: '5.25'
                        credit_peg_usd: '0.1'
                        provider_feature: resolution_read
                        derived_from: credits.applied * credit_peg_usd
                        provenance:
                          modifiers:
                            - proactive
                          disposition: settled
                          legacy_note: retained stored metadata
                          rate_source: contract
                          rate_identity:
                            table: contract_rate_items
                            version: synthetic-v7
                            effective_to: null
                            effective_from: '2026-08-01T00:00:00Z'
                          settled_credits: '5.25'
                          settled_dollars: '0.5'
                          resolution_class: read
                          settled_price_cents: 50
                        lines:
                          - category: resolution
                            reference: synthetic-populated-provenance
                            amount_usd: '0.525'
                      llm_cost:
                        label: LLM usage, passed through at cost
                        mode: itemized_passthrough
                        basis: passthrough_at_cost
                        estimate: false
                        estimate_label: null
                        llm_cost_usd: '0.0125'
                        passthrough_credits: '0.0'
                        lines:
                          - reference: llm_usage_line:3
                            provider: openai
                            model: gpt-4o
                            dimension: input
                            token_quantity: 1000
                            rate_per_token: '0.000003'
                            rate_source: published
                            invoiced_usd: '0.0125'
                            estimate: false
                        invoice_lines:
                          - reference: llm_usage_line:3
                            provider: openai
                            model: gpt-4o
                            dimension: input
                            token_quantity: 1000
                            rate_per_token: '0.000003'
                            rate_source: published
                            invoiced_usd: '0.0125'
                            estimate: false
        '400':
          description: The request supplied more than one account API credential type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/orchestration_studio_credential_conflict'
              examples:
                multiple-credentials:
                  summary: Actual inherited credential-conflict response.
                  value:
                    error:
                      code: multiple_credentials
        '401':
          description: Current response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/account_api_unauthorized'
              examples:
                nonmember:
                  summary: >-
                    Actual nonmember response using synthetic persisted
                    fixtures.
                  value:
                    error: You are not authorized to access this account
                unauthenticated:
                  summary: >-
                    Actual unauthenticated response using synthetic persisted
                    fixtures.
                  value:
                    errors:
                      - You need to sign in or sign up before continuing.
        '403':
          description: Current response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio_quality_authorization_error'
              examples:
                agent:
                  summary: Actual agent response using synthetic persisted fixtures.
                  value:
                    error: You are not authorized to do this action
                impersonation-wrong-account:
                  summary: >-
                    Actual impersonation-wrong-account response using synthetic
                    persisted fixtures.
                  value:
                    error:
                      code: impersonation_wrong_account
        '404':
          description: Current response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/studio_quality_error'
              examples:
                foreign-account:
                  summary: >-
                    Actual foreign-account response using synthetic persisted
                    fixtures.
                  value:
                    error: Resource could not be found
                not-found:
                  summary: >-
                    Actual not-found response using synthetic persisted
                    fixtures.
                  value:
                    error: Resource could not be found
        '500':
          description: Unexpected receipt read failure; retryable server refusal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/receipt_error'
              examples:
                internal-error:
                  summary: >-
                    Actual internal-error response using synthetic persisted
                    fixtures.
                  value:
                    error:
                      type: internal_error
                      message: Resolution receipt is unavailable
                      retryable: true
        '503':
          description: >-
            Correction chain exceeded the bounded read; retryable service
            refusal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/receipt_error'
              examples:
                correction-limit:
                  summary: >-
                    Actual correction-limit response using synthetic persisted
                    fixtures.
                  value:
                    error:
                      type: receipt_unavailable
                      message: Resolution receipt is unavailable
                      retryable: true
      security:
        - userApiKey: []
components:
  schemas:
    resolution_receipt_response:
      description: >-
        Full administrator receipt or restricted member receipt; the restricted
        shape omits all credit figures.
      oneOf:
        - $ref: '#/components/schemas/resolution_receipt_full_response'
        - $ref: '#/components/schemas/resolution_receipt_restricted_response'
    orchestration_studio_credential_conflict:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - multiple_credentials
              description: Conflicting credential types were supplied.
          required:
            - code
          description: The authentication error.
      required:
        - error
    account_api_unauthorized:
      description: >-
        Unauthenticated and ended-impersonation response shapes from inherited
        account API guards.
      oneOf:
        - $ref: '#/components/schemas/error_unauthenticated'
        - $ref: '#/components/schemas/studio_quality_error'
        - $ref: '#/components/schemas/impersonation_ended_error'
    studio_quality_authorization_error:
      description: Ordinary role refusal or structured inherited impersonation refusal.
      oneOf:
        - $ref: '#/components/schemas/studio_quality_error'
        - $ref: '#/components/schemas/impersonation_forbidden_error'
    studio_quality_error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message or refusal code returned by the controller.
      additionalProperties: false
    receipt_error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - message
            - retryable
          properties:
            type:
              type: string
              enum:
                - receipt_unavailable
                - internal_error
              description: Stable category for a receipt read failure.
            message:
              type: string
              enum:
                - Resolution receipt is unavailable
              description: Receipt read failure message.
            retryable:
              type: boolean
              enum:
                - true
              description: Receipt read failure may succeed on retry.
          additionalProperties: false
          description: Retryable receipt read error.
      additionalProperties: false
    resolution_receipt_full_response:
      type: object
      required:
        - schema_version
        - receipt
      additionalProperties: false
      description: Full administrator receipt with optional separate ledgers.
      properties:
        schema_version:
          type: string
          enum:
            - '1'
          description: Receipt response schema version.
        receipt:
          $ref: '#/components/schemas/resolution_receipt_full'
          description: Full evidence for the requested resolution.
        ledgers:
          oneOf:
            - $ref: '#/components/schemas/resolution_receipt_ledgers'
            - type: string
              nullable: true
              enum:
                - null
          description: >-
            Optional separate fee and language-model cost lines; null when
            enabled but no ledger row exists.
    resolution_receipt_restricted_response:
      type: object
      required:
        - schema_version
        - receipt
      properties:
        schema_version:
          type: string
          enum:
            - '1'
          description: Receipt response schema version.
        receipt:
          $ref: '#/components/schemas/resolution_receipt_restricted'
          description: Evidence for the one requested resolution.
      additionalProperties: false
    error_unauthenticated:
      type: object
      description: >-
        Returned by Devise when the `api_access_token` header is absent
        entirely, before the token check runs. Note `errors` holds plain
        strings, not objects.
      properties:
        errors:
          type: array
          items:
            type: string
          example:
            - You need to sign in or sign up before continuing.
          description: >-
            One or more messages explaining why the request was not
            authenticated.
      required:
        - errors
    impersonation_ended_error:
      type: object
      required:
        - error
      additionalProperties: false
      description: Structured 401 refusal returned for an ended impersonation session.
      properties:
        error:
          type: object
          required:
            - code
          additionalProperties: false
          description: Structured inherited impersonation refusal details.
          properties:
            code:
              type: string
              enum:
                - impersonation_ended
              description: Current impersonation refusal code.
    impersonation_forbidden_error:
      type: object
      required:
        - error
      additionalProperties: false
      description: >-
        Structured 403 refusal returned by the inherited account API
        impersonation guard.
      properties:
        error:
          type: object
          required:
            - code
          additionalProperties: false
          description: Structured inherited impersonation refusal details.
          properties:
            code:
              type: string
              enum:
                - impersonation_read_only
                - impersonation_wrong_account
                - impersonation_blocked_action
              description: Current impersonation refusal code.
    resolution_receipt_full:
      type: object
      required:
        - resolution_ref
        - state
        - trigger
        - confirmation
        - class
        - credits
        - excluded
        - billed_despite_exclusion
        - dispute
        - details_unavailable
      properties:
        resolution_ref:
          type: string
          description: Account-scoped reference for this resolution.
        state:
          type: string
          enum:
            - confirmed
            - awaiting_confirmation
            - excluded
            - voided
          description: Current receipt state or confirmation state, as applicable.
        trigger:
          $ref: '#/components/schemas/resolution_receipt_trigger'
          description: What caused this resolution to be recorded.
        confirmation:
          $ref: '#/components/schemas/resolution_receipt_confirmation'
          description: Confirmation evidence associated with the resolution.
        class:
          $ref: '#/components/schemas/resolution_receipt_class'
          description: Resolution class and its available evidence.
        credits:
          $ref: '#/components/schemas/resolution_receipt_credits'
          description: Applied credit information; withheld in the restricted view.
        excluded:
          $ref: '#/components/schemas/resolution_receipt_excluded'
          description: Exclusion state and recognized reasons.
        billed_despite_exclusion:
          type: boolean
          description: Whether credits were applied despite an exclusion.
        dispute:
          $ref: '#/components/schemas/resolution_receipt_dispute'
          description: Open dispute information, or null when no dispute exists.
        details_unavailable:
          type: boolean
          description: Whether nonessential stored receipt details were omitted.
      additionalProperties: false
    resolution_receipt_ledgers:
      type: object
      required:
        - receipt_ref
        - currency
        - lifecycle_state
        - fee
        - llm_cost
      additionalProperties: false
      properties:
        receipt_ref:
          type: string
          nullable: true
          description: Resolution receipt reference, or null when absent.
        currency:
          type: string
          nullable: true
          description: Receipt currency, or null when absent.
        lifecycle_state:
          type: string
          nullable: true
          description: Receipt lifecycle state, or null when absent.
        fee:
          type: object
          required:
            - label
            - voided
            - fee_usd
            - fee_credits
            - credit_peg_usd
            - provider_feature
            - derived_from
            - provenance
            - lines
          additionalProperties: false
          description: Fee ledger calculated from applied credits.
          properties:
            label:
              type: string
              description: Display label for the fee ledger.
            voided:
              type: boolean
              description: Whether the applied charge was voided.
            fee_usd:
              type: string
              description: Fee amount as a decimal string.
            fee_credits:
              type: string
              description: Applied credits used for the fee.
            credit_peg_usd:
              type: string
              description: Credit peg used to calculate the fee.
            provider_feature:
              type: string
              nullable: true
              description: Feature that produced the receipt.
            derived_from:
              type: string
              enum:
                - credits.applied * credit_peg_usd
              description: Formula used to derive the fee.
            provenance:
              type: object
              description: >-
                Stored settlement pricing provenance forwarded by the fee ledger
                when applied credits match the original draw. Known fields are
                typed below; historical stored metadata may contain additional
                keys.
              properties:
                resolution_class:
                  type: string
                  nullable: true
                  description: Resolution class recorded at settlement.
                modifiers:
                  type: array
                  items:
                    type: string
                  description: Pricing modifiers recorded at settlement.
                rate_source:
                  type: string
                  nullable: true
                  description: Source of the settlement rate.
                disposition:
                  type: string
                  nullable: true
                  description: Settlement disposition recorded in provenance.
                settled_price_cents:
                  type: integer
                  nullable: true
                  description: Settled price in cents when priced.
                settled_dollars:
                  type: string
                  nullable: true
                  description: Settled dollars as a decimal string when priced.
                settled_credits:
                  type: string
                  nullable: true
                  description: Settled credits as a decimal string when priced.
                flag_reason:
                  type: string
                  nullable: true
                  description: Optional pricing flag reason.
                rate_identity:
                  type: object
                  nullable: true
                  description: Rate identity values serialized as strings or null.
                  additionalProperties:
                    type: string
                    nullable: true
            lines:
              type: array
              description: Revenue line items for the applied fee.
              items:
                type: object
                required:
                  - category
                  - reference
                  - amount_usd
                additionalProperties: false
                properties:
                  category:
                    type: string
                    description: Revenue line category.
                  reference:
                    type: string
                    nullable: true
                    description: Line reference.
                  amount_usd:
                    type: string
                    description: Revenue amount in USD.
        llm_cost:
          type: object
          required:
            - label
            - mode
            - basis
            - estimate
            - estimate_label
            - llm_cost_usd
            - passthrough_credits
            - lines
            - invoice_lines
          additionalProperties: false
          description: Separate language-model usage ledger.
          properties:
            label:
              type: string
              description: Display label for the language-model cost ledger.
            mode:
              type: string
              enum:
                - itemized_passthrough
                - byok
              description: Billing mode for language-model usage.
            basis:
              type: string
              enum:
                - passthrough_at_cost
                - estimate_not_invoiced
              description: Basis for the reported usage amount.
            estimate:
              type: boolean
              description: Whether these amounts are estimates and excluded from invoices.
            estimate_label:
              type: string
              nullable: true
              description: Label explaining a BYOK estimate.
            llm_cost_usd:
              type: string
              description: Language-model cost as a decimal string.
            passthrough_credits:
              type: string
              description: Language-model passthrough credits as a decimal string.
            lines:
              type: array
              description: Itemized language-model usage lines.
              items:
                $ref: '#/components/schemas/resolution_receipt_llm_line'
            invoice_lines:
              type: array
              description: Usage lines included on invoices.
              items:
                $ref: '#/components/schemas/resolution_receipt_llm_line'
    resolution_receipt_restricted:
      type: object
      required:
        - resolution_ref
        - state
        - trigger
        - confirmation
        - class
        - excluded
        - dispute
        - details_unavailable
      properties:
        resolution_ref:
          type: string
          description: Account-scoped reference for this resolution.
        state:
          type: string
          enum:
            - confirmed
            - awaiting_confirmation
            - excluded
            - voided
          description: Current receipt state or confirmation state, as applicable.
        trigger:
          $ref: '#/components/schemas/resolution_receipt_trigger'
          description: What caused this resolution to be recorded.
        confirmation:
          $ref: '#/components/schemas/resolution_receipt_confirmation'
          description: Confirmation evidence associated with the resolution.
        class:
          $ref: '#/components/schemas/resolution_receipt_class'
          description: Resolution class and its available evidence.
        excluded:
          $ref: '#/components/schemas/resolution_receipt_excluded'
          description: Exclusion state and recognized reasons.
        dispute:
          $ref: '#/components/schemas/resolution_receipt_dispute'
          description: Open dispute information, or null when no dispute exists.
        details_unavailable:
          type: boolean
          description: Whether nonessential stored receipt details were omitted.
      additionalProperties: false
    resolution_receipt_trigger:
      type: object
      required:
        - kind
        - resolver_type
        - resolved_at
        - resolution_ordinal
      properties:
        kind:
          type: string
          enum:
            - conversation_resolved
            - null
          nullable: true
          description: Resolution signal kind.
        resolver_type:
          type: string
          enum:
            - orch_agent
            - bot_flow
            - human
            - null
          nullable: true
          description: Actor family that resolved the conversation.
        resolved_at:
          type: string
          format: date-time
          nullable: true
          description: Time the resolution was recorded.
        resolution_ordinal:
          type: integer
          minimum: 1
          nullable: true
          description: Ordinal of this resolution in the conversation.
      additionalProperties: false
    resolution_receipt_confirmation:
      type: object
      required:
        - state
        - signal_type
        - tier
        - corroborator
        - confirmed_at
      properties:
        state:
          type: string
          enum:
            - confirmed
            - unconfirmed
            - null
          nullable: true
          description: Current receipt state or confirmation state, as applicable.
        signal_type:
          type: string
          enum:
            - explicit_confirmation
            - system_verified
            - corroborated_silence
            - null
          nullable: true
          description: Confirmation signal type.
        tier:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - null
          nullable: true
          description: Pinned confirmation tier number.
        corroborator:
          type: string
          nullable: true
          description: Whitelisted source of confirmation evidence.
        confirmed_at:
          type: string
          format: date-time
          nullable: true
          description: Time confirmation was recorded.
        verifier:
          type: string
          nullable: true
          description: Whitelisted verifier identifier when available.
        verification:
          type: object
          required:
            - verifier
            - action_key
            - read_action_key
            - evaluated_at
          properties:
            verifier:
              type: string
              nullable: true
              description: Whitelisted verifier identifier when available.
            action_key:
              type: string
              nullable: true
              description: Whitelisted action identifier when available.
            read_action_key:
              type: string
              nullable: true
              description: Whitelisted read action identifier when available.
            evaluated_at:
              type: string
              format: date-time
              nullable: true
              description: Time the verification was evaluated.
          additionalProperties: false
          nullable: true
          description: Whitelisted verification summary; raw evidence is never returned.
      additionalProperties: false
    resolution_receipt_class:
      type: object
      required:
        - resolution_class
        - discriminator_status
      properties:
        resolution_class:
          type: string
          enum:
            - knowledge
            - read
            - write_simple
            - write_financial
            - orchestrated
            - compliance_gated
            - long_horizon_case
            - null
          nullable: true
          description: Pinned resolution class when available.
        discriminator_status:
          type: string
          enum:
            - derived
            - no_action_recorded
            - unresolved
            - class_mismatch
            - rules_changed
            - no_receipt
            - category_corrected
          description: Status describing whether a class discriminator could be derived.
        discriminator:
          type: object
          nullable: true
          required:
            - event_id
            - action
            - provider
          properties:
            event_id:
              type: string
              format: uuid
              nullable: true
              description: Public event identifier associated with the class evidence.
            action:
              type: string
              nullable: true
              description: Whitelisted action name associated with the class evidence.
            provider:
              type: string
              nullable: true
              description: Whitelisted provider name associated with the class evidence.
          additionalProperties: false
          description: Whitelisted class evidence, or null when unavailable.
      additionalProperties: false
    resolution_receipt_credits:
      type: object
      required:
        - applied
        - unit
        - voided
        - relayed
      properties:
        applied:
          type: string
          pattern: ^[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+)?$
          description: Applied credit amount as a decimal string.
        unit:
          type: string
          enum:
            - credit
          description: Unit for the credit amount.
        voided:
          type: boolean
          description: Whether the applied charge has been voided.
        relayed:
          type: boolean
          nullable: true
          description: >-
            Whether the billing event has reached its provider, or null when
            unknown.
        void_reason:
          type: string
          nullable: true
          description: Recorded reason for voiding, when applicable.
        credited:
          type: boolean
          description: Whether a separate credit reversed the charge.
        credit_event_ref:
          type: string
          format: uuid
          nullable: true
          description: Reference to a reversal credit, or null when not applicable.
        trigger_at:
          type: string
          format: date-time
          nullable: true
          description: Time of the event that triggered a void.
        guarantee_credit:
          $ref: '#/components/schemas/resolution_receipt_credit_line'
          description: Current guarantee credit value returned by this operation.
        guarantee_credit_applied:
          $ref: '#/components/schemas/resolution_receipt_credit_line'
          description: Current guarantee credit applied value returned by this operation.
      additionalProperties: false
    resolution_receipt_excluded:
      type: object
      required:
        - excluded
        - reasons
        - reasons_unavailable
      properties:
        excluded:
          type: boolean
          description: Exclusion state and recognized reasons.
        reasons:
          type: array
          items:
            type: string
            enum:
              - test
              - human_sent_message
              - abandoned_mid_flow
              - negative_csat
              - agent_couldnt_help
              - greeting_only
              - misuse
              - assisted_routing
              - insufficient_evidence
              - reopened_within_window
          description: Recognized exclusion reasons only.
        reasons_unavailable:
          type: boolean
          description: Whether unrecognized historical reasons were omitted.
      additionalProperties: false
    resolution_receipt_dispute:
      type: object
      nullable: true
      required:
        - status
        - opened_at
      properties:
        status:
          type: string
          enum:
            - open
            - null
          nullable: true
          description: Current dispute or guarantee-credit status.
        opened_at:
          type: string
          format: date-time
          nullable: true
          description: Time a dispute was opened.
      additionalProperties: false
    resolution_receipt_llm_line:
      type: object
      required:
        - reference
        - provider
        - model
        - dimension
        - token_quantity
        - rate_per_token
        - rate_source
        - invoiced_usd
        - estimate
      additionalProperties: false
      description: >-
        Persisted language-model usage line; BYOK lines also carry
        estimate_label.
      properties:
        reference:
          type: string
          description: Stable reference to the usage line.
        provider:
          type: string
          description: Provider recorded for this usage line.
        model:
          type: string
          description: Model recorded for this usage line.
        dimension:
          type: string
          description: Usage dimension recorded for this line.
        token_quantity:
          type: integer
          nullable: true
          description: Token quantity, or null when not recorded.
        rate_per_token:
          type: string
          nullable: true
          description: Rate per token as a decimal string, or null when absent.
        rate_source:
          type: string
          nullable: true
          description: Source recorded for the usage rate.
        invoiced_usd:
          type: string
          description: Invoiced USD amount as a decimal string; zero for BYOK estimates.
        estimate:
          type: boolean
          description: Whether this usage line is a non-invoiced BYOK estimate.
        estimate_label:
          type: string
          description: Display label for a BYOK estimate.
    resolution_receipt_credit_line:
      type: object
      required:
        - credited_at
        - description
        - amount
        - unit
        - reason
        - applied_to_next_invoice
        - status
      properties:
        credited_at:
          type: string
          format: date-time
          nullable: true
          description: Time a guarantee credit was recorded.
        description:
          type: string
          nullable: true
          description: Short display description; unavailable text is null.
        amount:
          type: string
          nullable: true
          description: Credit amount as a decimal string, or null when unavailable.
        unit:
          type: string
          enum:
            - credit
            - null
          nullable: true
          description: Unit for the credit amount.
        reason:
          type: string
          nullable: true
          description: Reason for a guarantee credit.
        applied_to_next_invoice:
          type: boolean
          nullable: true
          description: Whether the credit applies to a later invoice.
        status:
          type: string
          enum:
            - credited
            - blocked_closed_period
            - null
          nullable: true
          description: Current dispute or guarantee-credit status.
      additionalProperties: false
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        This token can be obtained by visiting the profile page or via rails
        console. Provides access to  endpoints based on the user permissions
        levels. This token can be saved by an external system when user is
        created via API, to perform activities on behalf of the user.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.