---
title: "Create Policy"
method: POST
path: "/api/permissions/policies"
tags: ["Permissions"]
---

# Create Policy

`POST /api/permissions/policies`

Creates a new policy.

A policy binds one or more roles to a set of resources, granting members who
hold those roles the actions defined by them. Roles must already exist before
they are referenced in a policy; create roles using
[`POST /api/permissions/roles`](../../../api-reference/permissions/roles/create).

## Headers

- `X-Polytomic-Version` string

## Request body

- CreatePolicyRequest
  - `name` string, required
  - `organization_id` string, uuid, nullable
  - `policy_actions` PolicyAction[], nullable, required
    - `action` string, required
    - `role_ids` string[], nullable, required

## Response `200`

OK

- PolicyResponseEnvelope
  - `data` PolicyResponse
    - `id` string, uuid
    - `name` string
    - `organization_id` string, uuid
    - `policy_actions` PolicyAction[]
      - `action` string, required
      - `role_ids` string[], nullable, required
    - `system` boolean

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

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