---
title: "Sets the images for a map, given an 'imageIDs' array. For new images, give an stringified integer between one-five for each place, which will be used to index into the array of files on the multipart form. For existing images, give its ID (uuid). Any IDs *not* included will be deleted. Say a map has two existing images (shortened here), abcdefgh-1234, stuvwxyz-6789. For example, calling this endpoint two image files and imageIDs = [1, abcdefgh-1234, 0], and we would order the second file first, then abcdefgh-1234, then the first file, deleting stuvwxyz-6789. The two new images would be issued new uuids, and stored relative to that ID."
method: PUT
path: "/v1/maps/{mapID}/images"
tags: ["Maps"]
---

# Sets the images for a map, given an 'imageIDs' array. For new images, give an stringified integer between one-five for each place, which will be used to index into the array of files on the multipart form. For existing images, give its ID (uuid). Any IDs \*not\* included will be deleted. Say a map has two existing images (shortened here), abcdefgh-1234, stuvwxyz-6789. For example, calling this endpoint two image files and imageIDs = \[1, abcdefgh-1234, 0\], and we would order the second file first, then abcdefgh-1234, then the first file, deleting stuvwxyz-6789. The two new images would be issued new uuids, and stored relative to that ID.

`PUT /v1/maps/{mapID}/images`

## Request

- Base URL: `https://api.momentum-mod.org` (the document declares no server; this is the origin it was published from)
- URL: `https://api.momentum-mod.org/v1/maps/{mapID}/images`
- Auth: HTTP bearer

## Path parameters

- `mapID` number, required

## Request body `multipart/form-data`

- UpdateMapImagesDto
  - `imageIDs` unknown[], required: See endpoint description
    - unknown

## Response `200`

The newly created map image

- unknown[]
  - unknown

## Other responses

- `400`: Invalid image data
- `403`: Map is not in NEEDS_REVISION state
- `404`: Map not found

---

[API](https://skmtc.dev/momentum-mod/apis/momentum-mod-api.md) - [All operations](https://skmtc.dev/momentum-mod/apis/momentum-mod-api/llms.txt) - [OpenAPI document](https://skmtc.dev/momentum-mod/apis/momentum-mod-api/revisions/0a88cfbbcc65?raw)
