# Download an ISO

`POST https://console.advinservers.com/api/v1/client/isos`

### Overview

Starts downloading an ISO from a public URL for use by servers in the same team. Returns immediately with `status` set to `downloading`, `completed_at` set to null and `download_progress` set to 0. Poll `GET /api/v1/client/isos` until the status is `ready` or `failed`.

Downloads must be enabled (`quota.download_enabled`). Several downloads can run at the same time. Each one reserves its size when it starts, and total storage, counting downloads in progress, cannot exceed `quota.allowance`. Rejected requests explain which condition failed.

Send a `name` of up to 40 characters and the file URL as `link`. The file size is checked against the account's remaining storage before downloading, and a download that turns out larger than that size fails. A file whose size the URL does not report reserves all the remaining storage until it finishes.

### Permissions

Requires the `iso.update` (Manage ISO images) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Body

Sent as `application/json`.

- `name` (string, required): The name shown to customers. 1 to 40 characters
- `link` (string<uri>, required): The value of `link`. At most 2048 characters

## Response 200

The record, as a JSON object. There is no envelope.

- `uuid` (string, required): The uuid UUID.
- `uuid_short` (string, required): The value of `uuid_short`.
- `name` (string, required): The name shown to customers.
- `file_name` (string | null, required): The value of `file_name`.
- `size` (integer | null, required): The value of `size`.
- `is_successful` (boolean | null, required): Null until the download finishes, which is a third state and not a failure: a row created the moment a fetch is queued has never been written to. Published as null and kept that way.
- `status` (string, required): The value of `status`. One of: `downloading`, `failed`, `ready`.
- `is_preparing` (boolean, required): The download has finished and the image is being prepared for mounting.
- `mounted_server_count` (integer, required): The total number of servers using this image, including servers outside the current team. The image cannot be deleted while mounted.
- `mounted_on_this_server` (boolean, required): The value of `mounted_on_this_server`.
- `mounted_on_other_servers_count` (integer, required): The number of mounted on other servers count.
- `mounted_servers` (object[], required): Visible servers using this image. Empty without deletion permission. The mount count may be higher because it includes inaccessible servers.
  - `uuid` (string, required): The uuid UUID.
  - `uuid_short` (string, required): The value of `uuid_short`.
  - `name` (string, required): The name shown to customers.
  - `windows` (boolean, required): The value of `windows`.
  - `template_name` (string | null, required): The value of `template_name`.
  - `template_icon_url` (string | null, required): The custom icon a customer set, falling back to the template's. Read through the model so the places that draw a server's icon cannot disagree about which one wins.
- `can_delete` (boolean, required): Whether the customer can delete.
- `owned_by_server_owner` (boolean, required): False only for a member of staff's own image showing up on a customer's server. Account-level listings are all the viewer's own, so nothing there is ever flagged.
- `completed_at` (string | null, required): A string, not a date object, and deliberately so: the column carries no `datetime` cast, so this has always gone out as MySQL wrote it ("2026-08-19 18:20:41") rather than in the ISO-8601 form `created_at` below uses. Two formats in one payload is not a design, it is what is published, and changing it would move a date under every caller that parses it.
- `created_at` (string<date-time> | null, required): The date and time for created at, in UTC.
- `download_progress` (integer, required): Percent, and zero rather than null while nothing has started.
- `download_started_at` (string<date-time> | null, required): The date and time for download started at, in UTC.

```json
{
  "uuid": "a015fe1c-a2a8-44e4-b188-05736ce42b26",
  "uuid_short": "Uuid short",
  "name": "Debian 12.7 netinst",
  "file_name": "client-67d74fbd-2dc5-4f95-a946-c504a98f59fb-zfqyW1HhtBAj.iso",
  "size": 661651456,
  "is_successful": null,
  "status": "downloading",
  "is_preparing": false,
  "mounted_server_count": 0,
  "mounted_on_this_server": false,
  "mounted_on_other_servers_count": 0,
  "mounted_servers": [],
  "can_delete": true,
  "owned_by_server_owner": true,
  "completed_at": null,
  "created_at": "2026-09-14T16:42:09.000000Z",
  "download_progress": 0,
  "download_started_at": null
}
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `422`: A field is missing or invalid, or the resource cannot accept this change in its current state. Check `message` for details. Field validation also includes an `errors` object keyed by field name.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/isos' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Debian 12.7 netinst",
  "link": "https://cdimage.debian.org/debian-cd/12.7.0/amd64/iso-cd/debian-12.7.0-amd64-netinst.iso"
}'
```
