---
title: "Poll for credential delivery (agent)"
method: POST
path: "/v1/credentials/poll"
tags: ["credentials"]
---

# Poll for credential delivery (agent)

`POST /v1/credentials/poll`

## Request

- Base URL: `https://agentlair.dev`
- URL: `https://agentlair.dev/v1/credentials/poll`
- Auth: HTTP bearer

The agent polls with its `device_code` to check whether the operator has approved or denied the request. When status is `approved`, the `credential` field contains the one-time-delivered secret — it is deleted from AgentLair storage immediately after this response. Recommended interval: 5 seconds (as returned in the request response).

## Request body

- object
  - `device_code` string, required: The device code returned by POST /v1/credentials/request

## Response `200`

Poll result

- object
  - `status` 'pending' | 'approved' | 'denied' | 'expired' | 'slow_down': Current status of the credential request
  - `credential` string: The credential value. Present only when status is `approved`. One-time delivery — not recoverable after this response.
  - `interval` integer: Present only when status is `slow_down`. New recommended polling interval in seconds.

## Other responses

- `400`: Missing device_code
- `401`: Authentication required
- `403`: Device code does not belong to authenticated account

---

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