# Replace image or image metadata

`PUT /accounts/{accountID}/images/{imageID}`

API version: `v2026.10.00`. Send `X-Moov-Version: v2026.10.00` to get the behavior described here.

> AI agents: search and read all Moov docs with the docs MCP server at https://docs.moov.io/mcp (no API key). Setup: https://docs.moov.io/guides/developer-tools/mcp-ai/docs-mcp/index.md

Replace an existing image and, optionally, its metadata.

This endpoint replaces the existing image with the new PNG, JPEG, or WebP. Omit
the metadata form section to keep existing metadata. Duplicate images, and requests larger than 16MB will be rejected.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Moov-Version` | header | string |  | Set this header to v2026.10.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, the earliest supported version, which may not match the behavior documented here. An unrecognized well-formed version uses the latest supported version that is not newer than the requested version, when one exists. For example, `v2026.08.00` uses `v2026.07.00`. A malformed value, such as `2022`, returns a `404` response. Values: `v2026.10.00`. |
| `accountID` | path | string | Yes |  |
| `imageID` | path | string | Yes |  |

## Request body

Content type: `multipart/form-data`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `image` | string (binary) | Yes | A PNG, JPEG, or WebP image file to upload. |
| `metadata` | object |  | Optional, json-encoded metadata to associate with the uploaded image. |
| `metadata.altText` | string |  | Alternative text for the image. |

## Response 200

The request completed successfully.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `imageID` | string | Yes | Unique identifier for a image resource. |
| `publicID` | string | Yes | The ID used to get an image with the public endpoint. |
| `altText` | string |  | Alternative text for the image. |
| `link` | string (uri) | Yes | A public URL to access the image. An optional `size={width}x{height}` query parameter can be provided to resize the image. |
| `createdOn` | string (date-time) | Yes |  |
| `updatedOn` | string (date-time) | Yes |  |
| `disabledOn` | string (date-time) |  |  |

## Errors

| Status | Meaning |
| --- | --- |
| 400 | The server could not understand the request due to invalid syntax. |
| 401 | The request contained missing or expired authentication. |
| 403 | The user is not authorized to make the request. |
| 404 | The requested resource was not found. |
| 409 | The request conflicted with the current state of the target resource. |
| 422 | The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields. |
| 429 | Request was refused due to rate limiting. |
| 500 | The request failed due to an unexpected error. |
| 504 | The request failed because a downstream service failed to respond. |

## Examples

### cURL

```bash
curl -X PUT "https://api.moov.io/accounts/{accountID}/images/{imageID}" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.10.00" \
  -F "image=@/path/to/image" \
  -F 'metadata={}'
```

### Typescript (SDK)

```typescript
import { Moov } from "@moovio/sdk";
import { openAsBlob } from "node:fs";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.images.update({
    accountID: "310f4f19-45cf-4429-9aae-8e93827ecb0d",
    imageID: "8ef109f8-5a61-4355-b2e4-b8ac2f6f6f47",
    imageUploadRequestMultiPart: {
      image: await openAsBlob("example.file"),
    },
  });

  console.log(result);
}

run();
```

Full reference with SDK examples in every language: https://docs.moov.io/api/v2026.10.00/tools/images/put-image/
