Syndai Docs

Start a CLI device login

POST
/api/v1/cli/device

Open a device login (RFC 8628). Show user_code and open verification_uri_complete in a browser, where an owner or admin of the workspace approves it; poll POST /api/v1/cli/device/token every interval seconds until expires_in. scopes asks for a key with exactly those scopes (omit it for the owner CLI set); members and unpublish scopes are never granted here.

Request Body

application/json
  1. body
client_name?|null
host?|null
scopes?array<string>|
Itemsitems <= 64

Response Body

Request fulfilled, document follows

application/json
  1. response
device_code*string
expires_in*integer
interval*integer
user_code*string
verification_uri*string
verification_uri_complete*string
Example Request
curl -X POST 'https://api.syndai.ai/api/v1/cli/device' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "device_code": "string",  "expires_in": 0,  "interval": 0,  "user_code": "string",  "verification_uri": "string",  "verification_uri_complete": "string"}