Skip to main content
POST
Create policy

Path Parameters

workspaceId
string<uuid>
required

Workspace identifier.

Body

application/json

Request payload for creating a new workspace policy.

The body comes from a template or an inline definition (see [PolicyBody]). The body's name and description drive the stored columns unless overridden here.

Request payload for creating a new workspace policy.

The body comes from a template or an inline definition (see [PolicyBody]). The body's name and description drive the stored columns unless overridden here.

source
string
required
Allowed value: "template"
template
object
required

The built-in policy template to seed from.

description
string

Optional description override. Defaults to the policy's own description.

Maximum string length: 4096
displayName
string

Optional display name override. Defaults to the policy's own name. Ignored for a one-shot (labels) body, whose name is generated.

Required string length: 1 - 255

Response

Response type for a workspace policy.

Response type for a workspace policy.

createdAt
string<date-time>
required

When the policy was created.

createdBy
object
required

Account that created this policy.

definition
object
required

The structured policy body consumed by the engine (the current version).

displayName
string
required

Human-readable policy display name.

id
string<uuid>
required

Unique identifier of the policy.

kind
required

How the policy came to exist. A one-shot policy (minted from labels) is content-addressed, deduplicated, and immutable; an authored policy is a normal, editable policy.

Allowed value: "authored"
updatedAt
string<date-time>
required

When the policy was last updated.

versionNumber
integer<int32>
required

The current version number of the policy's definition.

workspaceHandle
string
required

URL-safe workspace handle. Display-only.

Required string length: 3 - 32
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
workspaceId
string<uuid>
required

Unique identifier of the workspace.

description
string

Policy description.