curl --request PUT \
--url https://api.arg.ai/api/organizations/{orgId}/secrets/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'import requests
url = "https://api.arg.ai/api/organizations/{orgId}/secrets/{name}"
payload = { "value": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: '<string>'})
};
fetch('https://api.arg.ai/api/organizations/{orgId}/secrets/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Create or rotate a secret
Store a credential under a name, or replace the value already stored there. The value is write-only - nothing ever reads it back, so rotating is the only way to change it. Omitted fields are preserved, so a rotation cannot loosen how agents may use the secret. Organizations outside the feature rollout answer 404.
curl --request PUT \
--url https://api.arg.ai/api/organizations/{orgId}/secrets/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'import requests
url = "https://api.arg.ai/api/organizations/{orgId}/secrets/{name}"
payload = { "value": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: '<string>'})
};
fetch('https://api.arg.ai/api/organizations/{orgId}/secrets/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Send value, agentAccess, or both. Sending neither is an error.
The credential to store. Write-only: no response ever returns it.
Whether an agent may spend this secret unattended. approval asks a person on each use; never refuses every agent. Omit to keep the stored setting. Only the owner can change it.
auto, approval, never Response
Successful response
The response is of type object.