PUT/api/orgs/{org_id}/retention

Set the default expiry

Stored content expires this many days after capture (1 to 3,650). null keeps it while storage is on. Shortening applies to content already stored. Org admins and the organization's own key.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

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

Request body

  • default_daysinteger | nullrequired

    1 to 3,650, or null.

Responses

  • 200

    Settings.

    Response
    • storage_onboolean

      Whether the organization stores prompts and responses.

    • default_daysinteger | null

      Days until stored content expires; null keeps it while storage is on.

    • min_daysinteger
    • plan_max_daysinteger | null

      The plan's longest expiry; null for no maximum.

    • planstring
    • paid_retentionobject
      paid_retention
      • activeboolean
      • upgrade_max_daysinteger | null
      • upgrade_hrefstring
    • fixed_retention_daysinteger | null

      Set when a written contract fixes expiry; the other settings are then read-only.

    • overridesarray<object>
      overrides
      • idstring
      • scopeenum
        "project""request_tag""trace_tag"
      • targetstring
      • target_labelstring
      • daysinteger
      • created_atstring
    • key_capsinteger

      Keys with their own expiry cap.

    • keepsobject
      keeps
      • requestsinteger
      • sessionsinteger
    • archiveobject

      The archive of content for Experiential's own use. Not offered yet.

      archive
      • offeredboolean
      • opted_inboolean
      • excluded_becausearray<string>
      • default_onboolean
  • 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).

  • 409

    A written retention contract fixes this organization's expiry (fixed_retention).

    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

    Days out of range (days_out_of_range) or over the plan's maximum (expiry_exceeds_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).

Request

curl -X PUT 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/retention' \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "default_days": 30
}'

Response

{
  "storage_on": true,
  "default_days": 30,
  "min_days": 1,
  "plan_max_days": null,
  "plan": "pro",
  "paid_retention": {
    "active": true,
    "upgrade_max_days": null,
    "upgrade_href": "/credits?upgrade=pro"
  },
  "fixed_retention_days": null,
  "overrides": [
    {
      "id": "e1d2c3b4-a5f6-4e7d-8c9b-0a1f2e3d4c5b",
      "scope": "project",
      "target": "evals",
      "target_label": "evals",
      "days": 7,
      "created_at": "2026-11-18T14:32:07Z"
    }
  ],
  "key_caps": 1,
  "keeps": {
    "requests": 3,
    "sessions": 1
  },
  "archive": {
    "offered": false,
    "opted_in": false,
    "excluded_because": [],
    "default_on": false
  }
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/retention