---
title: "Create an OPA policy"
method: POST
path: "/v1/org/opa-policies"
tags: ["OPA Policies"]
---

# Create an OPA policy

`POST /v1/org/opa-policies`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/org/opa-policies`
- Auth: HTTP bearer

Create a new OPA Rego policy for the organization. Business+ tier required.

## Request body

- CreateOpaPolicyRequest
  - `name` string, required
  - `rego_source` string: OPA Rego module source
  - `wasm_bundle_base64` string: Optional WASM bundle (base64)
  - `entrypoint` string

## Response `201`

OPA policy created

- OpaPolicyResponse
  - `id` string, uuid
  - `org_id` string, uuid
  - `name` string
  - `rego_source` string
  - `has_wasm_bundle` boolean
  - `entrypoint` string
  - `is_active` boolean
  - `enforcement_status` 'shadow' | 'enforce' | 'inactive'
  - `created_by` string, uuid
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Invalid request
- `401`: Authentication required or invalid
- `403`: Insufficient permissions

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/ae109b496830?raw)
