---
title: "Get workspace flags"
method: POST
path: "/v2/workspace.getFlags"
tags: ["workspace"]
---

# Get workspace flags

`POST /v2/workspace.getFlags`

## Request

- Base URL: `https://api.unkey.com`
- URL: `https://api.unkey.com/v2/workspace.getFlags`
- Auth: HTTP bearer

Get feature flags for the workspace associated with your credentials.

Each flag is keyed by its slug and includes its current value, description,
and whether it can be enabled or disabled. A workspace-specific value takes
precedence over the flag's default. If no flags are available, `data` is an
empty object.

This endpoint takes no request body.
**Required Permissions**

Your root key must have the following permission:
- `unkey:v1:<workspace_id>:flags#read`

## Response `200`

Workspace flags keyed by slug, or an empty object when no flags are available.

- V2WorkspaceGetFlagsResponseBody
  - `meta` Meta, required: Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
    - `requestId` string, required: A unique id for this request. Always include this ID when contacting support about a specific API request. This identifier allows Unkey's support team to trace the exact request through logs and diagnostic systems to provide faster assistance.
  - `data` object, required: Flags keyed by their lowercase snake_case slugs. Empty when no flags are available.

## Other responses

- `400`: Bad request, including a missing Authorization header.
- `401`: Unauthorized
- `403`: Forbidden - Requires `unkey:v1:<workspace_id>:flags#read`.
- `429`: Too Many Requests
- `500`: Internal server error

## Changes

- **2026-10-13** `ea655ceb16a3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/unkeyed/apis/unkey-api/changes/v2/workspace.getFlags/post.md)

---

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