---
title: "Confirm presigned uploads completed"
method: POST
path: "/v1/clients/{client_id}/documents/finalize"
tags: ["Documents"]
---

# Confirm presigned uploads completed

`POST /v1/clients/{client_id}/documents/finalize`

## Request

- Base URL: `https://api.magnetictax.com`
- URL: `https://api.magnetictax.com/v1/clients/{client_id}/documents/finalize`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string

## Request body

- FinalizeDocumentsRequest
  - `document_ids` integer[], required

## Response `200`

OK

- DocumentList
  - `documents` Document[]
    - `category` 'tax_return' | 'workpapers' | 'review_notes', nullable: For output documents only: 'tax_return' (the tax-software return file, e.g. a Drake .DI5 / UltraTax .csd), 'workpapers' (the workpapers PDF), or 'review_notes' (the reviewer's notes, delivered as a .txt and a rendered PDF). Absent on input documents and internal-only outputs.
    - `download_url` string, nullable
    - `filename` string
    - `id` integer
    - `state` 'uploading' | 'uploaded' | 'submitted': Lifecycle state of the document: 'uploading' (presigned, not yet confirmed), 'uploaded' (available for the next submission), or 'submitted' (attached to a submission).
  - `failed_document_ids` integer[]: Ids of documents that failed. Preferred over failed_document_indices. On the direct multipart upload this is always empty — a failed direct upload never created a row, so it has no id (use failed_document_indices there).
  - `failed_document_indices` integer[]: DEPRECATED (removed in 1.1.0) — prefer failed_document_ids. Positions into the request array; retained because a failure with no created row (direct upload) has no id.

## Other responses

- `400`: Bad request
- `404`: Not found
- `409`: Idempotency-Key conflict — reused for a different request (`idempotency_key_reuse`), or the original request is still running (`idempotency_request_in_progress`)
- `429`: Rate limited — retry after the `Retry-After` delay

---

[API](https://skmtc.dev/magnetictax/apis/magnetic-integrations-api.md) - [All operations](https://skmtc.dev/magnetictax/apis/magnetic-integrations-api/llms.txt) - [OpenAPI document](https://skmtc.dev/magnetictax/apis/magnetic-integrations-api/revisions/11854873aa89?raw)
