credentials

Approve or deny a credential request (operator)

The operator approves or denies a pending credential request. Requires vault_key (the vault slot to store the credential) and operator_email (must match the account's registered email for binding). If approved is true, credential_value must also be provided — this is the actual secret that will be one-time-delivered to the agent on next poll. If approved is false, the agent will receive a denied status on next poll.

post/v1/credentials/approve

Request

  • Base URL: https://agentlair.dev
  • URL: https://agentlair.dev/v1/credentials/approve
  • Auth: HTTP bearer

Request body

user_codestring required

The user code shown by the agent (format: XXXX-XXXX)

approvedboolean required

Whether to approve (true) or deny (false) the request

vault_keystring required

The vault key name where the credential will be stored. Pre-populated from the agent's request — the operator may change it.

operator_emailstring email required

The operator's email address. Must match the account's registered operator_email for binding/security validation.

credential_valuestring

The actual credential value to deliver to the agent. Required when approved is true.

Example request

{
  "user_code": "ABCD-1234",
  "vault_key": "openai-api-key",
  "operator_email": "operator@example.com",
  "credential_value": "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response

Request approved or denied

status'approved' | 'denied'
messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.