# Analyse an Uploaded Document

> Reads a document you have already uploaded and returns an analysis of it: a summary, the key figures, a classification or a risk assessment. You must…

POST /api/v1/skills/documents.analyse/invoke

Reads a document you have already uploaded and returns an analysis of it: a summary, the key figures, a classification or a risk assessment. You must supply file_id, the UUID of the uploaded file, and can choose the analysis_type. The response holds the analysis text, any extracted data and a confidence score.

Body parameters

file_id string · uuid Required

UUID of the uploaded file to analyse.

analysis_type enum · default summarize

Kind of analysis to run on the document; defaults to a summary.

summarize extract_figures classify risk_assess

Returns

Skill executed successfully

skill string Required

Example analyse_document

output object Required

output.stub_fields array of strings

output.warnings array of strings

output.analysis string Required

output.extracted_data object

output.confidence number · default 0

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Next Analyse Client Financials →](https://heyarchie.com/en-gb/developers/api-reference/analysis/analyse-client-financials/)

```
curl https://uk.heyarchie.com/api/v1/skills/documents.analyse/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "file_id": "00000000-0000-0000-0000-000000000000",
       "analysis_type": "summarize"
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "documents.analyse",
    file_id="00000000-0000-0000-0000-000000000000",
    analysis_type="summarize",
)
print(result)
```

```
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("documents.analyse", {
  "file_id": "00000000-0000-0000-0000-000000000000",
  "analysis_type": "summarize"
});
console.log(result);
```

Response

```
{
  "skill": "analyse_document",
  "output": {
    "analysis": "Supplier invoice INV-20418 from Fenwick Office Supplies Ltd for GBP 1,248.00 including VAT, due on 2026-07-14.",
    "confidence": 0.94,
    "extracted_data": {
      "currency": "GBP",
      "due_date": "2026-07-14",
      "invoice_number": "INV-20418",
      "net_amount": 1040,
      "supplier": "Fenwick Office Supplies Ltd",
      "total": 1248,
      "vat_amount": 208
    }
  },
  "correlation_id": "<string>"
}
```

```
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
```

Every response also carries X-Request-ID. Quote it if you write to us about a call.
