---
title: "Submit claim with pre-extracted text"
method: POST
path: "/api/v1/claims/text/submit"
tags: ["Open API", "Claims Text Input Method"]
---

# Submit claim with pre-extracted text

`POST /api/v1/claims/text/submit`

## Request

- Base URL: `https://developer.claimmind.life` (the document declares no server; this is the origin it was published from)
- URL: `https://developer.claimmind.life/api/v1/claims/text/submit`
- Auth: none declared. Required headers: `X-API-Key`

Submit a medical claim with pre-extracted text documents.

    **Use Case:** Systems with existing OCR/digitization that have already extracted text from documents.

    **Authentication:** API Key (X-API-Key header)
    **Required Scope:** `claims:write`

    **Integration Pattern:**
    1. SIMRS performs OCR on medical documents
    2. Extract text from resume medis, lab results, etc.
    3. POST text data to this endpoint
    4. Skip OCR processing step for faster results
    5. Track progress via /claims/upload/status/{claim_id}
    6. Retrieve results via /claims/upload/result/{claim_id}

    **When to Use This Method:**
    - You already have OCR capability in your SIMRS
    - Documents are in text format (not scanned images)
    - You want faster processing by skipping OCR step
    - You're migrating from legacy system with text data

    **vs. File Upload Method:**
    - File Upload: Send PDF/images, ClaimMind performs OCR
    - Text Method: Send extracted text, ClaimMind skips OCR
    - Text method is faster but requires OCR on your end

    **Request Format:**
    - external_claim_id: Your reference ID for correlation
    - payer_id: Payer identifier (default: "bpjs")
    - documents: Array of text documents
      - doc_type: Document type (resume_medis, lab_result, etc.)
      - raw_text: Extracted text content
    - patient: Optional patient info (if known)
    - admission: Optional admission info (if known)
    - diagnosis: Optional diagnosis info (if known)

    **Supported Document Types:**
    - resume_medis: Medical resume/summary
    - lab_result: Laboratory test results
    - radiologi: Radiology reports
    - resep: Prescription/medication
    - billing: Billing information

    **Response Format:**
    - claim_id: Internal tracking ID
    - external_claim_id: Your reference ID
    - workflow_id: Temporal workflow ID
    - status: PROCESSING | QUEUED
    - status_url: URL to check claim status

    **Webhook Events:**
    - claim.submitted: When claim is accepted
    - claim.completed: When processing finishes
    - claim.failed: If processing fails

    **Example Request:**
    ```json
    {
        "external_claim_id": "CLM-2026-001",
        "payer_id": "bpjs",
        "documents": [
            {
                "doc_type": "resume_medis",
                "raw_text": "Patient: John Doe, Age: 41\nDiagnosis: A09 - Gastroenteritis\nTreatment: IV fluids, antiemetics\nDischarged: 2026-01-20"
            },
            {
                "doc_type": "lab_result",
                "raw_text": "WBC: 12000/uL\nHemoglobin: 13.5 g/dL\nPlatelets: 250000/uL"
            }
        ],
        "patient": {
            "nama": "John Doe",
            "rekam_medis": "RM001234"
        },
        "admission": {
            "jenis_pasien": "Rawat Inap",
            "kelas_rawat": 2
        }
    }
    ```

    **Example Response:**
    ```json
    {
        "claim_id": "clm-abc-123-xyz",
        "external_claim_id": "CLM-2026-001",
        "workflow_id": "wf-temporal-456",
        "status": "PROCESSING",
        "status_url": "/api/v1/claims/upload/status/clm-abc-123-xyz",
        "submitted_at": "2026-01-22T10:30:00Z"
    }
    ```

    **Error Handling:**
    - 400: Invalid request format or empty documents
    - 401: Invalid API key
    - 403: API key lacks claims:write scope
    - 429: Rate limit exceeded
    - 500: Server error - retry with exponential backoff

    **Integration Tips:**
    - Use external_claim_id to correlate with your SIMRS claim ID
    - Preserve original text formatting (newlines, spacing) for best results
    - Include at least resume_medis document type
    - Pre-populate patient/admission fields if available
    - Configure webhooks to avoid status polling
    - Text method processes 30-50% faster than file upload

## Headers

- `X-API-Key` string, required

## Request body

- ClaimTextRequest: Request for raw text claim submission.
  - `external_claim_id` string, required
  - `payer_id` string
  - `documents` RawTextDocument[], required
    - `doc_type` string, required
    - `raw_text` string, required
  - `patient` PatientInfo: Patient demographic information.
    - `no_sep` string, nullable
    - `rekam_medis` string, nullable
    - `nama` string, nullable
    - `tanggal_lahir` string, date, nullable
    - `jenis_kelamin` string, nullable
    - `umur` integer, nullable
  - `admission` AdmissionInfo: Patient admission information.
    - `tanggal_masuk` string, date, nullable
    - `tanggal_keluar` string, date, nullable
    - `jenis_pasien` string, nullable
    - `kelas_rawat` integer, nullable
    - `dpjp` string, nullable
  - `diagnosis` DiagnosisInfo: Diagnosis information.
    - `diagnosa_kerja` string, nullable
    - `diagnosa_utama` string, nullable

## Response `202`

Claim accepted for processing

- ClaimSubmitResponse: Claim submission response.
  - `claim_id` string, required
  - `external_claim_id` string, nullable
  - `workflow_id` string, required
  - `status` string, required
  - `status_url` string, required
  - `submitted_at` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `403`: Insufficient permissions
- `422`: Validation Error

---

[API](https://skmtc.dev/claimmind/apis/claimmind-open-api-service.md) - [All operations](https://skmtc.dev/claimmind/apis/claimmind-open-api-service/llms.txt) - [OpenAPI document](https://skmtc.dev/claimmind/apis/claimmind-open-api-service/revisions/ee8bfbeadb8a?raw)
