Skip to content

Change where an agent you connected works

PATCH
/api/v1/keys/{id}
curl --request PATCH \
--url http://localhost:3000/api/v1/keys/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "projects": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "scope": "propose" }'

Its projects and its scope, as the consent screen gives them: the scope is brought down, in each project, to the most you may give there. It keeps its secret, so the agent doesn’t sign in again. Only your own agents.

Scope: read.

id
required
string

Key id

Media typeapplication/json
object
projects
required
Array<string>
>= 1 items <= 100 items
scope
required
string
Allowed values: propose read write

The agent, as it is now

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
name
required
string
projects
required

Where it works, the first where a call without project goes

Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
name
required
string
organization
required
string
scope
required
string
Allowed values: read propose write admin
givable
required

Every project you could give it, with the most you may give there

Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
name
required
string
organization
required
string
max
required
string
Allowed values: propose read write
Example
{
"data": {
"projects": [
{
"scope": "read"
}
],
"givable": [
{
"max": "propose"
}
]
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}