---
title: "Get Cli Rules"
method: GET
path: "/v1/organizations/{org_id}/cli/rules"
tags: ["cli-rules", "cli-rules", "cli-rules"]
---

# Get Cli Rules

`GET /v1/organizations/{org_id}/cli/rules`

Get organization and user rules for CLI applications.

This endpoint is designed for CLI applications that need to fetch both organization-specific
rules and user-specific custom prompts that are used in prompts. This includes:

- Organization rules: Same as MCP organization_rules prompt and agent prompt builders
- User custom prompt: Same as MCP user_custom_prompt and agent prompt builders

Returns the rules and prompts that should be followed by AI agents.

Rate limit: 30 requests per minute.

## Path parameters

- `org_id` integer, required

## Headers

- `authorization` unknown

## Response `200`

Successful Response

- CLIRulesResponse — Response model for CLI rules containing organization and user rules.
  - `organization_rules` string, nullable, required
  - `user_custom_prompt` string, nullable, required

## Other responses

- `403` — Forbidden
- `422` — Validation Error
- `429` — Too Many Requests

## Changes

- **2025-09-24** `23bf64744884` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/codegen-sh/apis/developer-api/changes/v1/organizations/:org_id/cli/rules/get.md)

---

[API](https://skmtc.dev/codegen-sh/apis/developer-api.md) · [All operations](https://skmtc.dev/codegen-sh/apis/developer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/codegen-sh/developer-api/revisions/e68a3133f727/schema)
