---
title: "Approve a device request under the signed-in account"
method: POST
path: "/api/nodes/device-approvals/approve"
tags: ["nodes"]
---

# Approve a device request under the signed-in account

`POST /api/nodes/device-approvals/approve`

## 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/nodes/device-approvals/approve`
- Auth: none declared

Grant a machine a place under this account, on the credential it pinned.

The standing assertion, the node limit, the create-or-adopt and the
compare-and-set are all one transaction inside
:func:`~nerdit_cloud.nodes.link.approve_device_request` — approval *is*
the browser consume of the ``NL-`` flow, relabelled (D-X16-O1), and it is
the mint-equivalent path, so an account that may not mint may not enroll a
machine by this door either (D-X16-O25).

The reported hostname is read here and passed down because it is the stem
of the node's slug: it is the *display* half of the row, and the policy
layer takes it as an argument rather than trusting it to be present.

## Request body

- DeviceApprovalRequest: The one thing all three routes take, and the only place it may travel.
  - `user_code` string, required

## Response `200`

Successful Response

- DeviceApprovalGrant: What an approval produced: the node the machine will come up as.
  - `node_id` string, uuid, required
  - `node_slug` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Too Many Requests

---

[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)
