/api/orgs/{org_id}/keys/{key_id}/storageSet a key's storage setting
Tighten only: do_not_store stores nothing the key sends or receives, and follow stores what the organization stores, with an optional expiry_days cap (1 to 3,650) that can only shorten expiry. No setting stores more than the organization allows. Takes effect within seconds.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.key_idstringrequiredThe API key id.
Request body
modeenumrequiredfollowstores what the organization stores;do_not_storestores nothing for this key.expiry_daysinteger | null1 to 3,650; only shortens expiry.
Responses
200The setting.
Response
key_idstringmodeenumfollowstores what the organization stores;do_not_storestores nothing for this key.expiry_daysinteger | nullThe key's expiry cap.
org_storage_onbooleanorg_default_daysinteger | nullmax_expiry_daysintegereffectiveobjectWhat the key does today.
effective
storesbooleanexpiry_daysinteger | null
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422The expiry cap is out of range or over the plan's maximum.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
Request
curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/keys/6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33/storage' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"mode": "do_not_store"
}'Response
{
"key_id": "6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33",
"mode": "do_not_store",
"expiry_days": null,
"org_storage_on": true,
"org_default_days": 30,
"max_expiry_days": 3650,
"effective": {
"stores": false,
"expiry_days": null
}
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/keys/6b1d2f4e-3c8a-4f0e-9a21-7e5c0d9b4a33/storage