Browse documentation
Declare a key
Declares a key on this agent. Its value goes to encrypted storage and is never returned. A refusal names the field in param; a name the agent already has, as a key or a variable, is refused with 409. A key's exact hosts join the agent's allowed hosts for every Turn that holds its badge, so declaring one requires agents:write as well as env_vars:write; without either it is refused with 403.
/agents/{agentId}/keysAuthorization
AuthorizationBearer <token>Path parameters
agentIdstringrequired- format
"uuid"
Headers
Salambo-ClientstringWhich published Salambo client sent the request, as cli/<version> or
sdk/<version>. The CLI and SDK send it on every request; a request
without it, or with a value in another shape, is served as usual.
The API refuses a CLI below its minimum supported version with 426.
- maxLength
100
Bodyrequired
A fixed key takes value. Traded (refreshToken, optional clientSecret) and signed (privateKey) keys take a recipe and are refused while key renewal is not available. Hosts are public hostnames: no IP address, port or path, no private name (localhost, .local, .internal, .arpa); a wildcard only as *.example.com. A wildcard host never joins the agent's allowed hosts: it is reachable only where the agent's own list covers it.
object1
namestringrequired- pattern
"^[A-Z][A-Z0-9_]*$"- maxLength
100
allowedHostsarrayrequired- minItems
1- maxItems
20
Show nested schema
forGitbooleanGit uses the key on each of its hosts but the wildcards.
- default
false
object2
kindstringrequired- enum
["fixed","traded","signed"]
valuestring- minLength
1- writeOnly
true
refreshTokenstring- minLength
1- writeOnly
true
clientSecretstring- minLength
1- writeOnly
true
privateKeystring- minLength
1- writeOnly
true
recipeobjectHow the broker trades or signs the key: token URL (HTTPS, public), form fields, headers, JWT claims and response mapping. Holds no secret; a field points at the key's value with { "from": "refresh_token" }.
Additional properties are allowed.
Response
The declared key, without its value
idstringrequired- format
"uuid"
objectstringrequired- const
"agent_key"
namestringrequiredkindstringrequired- enum
["fixed","traded","signed"]
allowed_hostsarrayrequiredShow nested schema
git_scopesarrayrequiredThe hosts, and optionally repository owners, git uses this key for.
Show nested schema
hoststringrequiredownerstring | nullrequiredstatusstringrequired- enum
["active","needs_new_token"]
value_updated_atintegerrequiredlast_used_atinteger | nullrequiredcreated_atintegerrequiredupdated_atintegerrequired