Skip to content

Keep an agent's own value for a secret

PUT
/api/v1/agents/{name}/accounts/{secret}
curl --request PUT \
--url http://localhost:11044/api/v1/agents/example/accounts/example \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "value": "example" }'

Sent instead of its sponsor’s on an API where the agent’s identity is own-account.

name
required
string

The agent’s name

secret
required
string

The secret’s name, as the realm’s key declares it

value is the agent’s own credential for this secret, kept as an API key in the caller’s wallet and sent instead of the sponsor’s; it replaces any value the agent already had, and is never returned

Media typeapplication/json

The agent’s own value for a secret, sent to PUT /agents/{name}/accounts/{secret}

object
value
required

The secret value itself, kept as an API key and sent instead of the sponsor’s on an own-account API; never returned

string

Example generated

{
"value": "example"
}

The secrets it now has its own value for

Media typeapplication/json

The secrets an agent keeps its own value for, by name only; answered by the /agents/{name}/accounts endpoints

object
agent
required

Name of the agent

string
secrets
required

Names of the secrets the agent has its own value for, as the realm’s keys declare them, sorted; the values are never returned

Array<string>

Example generated

{
"agent": "example",
"secrets": [
"example"
]
}

No authenticated principal

One of:

A refusal with a machine-readable code and a plain-language message. ApiErrorAdvice answers it for a failed validation, a missing resource or a conflicting state, and some controllers answer it directly

object
code
required

Machine-readable key to branch on, such as validation_failed, unknown_field, not_found or conflict. Open: a surface may answer codes of its own

string
detail

Extra context where there is some, such as the fields a body may carry; null otherwise

string
message
required

A plain-language explanation, written to be shown. Never carries an exception message

string

Example generated

{
"code": "example",
"detail": "example",
"message": "example"
}