---
title: "Update Image Route"
method: PATCH
path: "/images/{image_id}"
tags: ["images"]
---

# Update Image Route

`PATCH /images/{image_id}`

## Request

- Base URL: `https://api.goodeye.dev/v1`
- URL: `https://api.goodeye.dev/v1/images/{image_id}`
- Auth: none declared

Update visibility, TTL, or the private view link of a hosted image.

Caller must own it.

``ttl_seconds`` and ``permanent`` are mutually exclusive: providing both
returns a validation error. ``permanent=true`` clears the expiry so the
image lives indefinitely. ``ttl_seconds`` sets a new expiry relative to now.
Omitting both leaves the current expiry unchanged.

``rotate_view_secret=true`` issues a fresh private view link and invalidates
every link shared earlier for this image (un-share). For a private image the
returned ``url`` is the current view link.

## Path parameters

- `image_id` string, uuid, required

## Request body

- UpdateImageBody: Request body for PATCH /images/{image_id}.
  - `visibility` string, nullable
  - `ttl_seconds` integer, nullable
  - `permanent` boolean
  - `rotate_view_secret` boolean

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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