---
title: "Get workspace limits"
method: POST
path: "/v2/workspace.getLimits"
tags: ["workspace"]
---

# Get workspace limits

`POST /v2/workspace.getLimits`

## Request

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

Get every limit of your workspace, with the current value against each
limit that has one.

Use this before an operation that a limit can reject, for example to see how
many custom domains or log drains remain, or how much CPU, memory, and disk
a new deployment can still reserve.

The request takes no parameters. Each limit has a `limit`, which is `null`
when unlimited, and a `current` value when the limit has one. Billable
operations count the current calendar month in UTC. The Compute limits are
present only when the workspace has a Compute plan.

**Required Permissions**

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

## Response `200`

The workspace limits and the current values against them.

- V2WorkspaceGetLimitsResponseBody
  - `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` V2WorkspaceGetLimitsResponseData, required: The workspace limits. The Compute limits are present only when the workspace has a Compute plan.
    - `apiBillableOperationsCountMaxPerMonth` V2WorkspaceGetLimitsLimit, required: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `apiRequestsCountMaxPerMinute` V2WorkspaceGetLimitsLimit, required: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `logsRetentionDaysMax` V2WorkspaceGetLimitsLimit, required: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `logsAuditRetentionDaysMax` V2WorkspaceGetLimitsLimit, required: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `logdrainsMax` V2WorkspaceGetLimitsLimit, required: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `cpuCoresMax` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `cpuCoresMaxPerInstance` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `memoryMibMax` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `memoryMibMaxPerInstance` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `storageMibMax` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `storageMibMaxPerInstance` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `buildsConcurrentMax` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `autoscalingReplicasMax` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.
    - `customDomainsMax` V2WorkspaceGetLimitsLimit: A workspace limit and, when the limit has one, the current value against it.
      - `limit` integer, nullable, required: The maximum the workspace can have. `null` means unlimited.
      - `current` number, double: The current value against `limit`. Omitted when the limit has no current value, such as a retention period or a per-instance size.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden - Insufficient permissions (requires `unkey:v1:<workspace_id>:limits#read`)
- `429`: Too Many Requests
- `500`: Internal server error

## Changes

- **2026-10-07** `d3fd0ed81493`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/unkeyed/apis/unkey-api/changes/v2/workspace.getLimits/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)
