---
title: "Create usage limit"
method: POST
path: "/create_usage_limit"
tags: ["Usage Limits"]
---

# Create usage limit

`POST /create_usage_limit`

## Request

- Base URL: `https://happy-animal-123.convex.cloud/api/v1`
- URL: `https://happy-animal-123.convex.cloud/api/v1/create_usage_limit`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
  - API key in header `Authorization`
  - API key in header `Authorization`

Create a new usage limit config for a deployment.

## Request body

- UsageLimitConfigRequest
  - `metric` 'functionCalls' | 'databaseIoGb' | 'dataEgressGb' | 'searchQueryGb' | 'queryMutationComputeGbHours' | 'actionComputeConvexGbHours' | 'actionComputeNodeJsGbHours' | 'actionComputeCpuGbHours', required
  - `window` 'day' | 'month', required: The calendar-aligned window a limit is measured over.
  - `limitType` 'warning' | 'disable', required
  - `limit` integer, required
  - `enabled` boolean, required

## Response `200`

- UsageLimitResponse
  - `usageLimit` UsageLimitConfigResponse, required
    - `id` string, required
    - `metric` 'functionCalls' | 'databaseIoGb' | 'dataEgressGb' | 'searchQueryGb' | 'queryMutationComputeGbHours' | 'actionComputeConvexGbHours' | 'actionComputeNodeJsGbHours' | 'actionComputeCpuGbHours', required
    - `window` 'day' | 'month', required: The calendar-aligned window a limit is measured over.
    - `limitType` 'warning' | 'disable', required
    - `limit` integer, required
    - `enabled` boolean, required

---

[API](https://skmtc.dev/operatornest/apis/convex-deployment-api.md) · [All operations](https://skmtc.dev/operatornest/apis/convex-deployment-api/llms.txt) · [OpenAPI document](https://skmtc.dev/operatornest/apis/convex-deployment-api/revisions/bd0de6c553a7?raw)
