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

# Draft Claim From Notes PDF

> Creates an 837 claim from a procedure notes PDF through the Cair AI

## Delivery

To receive results from this endpoint, you have two options: [Webhooks](../claims/webhook-delivery) or the [Poll Optimizer Runs](../claims/poll-claim-optimization) API.


## OpenAPI

````yaml POST /api/draft-claim-from-notes
openapi: 3.1.0
info:
  title: Cair Health APIs
  description: APIs for the Cair Health platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://forecaster.cairhealth.com
security:
  - bearerAuth: []
paths:
  /api/draft-claim-from-notes:
    post:
      description: Creates an 837 claim from a procedure notes PDF through the Cair AI
      requestBody:
        description: Procedure notes content and claim type
        content:
          application/json:
            schema:
              type: object
              properties:
                fileContent:
                  type: string
                  description: Base64 encoded content of the procedure notes file
                claimType:
                  type: string
                  description: >-
                    Type of claim to be drafted (e.g., 'professional',
                    'institutional')
              required:
                - fileContent
                - claimType
        required: true
      responses:
        '200':
          description: Claim drafted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the operation was successful
                  claim_optimizer_id:
                    type: string
                    description: ID of the created optimizer run
              example:
                success: true
                claim_optimizer_id: 12345678-1234-1234-1234-123456789012
        '401':
          description: Unauthorized access or invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Organization not found
        '500':
          description: Server error or claim drafting failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Failed to draft claim. Please try again
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        message:
          type: string
          description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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