PUT/api/orgs/{org_id}/keys/{key_id}/storage

Set 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_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

  • key_idstringrequired

    The API key id.

Request body

  • modeenumrequired

    follow stores what the organization stores; do_not_store stores nothing for this key.

    "follow""do_not_store"
  • expiry_daysinteger | null

    1 to 3,650; only shortens expiry.

Responses

  • 200

    The setting.

    Response
    • key_idstring
    • modeenum

      follow stores what the organization stores; do_not_store stores nothing for this key.

      "follow""do_not_store"
    • expiry_daysinteger | null

      The key's expiry cap.

    • org_storage_onboolean
    • org_default_daysinteger | null
    • max_expiry_daysinteger
    • effectiveobject

      What the key does today.

      effective
      • storesboolean
      • expiry_daysinteger | null
  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 403

    The 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
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    The resource does not exist or belongs to another organization.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 422

    The expiry cap is out of range or over the plan's maximum.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-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