---
title: "Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found."
method: PUT
path: "/v1/projects/{ref}/api-keys/legacy"
tags: ["Secrets"]
---

# Disable or re-enable JWT based legacy (anon, service_role) API keys. This API endpoint will be removed in the future, check for HTTP 404 Not Found.

`PUT /v1/projects/{ref}/api-keys/legacy`

## Path parameters

- `ref` string, required

## Query parameters

- `enabled` boolean, required

## Response `200`

- LegacyApiKeysResponse
  - `enabled` boolean, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden action
- `429` — Rate limit exceeded

---

[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)
