---
title: "Set default anon key"
method: POST
path: "/projects/{id}/anon-keys/{keyId}/set-default"
tags: ["Anon Keys"]
---

# Set default anon key

`POST /projects/{id}/anon-keys/{keyId}/set-default`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/anon-keys/{keyId}/set-default`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Promotes the given key to the project's configured default. At most one key per project can be default.

## Path parameters

- `id` string, uuid, required
- `keyId` string, uuid, required

## Response `200`

Key set as default

- AnonKey
  - `id` string, uuid, required
  - `project_id` string, uuid
  - `name` string, required
  - `key_value` string, required: JWT token - use this in frontend Authorization header
  - `permissions` string[]: Permissions granted to this anon key. Auth permissions: auth.signup, auth.signin, auth.refresh, auth.logout, auth.password_reset, auth.confirm_email, auth.resend_confirmation Storage permissions: storage.upload, storage.download, storage.list, storage.delete Realtime permissions: realtime.connect, realtime.subscribe, realtime.publish Functions permissions: functions.invoke
  - `is_default` boolean: Whether this is the project's configured default anon key. Only one key per project can be default.
  - `created_at` string, date-time

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Anon key not found
- `500`: Internal server error

## Changes

- **2026-10-07** `23e7875e7c4c`: 1 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
- **2026-09-19** `3a6f365f3f35`: 3 breaking, 9 info
  - added the new path request parameter `id`
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `500`
  - added the optional property `code` to the response with the `500` status
  - …8 more
- **2026-08-27** `bb44e98aba2e`: 6 breaking, 6 warning
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `500`
  - removed the required property `error` from the response with the `500` status
  - removed the required property `id` from the response with the `200` status
  - …8 more
- **2026-07-27** `bb52784e098a`: 1 info
  - added the optional property `code` to the response with the `500` status

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/anon-keys/:keyId/set-default/post.md)

---

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