Device flow
POST
/v1/device/code
Device Code
Request body (application/json, required)
| Member | Type | Notes |
|---|---|---|
client required |
string (pattern ^[a-z][a-z0-9-]{0,31}$)
|
e.g. senv |
client_version |
string (max length 64) | null
|
|
mode |
"live" | "test"
|
Default "live".
|
name |
string (max length 100) | null
|
Name for the key the human approves |
Responses
- 201 DeviceCodeOut (application/json): Successful Response
- 422 ProblemDetails (application/problem+json): Request schema or semantic validation failed; inspect type and detail.
- 429 ProblemDetails (application/problem+json): /problems/rate-limited; retry after Retry-After seconds.
- 500 ProblemDetails (application/problem+json): /problems/engine-error
- default ProblemDetails (application/problem+json): API error; type identifies the stable problem.
Problem types and recovery steps: error reference.
POST
/v1/device/token
Device Token
Request body (application/json, required)
| Member | Type | Notes |
|---|---|---|
device_code required |
string (min length 16, max length 128)
|
Responses
- 200 DeviceTokenOut (application/json): Successful Response
- 422 ProblemDetails (application/problem+json): Request schema or semantic validation failed; inspect type and detail.
- 429 ProblemDetails (application/problem+json): /problems/rate-limited; retry after Retry-After seconds.
- 500 ProblemDetails (application/problem+json): /problems/engine-error
- default ProblemDetails (application/problem+json): API error; type identifies the stable problem.
Problem types and recovery steps: error reference.