---
title: "Create Policy Rule"
method: POST
path: "/v1/policies"
tags: ["v1", "protected", "policies"]
---

# Create Policy Rule

`POST /v1/policies`

Create a policy rule in the current workspace.

## Request body

- PolicyRuleCreateRequest — Request body for creating a policy rule.
  - `condition` string, nullable
  - `effect` 'allow' | 'deny' | 'cap' | 'approval' | 'safety' | 'egress', required — What a rule does when it applies.
  - `enabled` boolean
  - `params` object
  - `priority` integer
  - `subject_id` string, required
  - `subject_type` 'workspace' | 'agent' | 'user' | 'group', required — The kind of subject a rule binds to.
  - `target` string, required

## Response `201`

Successful Response

- PolicyRuleResponse — Serialized policy rule returned to clients.
  - `condition` string, nullable
  - `effect` 'allow' | 'deny' | 'cap' | 'approval' | 'safety' | 'egress', required — What a rule does when it applies.
  - `enabled` boolean, required
  - `id` string, required
  - `params` object, required
  - `priority` integer, required
  - `subject_id` string, required
  - `subject_type` 'workspace' | 'agent' | 'user' | 'group', required — The kind of subject a rule binds to.
  - `target` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agentarea/apis/agentarea-api.md) · [All operations](https://skmtc.net/agentarea/apis/agentarea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agentarea/agentarea-api/versions/e3650e48373b/schema)
