> ## Documentation Index
> Fetch the complete documentation index at: https://docs.throttlr.yashjejurkar.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Rule

> Create a new rate limit rule for a project.

```http theme={null}
POST /rules/create-rule
```

**Headers:** `Authorization: Bearer <token>`

**Request body:**

```json theme={null}
{
  "name": "send_email",
  "limit": 10,
  "window": 3600,
  "algorithm": "FIXED_WINDOW",
  "apiKeyId": "api_key_id_here"
}
```

**Response (201):**

```json theme={null}
{
  "id": "rule_abc123",
  "name": "send_email",
  "limit": 10,
  "window": 3600,
  "algorithm": "FIXED_WINDOW",
  "apiKeyId": "api_key_id_here",
  "tenantId": "tenant_xyz",
  "createdAt": "2026-03-22T14:39:47.730Z"
}
```

**Errors:**

| Code  | Reason                                              |
| ----- | --------------------------------------------------- |
| `400` | Missing fields or validation error                  |
| `409` | Rule with this name already exists for this project |
