API reference
Change a tool credential
PATCH /v1/vault/secrets/{secret_id}
Send a new value, a new name or label, or the whole list of projects that may use it. A new value is used from the next request any tool makes. Needs vault:write and a live key.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
secret_id |
path | string (uuid) | Yes |
Body
Sent as JSON. A field this operation does not take is refused, so a typo fails loudly.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string or null | No | |
project_ids |
array of string (uuid) or null | No | The whole list of projects again. |
provider |
string or null | No | Your own label for whose it is. |
secret |
string or null | No | A new value, replacing the old. |
Answer
200 with VaultSecretObject.
Errors
Every error is a problem document with a stable code.
| Status | When |
|---|---|
401 |
The key is missing, mistyped, unknown, revoked or expired. |
403 |
The key lacks a permission, a live key was sent from a browser, or the organization is frozen and the request would change something. |
404 |
This key reaches no such credential, or a project named is not here. |
409 |
The credential is revoked, or another one has that name. |
422 |
Validation Error |
429 |
Too many requests for this key or its organization; see Retry-After. |
500 |
Something went wrong on our side. Quote the request_id to support. |
Examples
#!/bin/sh
# Rotate a tool credential. Tools send the new value from their next request.
curl -sS --fail-with-body -X PATCH "https://api.aigently.ai/v1/vault/secrets/2e4a6c8e-0a2c-4e4a-d6c8-e0a2c4e6a8ca" \
-H "Authorization: Bearer $AIGENTLY_API_KEY" \
--json '{
"secret": "your-new-orders-api-token"
}'
Try it
Sends this request to the API from your browser, with a test key. Nothing it does rings a phone.