---
title: "Get device code status"
method: POST
path: "/agents/device-codes/status"
tags: ["Agent Management"]
---

# Get device code status

`POST /agents/device-codes/status`

## Request

- Base URL: `https://api.lightspark.com/grid/2025-10-13`
- URL: `https://api.lightspark.com/grid/2025-10-13/agents/device-codes/status`
- Auth: HTTP basic

Check the status of a device code. Use this to poll for agent installation completion after creating an agent.

## Request body

- AgentDeviceCodeRequest
  - `code` string, required: The device code.

## Response `200`

Successful operation

- AgentDeviceCodeStatusResponse
  - `code` string, required: The device code.
  - `status` 'PENDING' | 'REDEEMED' | 'EXPIRED' | 'INVALIDATED', required: The current status of the device code. - `PENDING`: The code is active and has not been redeemed. - `REDEEMED`: The code was successfully redeemed. - `EXPIRED`: The code expired before it was redeemed. - `INVALIDATED`: The code was superseded or otherwise invalidated before it was redeemed.
  - `redeemed` boolean, required: Whether this device code was successfully redeemed. This is false for expired or invalidated codes.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden - Agents API is not enabled for the platform
- `404`: Device code not found
- `500`: Internal service error

## Changes

> 115 revisions in range; 2 not diffed.

- **2026-10-28** `d996ddfb9d2b`: 3 info
  - added the optional property `details/permission` to the response with the `403` status
  - added the optional property `details/policyDenialReason` to the response with the `403` status
  - added the optional property `details/refusalReason` to the response with the `403` status
- **2026-10-28** `5abf2bb56bcb`: 1 warning
  - added the new `CORRIDOR_UNDER_MAINTENANCE` enum value to the `code` response property for the response status `403`
- **2026-10-18** `add40cac0f84`: 1 warning
  - added the new `DESTINATION_NOT_ALLOWED` enum value to the `code` response property for the response status `403`
- **2026-10-14** `6875d86545f1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lightsparkdev/apis/grid-api/changes/agents/device-codes/status/post.md)

---

[API](https://skmtc.dev/lightsparkdev/apis/grid-api.md) - [All operations](https://skmtc.dev/lightsparkdev/apis/grid-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lightsparkdev/apis/grid-api/revisions/7a1db46ec552?raw)
