---
title: "upload OPA policy (server mode)"
method: PUT
path: "/config/api/opa/policy"
tags: ["Config"]
---

# upload OPA policy (server mode)

`PUT /config/api/opa/policy`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body `application/x-www-form-urlencoded`

- object
  - `server_url` string: OPA server url
  - `policy_id` string: Policy ID
  - `bearer_token` string: Bearer token
  - `content` string, required: Rego content

## Response `200`

OK

- string

## Changes

- **2026-03-02** `e21f5baf21bb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apache/apis/the-apache-software-foundation-admin-api/changes/config/api/opa/policy/put.md)

---

[API](https://skmtc.dev/apache/apis/the-apache-software-foundation-admin-api.md) - [All operations](https://skmtc.dev/apache/apis/the-apache-software-foundation-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/apache/apis/the-apache-software-foundation-admin-api/revisions/ff6f3aa9acae?raw)
