---
title: "Publish a managed OpenCode config"
method: PUT
path: "/v1/org/opencode-configs/{name}"
tags: ["Agent Permissions"]
---

# Publish a managed OpenCode config

`PUT /v1/org/opencode-configs/{name}`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/org/opencode-configs/{name}`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Stores an OpenCode config file under a name, or replaces the one already stored under it. Publishing the same content again changes nothing and answers unchanged; new content raises the version and reaches assigned members the next time their desktop app checks in. The file uses the current OpenCode format and may hold any of its keys. Provider ids and MCP server names that OpenWork uses itself are refused, and so are the OpenCode v1 key names. Up to 262144 bytes and 50 configs per organization. Requires Managed OpenCode config and agent_permissions.manage with a recent sign-in.

## Path parameters

- `name` string, required

## Request body

- ManagedOpencodeConfigPublishRequest
  - `config` object, required

## Response `200`

Created, updated, or unchanged.

- ManagedOpencodeConfigPublishResponse
  - `result` 'created' | 'updated' | 'unchanged', required
  - `config` ManagedOpencodeConfig, required
    - `id` string, required
    - `name` string, required
    - `hash` string, required
    - `sizeBytes` integer, required
    - `version` integer, required
    - `summary` ManagedOpencodeConfigSummary, required
      - `keys` string[], required
      - `permissionRules` integer, required
      - `policyRules` integer, required
      - `providers` string[], required
      - `plugins` integer, required
      - `mcpServers` string[], required
      - `runsCode` boolean, required
      - `redirectsModels` boolean, required
    - `updatedAt` string, date-time, required
    - `updatedBy` string, nullable, required
    - `assignments` integer, required

## Other responses

- `400`: The file is not a valid managed config. Nothing was stored.
- `401`: Sign in required.
- `403`: The caller needs the agent_permissions.manage permission and a recent sign-in.
- `404`: Managed OpenCode config is off, or the config, team or member is not in this organization.
- `409`: The organization already has the most configs it can hold.
- `413`: The request is too large.

## Changes

- **2026-12-01** `418545ae8367`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/org/opencode-configs/:name/put.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
