---
title: "Set default image"
method: POST
path: "/preview/v2/admin/images/{id}/set-default"
tags: ["Images"]
---

# Set default image

`POST /preview/v2/admin/images/{id}/set-default`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

Set a public image as the default. The image must have provider = 'sfc'. Atomically swaps the default from any previous default image to this one. Requires admin permissions.

## Path parameters

- `id` string, required

## Response `200`

Default image set

- SfcApiSetDefaultImageResponse
  - `id` string, required
  - `resource_path` string, required — A resource path for a image resource. Format: sfc:image:<account>:<workspace>:<name>.
  - `owner` string, required
  - `workspace` string, required
  - `name` string, required
  - `object` 'image', required
  - `upload_status` 'started' | 'uploading' | 'completed' | 'failed' | 'revoked', required
  - `created_at` integer, required — Unix timestamp.
  - `provider` string, nullable
  - `sha256` string, nullable
  - `is_default` boolean, required

## Other responses

- `401` — Unauthorized request
- `403` — Admin access required
- `404` — Image not found or not public
- `500` — Internal server error

---

[API](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sfcompute/san-francisco-compute-documentation/versions/93dd7661e9bb/schema)
