---
title: "Update an existing photo mockup"
method: PATCH
path: "/api/v1/photo-mockups/{mockup_id}"
tags: ["Photo mockups"]
---

# Update an existing photo mockup

`PATCH /api/v1/photo-mockups/{mockup_id}`

## Request

- Base URL: `https://api.sudomock.com`
- URL: `https://api.sudomock.com/api/v1/photo-mockups/{mockup_id}`
- Auth: API key in header `x-api-key`

Rename a mockup and/or set the colours it answers to by name. A render may then send a name where it would send a hex code.

## Path parameters

- `mockup_id` string, required: Id of the photo mockup to rename or give named colours.

## Request body

- MockupUpdateRequest: Update request for PATCH /api/v1/psd-mockups/{uuid}
  - `name` string, nullable: New mockup name
  - `colors` MockupColour[], nullable: The colours this mockup answers to by name. Replaces the whole list, so send every colour you want to keep. Send [] to clear it.
    - `label` string, required: What you call this colour, e.g. 'blue jean'. Matched exactly when a render asks for it.
    - `hex` string, required: The colour the name paints, e.g. '#6A8296'.

## Response `200`

Successful Response

- PhotoMockupUpdateResponse
  - `data` PhotoMockupUpdateData, required
    - `uuid` string, required: Unique identifier for the mockup.
    - `name` string, nullable: Display name of the mockup after the update.
    - `colors` MockupColour[]: The colours this mockup answers to by name after the update.
      - `label` string, required: What you call this colour, e.g. 'blue jean'. Matched exactly when a render asks for it.
      - `hex` string, required: The colour the name paints, e.g. '#6A8296'.
  - `success` true: Always true on a successful response.

---

[API](https://skmtc.dev/sudomock/apis/sudomock-api.md) · [All operations](https://skmtc.dev/sudomock/apis/sudomock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sudomock/apis/sudomock-api/revisions/c1cc24006c60?raw)
