---
title: "Ask for a hosted machine for the signed-in account"
method: POST
path: "/api/managed/allocation"
tags: ["nodes"]
---

# Ask for a hosted machine for the signed-in account

`POST /api/managed/allocation`

## Request

- Base URL: `https://app.nerdit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.nerdit.ai/api/managed/allocation`
- Auth: none declared

Create the account's allocation, or answer the one it already has.

Idempotent on the account: one allocation per account, decided under
the account lock, so a double click or a retry answers ``200`` with the
same row. A ``failed`` allocation with no sandbox is replaced by a
new one (``201``, a new id).

D-19: an account that is not paid gets a one-hour ``trial`` box
instead, while it has trials left (else ``403 trial_quota_used``) and
a trial place is free (else ``409 trial_boxes_busy``, worth retrying).

## Response `200`

The existing allocation

- ManagedAllocationView: One hosted machine's progress, without any provider detail.
  - `id` string, uuid, required
  - `state` string, required
  - `failure_code` string, nullable, required
  - `node_id` string, uuid, nullable, required
  - `created_at` string, date-time, required
  - `ready_at` string, date-time, nullable, required
  - `kind` 'paid' | 'trial', required
  - `expires_at` string, date-time, nullable, required
  - `sleeps_after_idle_minutes` integer, nullable, required

## Other responses

- `201`: Successful Response
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict

---

[API](https://skmtc.dev/nerdit/apis/nerdit-cloud-web.md) · [All operations](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/llms.txt) · [OpenAPI document](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/revisions/06e3b44b58be?raw)
