Skip to main content
POST
Regenerate a device code

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Path Parameters

agentId
string
required

System-generated unique agent identifier

Response

New device code generated successfully

code
string
required

Device code used to install and connect the agent software: an opaque 22-character URL-safe base64 string encoding 128 random bits. It is returned only when it is issued, because Grid stores only a hash of it; if it is lost before it is redeemed, regenerate it. It can be redeemed once.

Example:

"jqzJR3AgI9OAwb_enypARw"

agentId
string
required

The agent this device code belongs to.

Example:

"Agent:019542f5-b3e7-1d02-0000-000000000001"

expiresAt
string<date-time>
required

Timestamp when this device code expires. Codes expire 15 minutes after they are issued by default; Grid can configure a platform's lifetime between 1 and 60 minutes.

Example:

"2025-07-22T17:32:28Z"

redeemed
boolean
required

Whether this device code has already been redeemed by the agent.

Example:

false