---
title: "Poll a pairing (installer; needs poll_secret)"
method: POST
path: "/api/v1/hosts/pairings/poll"
tags: ["hosts"]
---

# Poll a pairing (installer; needs poll_secret)

`POST /api/v1/hosts/pairings/poll`

## Request

- Base URL: `https://amplerun-api.spiry.org`
- URL: `https://amplerun-api.spiry.org/api/v1/hosts/pairings/poll`
- Auth: none required

pending, expired, approved (once, with a fresh single-use 10-minute enrollment token for POST /api/v1/agents/enroll; the pairing is consumed in the same transaction after the approver's hosting rules are re-checked), then consumed (no token; the enrolled machine's Go-live state). A wrong pairing_id or poll_secret is 404.

## Request body

- object
  - `pairing_id` string, uuid, required
  - `poll_secret` string, required

## Response `200`

Pairing state.

- object
  - `status` 'pending' | 'expired' | 'approved' | 'consumed', required
  - `enrollment_token` string: Only with status approved
  - `expires_at` string, date-time
  - `go_live` boolean
  - `machine` object, nullable
    - `machine_id` string, uuid, required
    - `live` 'waiting' | 'live' | 'failed' | 'off', required
    - `error` string, nullable, 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)
