# Analyse a document

Send one document to the analysis engine, or re-run it: records a queued analysis at the next attempt number and queues the hand-off. Reach for it when a single document was re-uploaded or came back unreadable; processing every document on a deal is the record-level process route instead. Refuses with 409 while an analysis of that document is already queued or running.

Access class: `workspace`.

## Endpoint

`POST /v1/files/{id}/analyze`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "attemptNo": 1,
    "failureReason": "string",
    "fileId": "",
    "fileName": "string",
    "finishedAt": "string",
    "handoff": "string",
    "id": "",
    "jobId": "",
    "requestedAt": "string",
    "requestedBy": 1,
    "rowId": "",
    "startedAt": "string",
    "status": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
