v3

latestSwagger 2.02026-08-067506752.0 MB
policy

Create a policy

post/v1/org/{orgId}/policy

Path parameters

orgIdstring required

Org identifier (either id or slug)

Request body

orgIdstring

parent organization id (empty if global)

labelstring required

human-readable full name of policy

descriptionstring

description of policy

copiedFromIdstring

policy id that was copied (empty if original)

Example request

{
  "orgId": "588f7ee98f138b19220041a7",
  "label": "View Compensation",
  "description": "This policy allows compensation to be viewed.",
  "rules": [
    {
      "departmentIds": [
        "588f7ee98f138b19220041a7"
      ],
      "filter": "department:engineering and under:me",
      "targets": [
        {
          "personId": "588f7ee98f138b19220041a7"
        }
      ]
    }
  ],
  "copiedFromId": "588f7ee98f138b19220041a7"
}

Response

policy created

idstring required

globally unique id

orgIdstring

parent organization id (empty if global)

labelstring required

human-readable full name of policy

descriptionstring

description of policy

userCountinteger

number of users the policy is attached to; populated when expand=true on the list endpoint

directUserCountinteger

number of users the policy is assigned to directly; populated when expand=true on the list endpoint

createIdstring

created by user id

createAtstring

created timestamp

updateIdstring

last updated by user id

updateAtstring

last updated timestamp

deleteIdstring

deleted by user id

deleteAtstring

deleted timestamp