POST /api/v1/hosts/pairings/poll
Operation: pollHostPairing.
Poll a pairing (installer; needs poll_secret)
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.
Endpoint
Section titled “Endpoint”POST https://amplerun-api.spiry.org/api/v1/hosts/pairings/poll
Authentication
Section titled “Authentication”No default Bearer requirement is declared for this operation. Read its description for wallet signatures, host enrollment or other specialized proofs.
Request body
Section titled “Request body”Required body.
application/json
Section titled “application/json”| Field | Type | Presence | Description |
|---|---|---|---|
pairing_id | UUID | Required | |
poll_secret | string | Required |
{ "type": "object", "additionalProperties": false, "required": [ "pairing_id", "poll_secret" ], "properties": { "pairing_id": { "$ref": "#/components/schemas/UUID" }, "poll_secret": { "type": "string", "maxLength": 200 } }}Responses
Section titled “Responses”Pairing state.
application/json
| Field | Type | Presence | Description |
|---|---|---|---|
status | “pending” / “expired” / “approved” / “consumed” | Required | |
enrollment_token | string | Optional | Only with status approved |
expires_at | Rfc3339Utc | Optional | |
go_live | boolean | Optional | |
machine | object | Optional |
{ "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "pending", "expired", "approved", "consumed" ] }, "enrollment_token": { "type": "string", "description": "Only with status approved", "exactly once.": null }, "expires_at": { "$ref": "#/components/schemas/Rfc3339Utc" }, "go_live": { "type": "boolean" }, "machine": { "type": "object", "nullable": true, "required": [ "machine_id", "live", "error" ], "properties": { "machine_id": { "$ref": "#/components/schemas/UUID" }, "live": { "type": "string", "enum": [ "waiting", "live", "failed", "off" ] }, "error": { "type": "string", "nullable": true } } } }}default
Section titled “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.
application/json
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required |
{ "$ref": "#/components/schemas/ErrorEnvelope"}Static request outline
Section titled “Static request outline”Replace path/query placeholders and provide the required JSON body, headers and credential from the sections above. This is a request outline, not a command that chooses an amount or starts a rental for you.
curl --request POST 'https://amplerun-api.spiry.org/api/v1/hosts/pairings/poll'Schema definitions · Download OpenAPI · Authentication · Errors and recovery
Official AmpleRun documentation · Contract v3 · Generated from the API contract · Revision 52fe29de · Open AmpleRun · View Markdown · For agents