---
title: "Create Policy Endpoint"
method: POST
path: "/v1/policies"
tags: ["v1-policies"]
---

# Create Policy Endpoint

`POST /v1/policies`

Create a new policy for an org. If assign_to_scope is provided, also
create the assignment in the same request and roll the policy back if
assignment fails — CLI settings set uses this to avoid orphan policies.

assign_to_scope shape: {"scope_type": "connectors"|"orgs"|"branches",
"scope_id": "...", "priority": 100 (optional)}. Omit priority on
branch_create_hook assignments to auto-append after existing hooks in the
same scope using HOOK_PRIORITY_GAP.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.net/tryardent/apis/fastapi.md) · [All operations](https://skmtc.net/tryardent/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryardent/fastapi/revisions/f92d8d54bae2/schema)
