Create Policy

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.

Authentication

AuthorizationBearer
Bearer user API key
OR
AuthorizationBasic

Basic organization-scoped API key

Headers

X-Polytomic-VersionstringRequired

Request

This endpoint expects an object.
namestringRequired
policy_actionslist of objects or nullRequired
organization_idstring or nullOptionalformat: "uuid"

Response

OK
dataobject

Errors

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