---
title: "Creates policy bundle for the context"
method: POST
path: "/owner/{ownerID}/context/{context}/policy-bundle"
tags: ["Policy Management"]
---

# Creates policy bundle for the context

`POST /owner/{ownerID}/context/{context}/policy-bundle`

This endpoint replaces the current policy bundle with the provided policy bundle

## Path parameters

- `ownerID` string, required
- `context` string, required

## Query parameters

- `dry` boolean

## Request body

- BundlePayload
  - `policies` object

## Response `200`

Policy-Bundle diff successfully returned.

- BundleDiff
  - `created` string[]
  - `deleted` string[]
  - `modified` string[]

## Other responses

- `201` — Policy-Bundle successfully created.
- `400` — The request is malformed (e.g, a given path parameter is invalid)
- `401` — The request is unauthorized
- `403` — The user is forbidden from making this request
- `413` — The request exceeds the maximum payload size for policy bundles ~2.5Mib
- `500` — Something unexpected happened on the server.

---

[API](https://skmtc.net/circleci/apis/api-v2.md) · [All operations](https://skmtc.net/circleci/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/circleci/api-v2/revisions/b9c0e0c24058/schema)
