---
title: "POST /policy"
method: POST
path: "/policy"
tags: ["Policy"]
---

# POST /policy

`POST /policy`

Updates the policy in Oso Cloud. The policy should be represented as a string containing [Polar](https://www.osohq.com/docs/modeling-in-polar/reference) code.

## Query parameters

- `force` boolean, required
- `show_suggestions` boolean, required
- `fail_fast` boolean, required

## Request body

- Policy
  - `filename` string, nullable
  - `src` string, required

## Response `200`

The policy was updated.

- ApiResult
  - `message` string, required

## Other responses

- `202` — The policy was not updated because it is unchanged.
- `default`

---

[API](https://skmtc.net/osohq/apis/oso-cloud-http-api.md) · [All operations](https://skmtc.net/osohq/apis/oso-cloud-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/osohq/oso-cloud-http-api/versions/edaea3b218bd/schema)
