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

# External Sftp Nextsync Callback

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

Callback endpoint for External SFTP Processing Workflow.

Flow:
1. Receive SFTP validation results per-claim
2. Persist file logs and documents
3. Update claim status
4. Fetch webhook/hospital config from repository
5. Trigger ExternalSftpBatchProcessingWorkflow for valid claims

## Headers

- `X-API-Key` string, required

## Request body

- SftpNextSyncRequest: Payload for External SFTP Processing Workflow callback. Receives validation results per-claim.
  - `tenant_id` string, required
  - `input_data` SftpNextSyncInputData, required
    - `session_id` string, required
    - `batch_id` integer, required
    - `claims` SftpClaimInput[]
      - `claim_id` string, required
      - `files` SftpFileResult[]
        - `filename` string, nullable
        - `hash_file` string, nullable
        - `status` string
        - `error_msg` string, nullable
        - `sftp_path` string, nullable
        - `base64` string, nullable
        - `uri` string, nullable
        - `size` integer, nullable
      - `sftp_path` string, nullable
      - `external_id` 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)
