---
title: "Set Tenant Personalization"
method: PUT
path: "/api/v1/tenants/{tenant_id}/personalization"
tags: ["tenants"]
---

# Set Tenant Personalization

`PUT /api/v1/tenants/{tenant_id}/personalization`

## Request

- Base URL: `https://api.aws.cognee.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.aws.cognee.ai/api/v1/tenants/{tenant_id}/personalization`
- Auth: API key in header `X-Api-Key`

Turn per-user preference personalization on or off for this workspace.

Owner or admin only: it changes what every member's recalls do. The
value is pinned on the workspace's Tenant CR and applied by the tenant
operator as a config change. When the requested value equals the fleet
value (which the control plane reads off the operator's forwarded
config, so it is the real one), the pin is *cleared* instead and the
workspace follows the fleet again — a fleet-wide switch keeps reaching
it.

**The workspace pod is killed and recreated.** The tenant chart deploys
with `strategy: Recreate` and no termination grace period, so the pod
is gone within 30 s of the call: in-flight requests fail, and a
running cognify is interrupted and rolled back on the next boot
(`recover_stale_pipeline_runs`), so its documents have to be
processed again. Warn the user before flipping this while an ingest
is running. The new value is live after that restart, not on return,
and a second flip is refused (409) until that restart has settled.
Turning it off stops reading and writing preferences; preference data
already stored is kept.

## Request Body
`{"enabled": bool}`

## Response
`{"tenant_id": str, "enabled": bool, "overridden": bool, "changed": bool}` —
`enabled` is the effective value now, `overridden` is false when the
workspace follows the fleet value, `changed` is false when nothing had
to be written.

## Error Codes
- **403 Forbidden**: caller is neither the owner nor an admin of this tenant
- **404 Not Found**: unknown tenant, or no Tenant CR exists for it
- **409 Conflict**: the workspace is scheduled for deletion, or suspended
  on its Tenant CR (the operator does not reconcile either, so the
  restart would not happen); or its previous change is still rolling
  out (one restart at a time — retry once it is back up); or another
  change to the workspace raced this one — retry
- **502 Bad Gateway**: the control plane rejected or could not serve the request
- **503 Service Unavailable**: caller is not the owner, and the workspace
  could not be reached to confirm they are an admin

## Path parameters

- `tenant_id` string, uuid, required

## Request body

- PersonalizationSettingDTO
  - `enabled` boolean, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cognee/apis/cognee-api.md) - [All operations](https://skmtc.dev/cognee/apis/cognee-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cognee/apis/cognee-api/revisions/a7b6c6cb8212?raw)
