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

# Confirm File Detection

> Confirms the detection/validation of a file after upload. This endpoint processes

<Note>
  This endpoint requires authentication. Include your Bearer token in the Authorization header.
</Note>

## Description

detection session results and queues the file for processing.

For ZIP files, provide an array of file confirmations with individual source/period
assignments for each extracted file.

**Note:** Despite the route definition showing `:id` parameter, the implementation
uses `sessionId` from the request body.

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/file/confirm-detection', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      "sessionId": "sample-sessionId",
      "royaltySource": "sample-royaltySource",
      "accountingPeriod": "2024-01-21",
      "schema": {},
      "parameters": {},
      "fileConfirmations": [
        {
          "fileName": "sample-fileName",
          "royaltySource": "sample-royaltySource",
          "accountingPeriod": "2024-01-21"
        }
      ]
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
    'https://api.royalti.io/file/confirm-detection',
    headers={
      'Authorization': f'Bearer {token}'
    },
    json={"sessionId":"sample-sessionId","royaltySource":"sample-royaltySource","accountingPeriod":"2024-01-21","schema":{},"parameters":{},"fileConfirmations":[{"fileName":"sample-fileName","royaltySource":"sample-royaltySource","accountingPeriod":"2024-01-21"}]}
  )

  data = response.json()
  print(data)
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.royalti.io/file/confirm-detection \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"sessionId":"sample-sessionId","royaltySource":"sample-royaltySource","accountingPeriod":"2024-01-21","schema":{},"parameters":{},"fileConfirmations":[{"fileName":"sample-fileName","royaltySource":"sample-royaltySource","accountingPeriod":"2024-01-21"}]}'

  ```
</CodeGroup>
