---
title: "External Ocr Nextsync Callback"
method: POST
path: "/internal/ocr-nextsync"
tags: ["Internal Services", "SFTP Callbacks"]
---

# External Ocr Nextsync Callback

`POST /internal/ocr-nextsync`

## 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/internal/ocr-nextsync`
- Auth: none declared. Required headers: `X-API-Key`

Callback endpoint for External SFTP Batch Processing Workflow (OCR completion).

Flow:
1. Guard: Skip if batch already finalized
2. Update per-file status in sftp_file_log
3. Update per-claim status in sftp_sync_log and claims
4. Finalize batch status
5. Trigger next batch if pending

## Headers

- `X-API-Key` string, required

## Request body

- SftpOcrClaimItem[]
  - `claim_id` string, required
  - `tenant_id` string, required
  - `session_id` string, required
  - `batch_id` integer, required
  - `batch_file` SftpOcrFileResult[]
    - `hash_file` string, nullable
    - `status` string, nullable
    - `error_msg` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `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)
