---
title: "Request an invoice document upload"
method: POST
path: "/invoices/documents"
tags: ["Invoices"]
---

# Request an invoice document upload

`POST /invoices/documents`

## Request

- Base URL: `https://app-sandbox.resolvepay.com/api`
- URL: `https://app-sandbox.resolvepay.com/api/invoices/documents`
- Auth: one of:
  - HTTP bearer
  - HTTP basic
- TypeScript: <https://skmtc.dev/resolvepay/apis/resolve-api-reference/docs/invoices/documents/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a pending invoice document and returns a presigned upload request.
Upload the document with every returned `upload_headers` entry, including
`Content-Type` (the requested `filetype`), wait until
`GET /invoices/documents/{merchant_invoice_document_id}` reports `accepted`, then use
`document_id` as `merchant_invoice_document_id` when creating or updating the invoice.

## Request body

- DocumentUploadRequest
  - `filename` string, required: Original filename. The extension must match filetype.
  - `filetype` 'application/pdf' | 'image/png' | 'image/jpeg' | 'image/jpg', required: MIME type of the invoice document.

## Response `200`

Pending invoice document upload request.

- DocumentUploadResponse
  - `id` string, required
  - `document_id` string, required: Use as merchant_invoice_document_id after validation succeeds.
  - `url` string, uri, required
  - `upload_url` string, uri, required
  - `upload_expires_at` string, date-time, required
  - `object_key` string, required
  - `transfer_method` 'presigned_upload', required
  - `upload_headers` object, required
  - `validation_profile` 'merchant_invoice_document_default', required

## Other responses

- `400`: Bad request error
- `401`: Unauthorized error
- `429`: Rate limit error

---

[API](https://skmtc.dev/resolvepay/apis/resolve-api-reference.md) - [All operations](https://skmtc.dev/resolvepay/apis/resolve-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/resolvepay/apis/resolve-api-reference/revisions/c62edc454aaa?raw)
