---
title: "Replace all invoice images with uploaded files"
method: PATCH
path: "/invoices/{id}/images"
tags: ["invoices"]
---

# Replace all invoice images with uploaded files

`PATCH /invoices/{id}/images`

Accepts one or more image files via multipart/form-data under the 'images' key. Deletes all existing images and replaces them with the uploaded files. Supported formats: PDF, JPG, JPEG, PNG. Maximum file size per image: 50 MB. Per-file validation failures are reported in image_errors rather than rejecting the entire request.

## Path parameters

- `id` string, required

## Headers

- `Authorization` string, required
- `X-Api-Key` string, required
- `X-API-Version` string

## Response `200`

All images replaced successfully. image_errors is empty.

- InvoicesPatchInvoicesIdImagesResponse200
  - `images` InvoicesIdImagesPatchResponsesContentApplicationJsonSchemaImagesItems[]
    - `id` integer
    - `url` string
  - `image_errors` InvoicesIdImagesPatchResponsesContentApplicationJsonSchemaImageErrorsItems[] — Always empty on 200.
    - `source` string — Filename of the file that failed.
    - `error` string — Human-readable error message.

## Other responses

- `400` — Bad request - Invalid parameters or request format
- `403` — Forbidden - Access denied or insufficient permissions
- `404` — Not found - Resource does not exist

## Changes

- **2026-08-17** `c231509a03cf` — 3 breaking, 6 info
  - the `message` response's property type/format changed from `string`/`` to ``/`` for status `400`
  - the `message` response's property type/format changed from `string`/`` to ``/`` for status `403`
  - the `message` response's property type/format changed from `string`/`` to ``/`` for status `404`
  - the response property `code` became required for the status `400`
  - …5 more
- **2026-08-13** `1f089f3e34d9` — 9 breaking
  - the response property `code` became optional for the status `400`
  - the response property `code` became optional for the status `403`
  - the response property `code` became optional for the status `404`
  - the response property `message` became optional for the status `400`
  - …5 more

[Change history](https://skmtc.dev/ottimate/apis/api-reference/changes/invoices/:id/images/patch.md)

---

[API](https://skmtc.dev/ottimate/apis/api-reference.md) · [All operations](https://skmtc.dev/ottimate/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ottimate/api-reference/revisions/ba91ff4c6969/schema)
