---
title: "[Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible."
method: PUT
path: "/v1/projects/{ref}/pgsodium"
tags: ["Secrets"]
---

# [Beta] Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.

`PUT /v1/projects/{ref}/pgsodium`

## Path parameters

- `ref` string, required

## Request body

- UpdatePgsodiumConfigBody
  - `root_key` string, required

## Response `200`

- PgsodiumConfigResponse
  - `root_key` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden action
- `429` — Rate limit exceeded
- `500` — Failed to update project's pgsodium config

---

[API](https://skmtc.dev/supabase/apis/management-api.md) · [All operations](https://skmtc.dev/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/management-api/revisions/a7cb39418064/schema)
