marketplace
PATCH /v1/marketplace/listings/{listing_id}/images/{image_id}
Set the alt text, the gallery position, or make this the cover.
Authentication
Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X PATCH https://api.zinndigital.com/v1/marketplace/listings/{listing_id}/images/{image_id} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Promoting a cover demotes the incumbent in the same write — there is a partial unique constraint allowing exactly one cover per listing, so doing it in two steps would fail.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
listing_id (path) | string | Yes | — |
image_id (path) | string | Yes | — |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
alt | string | No | — |
position | integer | No | — |
is_cover | boolean | No | Only `true` is meaningful — a listing always has exactly one cover. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
url | string | No | The original. ⛔ `null` when no public delivery origin is configured, rather than a guessed URL — an R2 bucket is not public by default, and a card with a broken image is worse t… |
srcset | string | No | Width candidates through Cloudflare image resizing with `format=auto`, so a phone downloads a phone-sized AVIF/WebP and an old browser still gets something it can decode. Empty… |
width | integer | Yes | Pixel width AFTER orientation is applied. Required in the markup to reserve space — an `<img>` without it is the largest single source of layout shift. |
height | integer | Yes | Pixel height after orientation is applied. |
alt | string | No | — |
is_cover | boolean | Yes | — |
position | integer | Yes | — |
Errors this endpoint can return
401 · 404