---
title: "Creation of a new policy"
method: POST
path: "/agency-group/{group_id}/policy"
tags: ["Agency Group Policy"]
---

# Creation of a new policy

`POST /agency-group/{group_id}/policy`

- The effective date must be greater than the previous document, if this is the first any value is valid
- The specified policy_type_id, must refer to an existing policy type
- Posting the same policy_type_id will create a new version of the policy
- Policies with effective_at dates in the future, will only become active then
- You can only have one active policy per policy_type_id

## Request body

- PolicyCreate
  - `policy_type_id` string, required
  - `content` PolicyContent, required
    - `html` string, required
    - `css` string
  - `prompt` PolicyPrompt
    - `html` string, required
    - `css` string
  - `effective_at` string, date-time, required

## Response `201`

Return the new policy object

- PolicyReturn
  - `policy_type_id` string, required
  - `content` PolicyContent, required
    - `html` string, required
    - `css` string
  - `prompt` PolicyPrompt
    - `html` string, required
    - `css` string
  - `effective_at` string, date-time, required
  - `_id` string, required
  - `updated_at` string, date-time, required
  - `created_at` string, date-time, required
  - `__v` integer, required
  - `policy_type` PolicyTypeBase
    - `title` string, required
    - `description` string, required
    - `classification` 'viewable' | 'acknowledgeable'
    - `options` object
      - `public_policy` boolean
      - `registration_policy` boolean
  - `version` integer
  - `display_version` string
  - `active` boolean
  - `status` 'published'
  - `latest` boolean

## Other responses

- `400` — Validation Error. Usually caused by a missing or invalid parameter.
- `401` — Authorization Error. Thrown if the user does not have access to resource.
- `403` — Permission denied error
- `404` — No such record
- `default` — unexpected error

---

[API](https://skmtc.dev/staffshift/apis/staffshift-api-gateway.md) · [All operations](https://skmtc.dev/staffshift/apis/staffshift-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/staffshift/staffshift-api-gateway/revisions/6e2cb83db3a9/schema)
