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

# Run an eligibility check

> Dispatches an on-demand eligibility check for an insurance policy through the EHR/payer. Returns the queued check; poll GET /eligibility-checks/{id} for the result. Guardrails: one check per policy per 10 minutes (409), 200 API checks per organization per 24h (429). Requires write:eligibility_checks scope.



## OpenAPI

````yaml /openapi-v2.json post /eligibility-checks
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '2.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v2
security: []
tags: []
paths:
  /eligibility-checks:
    post:
      tags:
        - Eligibility Checks
      summary: Run an eligibility check
      description: >-
        Dispatches an on-demand eligibility check for an insurance policy
        through the EHR/payer. Returns the queued check; poll GET
        /eligibility-checks/{id} for the result. Guardrails: one check per
        policy per 10 minutes (409), 200 API checks per organization per 24h
        (429). Requires write:eligibility_checks scope.
      operationId: EligibilityChecksPublicController_runEligibilityCheck
      parameters:
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunEligibilityCheckBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunEligibilityCheckSuccessResponse'
        '400':
          description: Missing or invalid request parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiBadRequestResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiNotFoundResponse'
        '409':
          description: Resource conflict (e.g. editing a signed note)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiConflictResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    RunEligibilityCheckBody:
      type: object
      properties:
        insurancePolicyId:
          type: string
          description: Insurance policy ID (UUID) to run the eligibility check for
          example: a1b2c3d4-5678-4abc-9def-0123456789ab
      required:
        - insurancePolicyId
    RunEligibilityCheckSuccessResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ExternalEligibilityCheckResponse'
      required:
        - code
        - data
    PublicApiBadRequestResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: bad_request
        message:
          type: string
          description: Human-readable error message
          example: '''id'' must be a valid UUID'
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiNotFoundResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Resource not found
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiConflictResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: conflict
        message:
          type: string
          description: Human-readable error message
          example: Cannot edit a signed note
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    ExternalEligibilityCheckResponse:
      type: object
      properties:
        id:
          type: string
          description: Eligibility check unique identifier
          example: c1d2e3f4-5678-4abc-9def-0123456789ab
        insurancePolicyId:
          type: string
          description: Insurance policy the check was run for
          example: a1b2c3d4-5678-4abc-9def-0123456789ab
        status:
          type: string
          description: Check lifecycle status. Poll until 'completed' or 'failed'.
          enum:
            - queued
            - completed
            - failed
          example: completed
        resultStatus:
          type: string
          description: >-
            Terminal payer result: active | inactive | unavailable | failed.
            Null ONLY while the check is still running — a check whose status is
            'completed' or 'failed' always carries a result. 'unavailable' means
            no determination could be established (payer non-answer, or a
            finished run whose result was not retained); it is not a payer
            denial. Drive polling off `status`.
          nullable: true
          example: active
        keptPreviousStatus:
          type: string
          description: >-
            When a payer non-answer kept the policy's previous determination,
            the determination that was kept (e.g. ACTIVE). Null otherwise.
          nullable: true
          example: null
        requestedVia:
          type: string
          description: How the check was requested
          enum:
            - api
            - dashboard
          example: api
        requestedAt:
          type: string
          description: When the check was requested
          example: '2026-08-09T12:00:00.000Z'
        startedAt:
          type: string
          description: >-
            When the check began running at the EHR. Null while it is still
            queued.
          nullable: true
          example: '2026-08-09T12:00:03.000Z'
        completedAt:
          type: string
          description: When the check finished
          nullable: true
          example: '2026-08-09T12:00:45.000Z'
        createdAt:
          type: string
          description: Created timestamp
          example: '2026-08-09T12:00:00.000Z'
        updatedAt:
          type: string
          description: Last updated timestamp
          example: '2026-08-09T12:00:45.000Z'
      required:
        - id
        - insurancePolicyId
        - status
        - resultStatus
        - keptPreviousStatus
        - requestedVia
        - requestedAt
        - startedAt
        - completedAt
        - createdAt
        - updatedAt
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````