# Poll a key request

> Public. `pending` until the user approves, then `approved` with the key, once. `denied` and `expired` are terminal. If the claim response was lost, poll again with `revokeClaimed: true` to revoke the key you never received.

### POST /v1/keys/poll

**Poll a key request**

Public. `pending` until the user approves, then `approved` with the key, once. `denied` and `expired` are terminal. If the claim response was lost, poll again with `revokeClaimed: true` to revoke the key you never received.

Auth: none (public).

Request body (application/json):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `deviceCode` | string | yes |  |
| `revokeClaimed` | boolean | no |  |

Responses:

| Status | Meaning |
| --- | --- |
| 200 | The request's state. |
| 400 | Invalid body. |
| 404 | Unknown device code. |
| 429 | Rate limited: 60 requests a minute per address. Carries Retry-After. |

Response body (200):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | enum | yes | One of: `pending`, `approved`, `claimed`, `denied`, `expired`. |
| `apiKey` | string | no |  |

Example (curl):

```bash
curl -X POST https://api.raylight.app/v1/keys/poll \
  -H "Content-Type: application/json" \
  -d '{ "deviceCode": "1aSs9fWUrhEUu3hOo5TzSJfWDgradXEK_k9BIV67XV8" }'
```

## More

- Previous: [Start a device-code key request](https://www.raylight.app/docs/reference/post-v1-keys-request.md)
- Next: [Revoke the key making the call](https://www.raylight.app/docs/reference/delete-v1-keys-current.md)
- All docs: https://www.raylight.app/llms.txt
- Everything in one file: https://www.raylight.app/llms-full.txt
- OpenAPI: https://api.raylight.app/v1/openapi.json
