# POST /apps/:app_id/tables/:table_key/files/complete

**Resource:** [App Data](./app-data.md)  
**MCP tool:** `finish_app_file_upload`  
**Scopes:** `app-data:write`  
**Write operation:** yes

Step 2 of adding a file to an app table: call it after the PUT to upload_url. It reads the real type and size from the file itself, runs the virus check and publishes a clean file. A file that fails (wrong type, too big, virus found) is refused with the reason and nothing is kept. Safe to call again for the same file.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `app_id` | path | string | yes | The app's id. |
| `table_key` | path | string | yes | The table's key (for example "job_files"), as shown by list_app_tables. |
| `column` | body | string | yes | The same file column the upload was started for. |
| `file` | body | string | yes | The `file` reference the upload start answered. |
| `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/apps/:app_id/tables/:table_key/files/complete"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"column":"...","file":"...","require_approval":"..."}'
```

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