# Upload a document to a processing account, then optionally retrieve it.

Upload a document to a processing account, then optionally retrieve it.

1. Upload the document to the processing account. The request is multipart/form-data (NOT application/json): the `attachment` object carries the type/description/metadata and the binary `file` carries the document. Returns a 201 with the attachmentId and an initial uploadStatus of `pending`.
 [createProcessingAccountAttachment](/api/create-processing-account-attachment)
2. OPTIONAL — retrieve the attachment by its id to confirm the upload status (expect uploadStatus to become `accepted`). Returns metadata about the file, not the file bytes.
 [getAttachment](/api/get-attachment)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. upload document · API"]
  step1["2. check upload status · API"]
  step0 --> step1
```
