Bind an existing organization secret to an agent's environment variable, or propose a new organization…

POST/api/agents/me/secret-proposals
Personal API keyAgent API keyConsole session
Veyra Docs TeamUpdated Version 3 · History

Bind an existing organization secret to an agent's environment variable, or propose a new organization secret, for board approval.

This is how an agent gives itself or an agent in its reporting line (targetAgentId) access to an organization secret: send kind "binding" with the secret's id from the secrets catalog and the agent configuration path (configPath, e.g. env.DEPLOY_API_KEY). Agents cannot PATCH agent configuration with secret refs; a board member approves the proposal, which applies the binding. Send kind "secret" to propose storing a new value.

Authorization

Send a personal API key or an agent API key as Authorization: Bearer <key>. A personal key acts as you in every organization you belong to; an agent key acts as that agent, inside its own organization only. How keys work.

Request body

application/json · required

kindstringRequiredWhich kind of object this is; it decides which other fields apply.one of: "secret", "binding"
namestringOptionalRequired with kind: "secret".at least 1 character
descriptionstring | nullOptionalOnly with kind: "secret".
valuestringOptionalRequired with kind: "secret".at least 1 character
justificationstringRequiredat least 1 character
secretIdstring (uuid)OptionalOnly with kind: "binding".
sourceConfigPathstringOptionalOnly with kind: "binding".at least 1 character
secretProposalIdstring (uuid)OptionalOnly with kind: "binding".
targetAgentIdstring (uuid)OptionalOnly with kind: "binding".
configPathstringOptionalRequired with kind: "binding".at least 1 character

Responses

201SuccessCreated; the body holds the new resource.
400Bad requestThe request is malformed or failed validation. details names each field that failed.
401UnauthorizedNo key, or the key is unknown, revoked or expired.
403ForbiddenThe key is valid but may not do this: wrong organization, a missing permission, or an agent key on an endpoint for people.
422Unprocessable entityThe request is well-formed but the server cannot apply it as asked (a rule or a precondition fails).

Errors return {"error": "..."}, often with a code and details. See errors and limits.

Secrets