---
title: "Claim a computer published without an account"
description: "Moves a computer published without an account to the caller's account, when claim_key is the key its publish returned."
canonical: "https://www.cool.computer/docs/api-reference/publishing/claim-a-computer-published-without-an-account"
---
# Claim a computer published without an account

> Moves a computer published without an account to the caller's account, when claim_key is the key its publish returned.

```http
POST https://api.cool.computer/api/computers/{id}/claim
```

Moves a computer published without an account to the caller's account, when claim_key is the key its publish returned. The computer keeps its ID, name, URL and releases; its expiry and claim key are cleared, so the key stops working. It counts toward the caller's published storage limit, toward a Free account's 20 sites (403 site_limit_reached), and, like creating a site, toward the 100 sites an account creates or claims in any 24 hours while they remain sites (429 artifact_creation_rate_exceeded). Claiming a computer the caller already claimed returns it again. A wrong key answers 404, like a computer that does not exist; a computer that expired or was claimed by another account answers 409 claim_unavailable.

## Authorization

- A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

## Parameters

- `id` (path, string, at least 1 characters, required): The computer's name, such as agent-atlas, or its id (cmp_…). Every caller may use either, the computer's own runtime token included.

## Request body

Required.

- `application/json` (object)
  - `claim_key` (string, at least 1 characters, required): The claim_key a publish without an account returned.

## Responses

- `200`: The claimed computer.
  - `application/json` (object)
    - `computer` (object, required)
      - `id` (string, required)
      - `hostname` (string, required)
      - `name` (string, required)
      - `ip` (string, required)
      - `status` (string, required): artifact (no VM), creating, running, stopped while its account's Pro has lapsed (its VM is stopped and deleted at auto_delete_at unless Pro returns; once Pro returns it can show running briefly until the reconciler has started its VM), or deleting from when its deletion begins until it is gone.
      - `url` (string, uri)
      - `email_address` (string, email)
      - `visibility` ("private" or "public", required)
      - `access` ("owner" or "can_use" or "claim_key", required): What the caller holds: owner, can_use for a computer shared with them, or claim_key in the response to a publish without an account, whose claim key republishes to the computer and claims it.
      - `copy_enabled` (boolean, required): People other than the owner may copy the computer into their own accounts (PUT /api/computers/{id}/copy-settings).
      - `site` (boolean, required): The URL serves the computer's published files: from the edge, or from its VM's built-in site server until a port is first exposed, when the program on it takes every path but the functions' for good.
      - `network_policy` (object, required): Outbound access policy. open allows public destinations, none blocks outbound access, and allowlist permits only the named public hosts. Private and reserved addresses remain blocked.
        - `mode` ("open" or "none" or "allowlist", required)
        - `allowed_hosts` (array of string, at most 100 items): Required and non-empty only when mode is allowlist. Each value is a hostname, public IP, or leading wildcard such as \*.example.com, without a scheme, port, path, or CIDR.
      - `created_at` (string, date-time, required)
      - `auto_delete_at` (string or null, date-time): When the computer is deleted by itself: its own auto-delete deadline, or, for a VM of an account whose Pro lapsed, when its stopped VMs are deleted, whichever comes first.
      - `creation_mode` (string)
- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden. `site_limit_reached`: a Free account holds at most 20 sites; delete one or upgrade to Pro.
- `404`: Not Found. No unclaimed computer has this ID and claim key.
- `409`: Conflict. `claim_unavailable`: the computer expired, or another account claimed it.
- `413`: Payload Too Large. `storage_quota_exceeded`: with this computer the account's published content would pass its storage limit.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit. artifact_creation_rate_exceeded means the account has 100 counted site admissions in the last 24 hours; a site gaining its VM removes an admission; context.retry_at and Retry-After say when the oldest counted admission expires if no site gains its VM first.
- `500`: Internal Server Error.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X POST "https://api.cool.computer/api/computers/$PARAM_ID/claim" \
  -H "authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data '{"claim_key":"string"}'
```
