Reference

Approve login

Approves a sign-in the CLI started: its key starts to work, with this scope.

POST
/logins/{code}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

code*string
Match^[A-HJ-NP-Z2-9]{4}-[A-HJ-NP-Z2-9]{4}$/i

Request Body

application/json
  1. body
environment*|

The environment the key works in. Null for every one: organization admins only.

Match^[A-Za-z0-9_-][A-Za-z0-9._-]{0,99}$
role*Role

What a caller may do. read: files and history. write: also fork, commit and merge. admin: also keys, namespaces, protected branches and the audit log.

Value in"read""write""admin"

Response Body

The key.

application/json
  1. response
id*string
name*string
role*Role

What a caller may do. read: files and history. write: also fork, commit and merge. admin: also keys, namespaces, protected branches and the audit log.

Value in"read""write""admin"
environment*string|null
Example Request
curl -X POST 'https://example.com/v1/logins/string' \  -H 'Content-Type: application/json' \  -d '{  "environment": "string",  "role": "read"}'
Example Response
{  "id": "string",  "name": "string",  "role": "read",  "environment": "string"}