---
title: "Approve a pairing code (verified session, or an API key with the host scope)"
method: POST
path: "/api/v1/hosts/pairings/approve"
tags: ["hosts"]
---

# Approve a pairing code (verified session, or an API key with the host scope)

`POST /api/v1/hosts/pairings/approve`

## Request

- Base URL: `https://amplerun-api.spiry.org`
- URL: `https://amplerun-api.spiry.org/api/v1/hosts/pairings/approve`
- Auth: HTTP bearer

The consent step of one-line host onboarding. Applies the same hosting rules as createEnrollmentToken (verified email, host scope, admin block, new-host cap; the first use turns hosting on). go_live (default true) lists the machine's seeded offer, unverified, on its first healthy heartbeat through the same path as listMachine with x-accept-unverified, paid-admission guard included. Audited. Wrong codes are limited as in lookup.

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- object
  - `user_code` string, required
  - `go_live` boolean

## Response `200`

Approved.

- object
  - `approved` unknown, required
  - `go_live` boolean, required
  - `summary` object, required

## Other responses

- `default`: Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

---

[API](https://skmtc.dev/amplerun/apis/amplerun-business-api.md) · [All operations](https://skmtc.dev/amplerun/apis/amplerun-business-api/llms.txt) · [OpenAPI document](https://skmtc.dev/amplerun/apis/amplerun-business-api/revisions/40944687fa52?raw)
