Chia Health Handoff sessions API

Opaque 15-minute browser handoffs created only after the user affirmatively accepts the catalog disclosure. Sandbox is synthetic; activated production enters Chia's real co-branded purchase journey.

GitHub OpenAPI

Operations 1

POST /v2/handoff-sessions Create a short-lived hosted Chia handoff after affirmative disclosure consent #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/chia-health:chia-health-handoff-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

chia-health-handoff-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Chia Health Handoff sessions API
  version: 2.1.0
  contact:
    name: Named Chia integration support contact in the signed onboarding receipt
  license:
    name: Proprietary API contract
  description: 'Operations tagged Handoff sessions across 2 of this provider''s published API definitions: chia-health-openapi.yaml, chia-health-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.sandbox.invalid
  description: Intentionally non-resolving sandbox contract placeholder — synthetic data only. Use the exact HTTPS origin in the signed onboarding package.
- url: https://api.production.invalid
  description: Intentionally non-resolving gated-production contract placeholder. Use the exact HTTPS origin and separate chia_live_ runtime and chia_live_finance_ finance credentials from signed onboarding. Credentials alone do not activate catalog or handoff.
security:
- bearerAuth: []
tags:
- name: Handoff sessions
  description: Opaque 15-minute browser handoffs created only after the user affirmatively accepts the catalog disclosure. Sandbox is synthetic; activated production enters Chia's real co-branded purchase journey.
paths:
  /v2/handoff-sessions:
    post:
      operationId: createHandoffSession
      tags:
      - Handoff sessions
      summary: Create a short-lived hosted Chia handoff after affirmative disclosure consent
      description: Call from the authenticated partner's confidential backend immediately after the user affirmatively accepts the exact handoff disclosure returned on the selected catalog item. The closed request accepts no partner user, account, device, contact, patient, order, state, or arbitrary metadata identifier. The opaque URL expires 15 minutes after creation and has no read/status endpoint. Sandbox opens an isolated synthetic page. Before written production activation this operation fails closed; once activated, production opens the selected co-branded Chia journey, where Chia performs identity, intake, eligibility, checkout, payment, care, support, and fulfillment.
      parameters:
      - name: Idempotency-Key
        in: header
        required: true
        description: Random UUIDv4 persisted before the first attempt and reused only for byte-identical retries. Never derive it from a user, account, device, contact, patient, or order.
        schema:
          type: string
          format: uuid
          pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
          maxLength: 36
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HandoffSessionRequest'
            examples:
              sandbox:
                value:
                  catalog_item_id: cat_01K0M6A7H9Q2N4V8X3C5B7D9F1
                  disclosure_version: hnd_01K0M6E4T1G6V8X0Z3B5D7F9H1
                  consent_attestation:
                    affirmed: true
                    affirmed_at: '2026-07-22T15:00:00Z'
              production:
                value:
                  catalog_item_id: cat_01K0M6A7H9Q2N4V8X3C5B7D9F1
                  disclosure_version: hnd_01K0M6E4T1G6V8X0Z3B5D7F9H2
                  consent_attestation:
                    affirmed: true
                    affirmed_at: '2026-07-22T15:00:00Z'
      responses:
        '201':
          description: A new handoff was created, or the exact idempotent response was replayed. It expires exactly 15 minutes after creation.
          headers:
            Chia-Request-Id:
              $ref: '#/components/headers/RequestId'
            Chia-Version:
              $ref: '#/components/headers/Version'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Cache-Control:
              $ref: '#/components/headers/NoStore'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HandoffSessionResponse'
              examples:
                sandbox:
                  value:
                    object: handoff_session
                    id: phs_01K0R7A2B3C4D5E6F7G8H9J0K1
                    url: https://a1b2c3d4.execute-api.us-east-1.amazonaws.com/sandbox/handoff/phs_01K0R7A2B3C4D5E6F7G8H9J0K1
                    expires_at: '2026-07-22T15:15:00Z'
                    livemode: false
                production:
                  value:
                    object: handoff_session
                    id: phs_5E93F6502DD8760D94B0567C62ED0652
                    url: https://api.production.invalid/production/handoff/phs_5E93F6502DD8760D94B0567C62ED0652
                    expires_at: '2026-07-22T15:15:00Z'
                    livemode: true
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/PermissionError'
        '405':
          $ref: '#/components/responses/MethodNotAllowedPost'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/InvalidRequest'
        '415':
          $ref: '#/components/responses/InvalidRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
    servers:
    - url: https://api.sandbox.invalid
      description: Intentionally non-resolving sandbox contract placeholder — synthetic data only. Use the exact HTTPS origin in the signed onboarding package.
    - url: https://api.production.invalid
      description: Intentionally non-resolving gated-production contract placeholder. Use the exact HTTPS origin and separate chia_live_ runtime and chia_live_finance_ finance credentials from signed onboarding. Credentials alone do not activate catalog or handoff.
components:
  headers:
    NoStore:
      description: Partner API errors and mutation responses are never cacheable.
      required: true
      schema:
        type: string
        const: no-store
    RateLimitReset:
      description: Seconds until the current limit resets.
      required: true
      schema:
        type: integer
        minimum: 0
    RequestId:
      description: Authoritative server-generated request identifier.
      required: true
      schema:
        type: string
        pattern: ^req_[A-Za-z0-9]{8,64}$
    RetryAfter:
      description: Seconds before retrying.
      required: true
      schema:
        type: integer
        minimum: 1
    RateLimitLimit:
      description: Credential/partner request budget.
      required: true
      schema:
        type: integer
        minimum: 0
    AllowPost:
      description: The only method accepted by this resource.
      required: true
      schema:
        type: string
        const: POST
    RateLimitRemaining:
      description: Requests remaining in the current window.
      required: true
      schema:
        type: integer
        minimum: 0
    Version:
      description: Credential-pinned API behavior version.
      required: true
      schema:
        type: string
        const: '2026-07-22'
    WWWAuthenticate:
      description: Bearer authentication challenge for the Partner API.
      required: true
      schema:
        type: string
        const: Bearer realm="chia-partner-api"
  schemas:
    HandoffSessionResponse:
      type: object
      additionalProperties: false
      required:
      - object
      - id
      - url
      - expires_at
      - livemode
      properties:
        object:
          const: handoff_session
        id:
          type: string
          pattern: ^phs_[A-Za-z0-9]{8,64}$
        url:
          type: string
          format: uri
          pattern: ^https://[A-Za-z0-9.-]+/(?:sandbox|production)/handoff/phs_[A-Za-z0-9]{8,64}$
        expires_at:
          type: string
          format: date-time
        livemode:
          type: boolean
    Error:
      type: object
      additionalProperties: false
      required:
      - type
      - code
      - message
      - param
      - request_id
      - retryable
      properties:
        type:
          type: string
          enum:
          - invalid_request_error
          - authentication_error
          - permission_error
          - conflict_error
          - rate_limit_error
          - api_error
        code:
          type: string
          pattern: ^[a-z][a-z0-9_]{2,63}$
        message:
          type: string
          minLength: 1
          maxLength: 240
        param:
          type:
          - string
          - 'null'
          maxLength: 80
        request_id:
          type: string
          pattern: ^req_[A-Za-z0-9]{8,64}$
        retryable:
          type: boolean
    ErrorResponse:
      type: object
      additionalProperties: false
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    HandoffSessionRequest:
      type: object
      additionalProperties: false
      required:
      - catalog_item_id
      - disclosure_version
      - consent_attestation
      properties:
        catalog_item_id:
          type: string
          pattern: ^cat_[A-Za-z0-9]{8,64}$
        disclosure_version:
          type: string
          pattern: ^hnd_[A-Za-z0-9]{8,64}$
        consent_attestation:
          $ref: '#/components/schemas/ConsentAttestation'
    ConsentAttestation:
      type: object
      additionalProperties: false
      required:
      - affirmed
      - affirmed_at
      properties:
        affirmed:
          const: true
        affirmed_at:
          type: string
          format: date-time
  responses:
    Unavailable:
      description: A safe dependency failed before the operation could commit.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            partner_program_unavailable:
              value:
                error:
                  type: api_error
                  code: partner_program_unavailable
                  message: The partner care program is not currently available.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: true
            settlement_summaries_unavailable:
              value:
                error:
                  type: api_error
                  code: settlement_summaries_unavailable
                  message: Settlement summaries are temporarily unavailable.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: true
            rate_limiter_unavailable:
              value:
                error:
                  type: api_error
                  code: rate_limiter_unavailable
                  message: The request cannot be accepted right now.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: true
            webhook_queue_unavailable:
              value:
                error:
                  type: api_error
                  code: webhook_queue_unavailable
                  message: The synthetic webhook could not be queued.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: true
    Conflict:
      description: Idempotency key reuse with a different body or unavailable webhook endpoint.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            idempotency_key_reused:
              value:
                error:
                  type: conflict_error
                  code: idempotency_key_reused
                  message: The idempotency key was already used with a different request.
                  param: Idempotency-Key
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
            webhook_endpoint_unavailable:
              value:
                error:
                  type: conflict_error
                  code: webhook_endpoint_unavailable
                  message: The registered webhook endpoint is not available for testing.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
    PermissionError:
      description: The credential lacks the operation's exact environment or scope.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficient_scope:
              value:
                error:
                  type: permission_error
                  code: insufficient_scope
                  message: The API key lacks the required scope.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
    InvalidRequest:
      description: Malformed JSON, unknown query/input field, invalid parameter, or unsupported media type.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_request:
              value:
                error:
                  type: invalid_request_error
                  code: invalid_request
                  message: The request could not be processed.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
            invalid_idempotency_key:
              value:
                error:
                  type: invalid_request_error
                  code: invalid_idempotency_key
                  message: Idempotency-Key must be a random UUIDv4.
                  param: Idempotency-Key
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
            invalid_cursor:
              value:
                error:
                  type: invalid_request_error
                  code: invalid_cursor
                  message: starting_after is not a valid production cursor.
                  param: starting_after
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
            cursor_expired:
              value:
                error:
                  type: invalid_request_error
                  code: cursor_expired
                  message: starting_after has expired; restart pagination without it.
                  param: starting_after
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
    RateLimited:
      description: Per-partner or per-credential limit exceeded.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rate_limit_exceeded:
              value:
                error:
                  type: rate_limit_error
                  code: rate_limit_exceeded
                  message: Too many requests were made. Retry after the indicated delay.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: true
    AuthenticationError:
      description: Missing, invalid, expired, revoked, or wrong-environment credential.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
        WWW-Authenticate:
          $ref: '#/components/headers/WWWAuthenticate'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_api_key:
              value:
                error:
                  type: authentication_error
                  code: invalid_api_key
                  message: The API key is missing or invalid.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: false
    MethodNotAllowedPost:
      description: The resource accepts POST only.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
        Allow:
          $ref: '#/components/headers/AllowPost'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Unexpected error with no internal details exposed.
      headers:
        Chia-Request-Id:
          $ref: '#/components/headers/RequestId'
        Chia-Version:
          $ref: '#/components/headers/Version'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        Cache-Control:
          $ref: '#/components/headers/NoStore'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal_error:
              value:
                error:
                  type: api_error
                  code: internal_error
                  message: The request could not be completed.
                  param: null
                  request_id: req_01K0N2A3B4C5D6E7F8G9H0J1K2
                  retryable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: chia_test_… / chia_test_finance_… / chia_live_… / chia_live_finance_…
      description: Environment- and role-bound server credential. Each environment has one runtime key for catalog:read, handoffs:create, and webhooks:test, plus a separately stored finance key for settlements:read. Sandbox and production credentials are never interchangeable.
externalDocs:
  description: Human and AI integration guide
  url: https://partners.chia.health/
x-refined-from:
- chia-health-openapi.yaml
- chia-health-openapi.yml
x-chia-contract:
  api_behavior_version: '2026-07-22'
  exact_json_business_operations:
  - GET /v2/catalog/items
  - POST /v2/handoff-sessions
  - GET /v2/settlement_summaries
  - POST /v2/webhook_tests
  forbidden_resource_classes:
  - patient
  - session
  - order
  - payment
  - prescription
  - fulfillment
  - shipment
  - support
  - outcome
  asset_contract: ../assets/v2.contract.yaml
  webhook_contract: ../webhooks/v2.asyncapi.yaml
  legal_role_boundary:
    partner_only_role: paid_marketplace_publisher
    partner_forbidden_roles:
    - merchant_of_record
    - disclosed_collection_agent
    - service_seller
    - clinical_provider
    - pharmacy
    - prescriber
    - order_agent
    billing_and_seller_entities_must_be_chia_controlled_and_legal_approved: true
    chia_is_merchant_of_record: true
  individual_data_boundary:
    accepts_individual_identifiers: false
    returns_patient_order_clinical_prescription_fulfillment_shipment_or_outcome_data: false
  production_settlement_release_boundary:
    source: separate_append_only_finance_authored_release_store
    reads_live_activity: false
    derives_amount_or_status: false
    malformed_release_behavior: fail_closed
    corrections: append_new_revision_with_supersedes_id
    aggregate_count_requires_internal_threshold_and_composition_release: true
    minimum_group_size_floor: 10
    internal_privacy_proof_fields_are_public: false
    forbidden_projection_dimensions:
    - patient
    - order
    - payment_level
    - shipment
    - program
    - geography
    - event
    - date_row