# POST /files/document-upload-complete

**Resource:** [Files](./files.md)  
**MCP tool:** `complete_document_upload`  
**Scopes:** `files:write`  
**Write operation:** yes

Step 2 of a PDF upload: after PUTting the bytes to the upload_url from create_document_upload_url, call this with its file_path and a name to add the PDF to Documents. The file is checked first (it must really be a PDF). Returns the document with its id, the same as upload_file with type "document". Calling it again for the same file_path returns the same document and adds nothing.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `file_path` | body | string | yes | The file_path returned by create_document_upload_url. |
| `name` | body | string | yes | The name to show in Documents (e.g. "2027-calendar.pdf"). |
| `folder` | body | string | no | Optional folder to file the document under. |
| `description` | body | string | no | Optional description stored with the document. |
| `document_type` | body | string | no | Optional. Categorises the document record, as for upload_file. |
| `tags` | body | array | no | Optional tags, as for upload_file (names, or {name, color} objects). Max 10. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/files/document-upload-complete"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"file_path":"...","name":"...","folder":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`