---
title: "Assign a managed OpenCode config"
method: POST
path: "/v1/org/opencode-config-assignments"
tags: ["Agent Permissions"]
---

# Assign a managed OpenCode config

`POST /v1/org/opencode-config-assignments`

## Request

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

Assigns one published config to everyone, one team or one current member. Each of those has at most one config, so assigning another replaces it. A member's own assignment wins over a team's, and a team's over everyone's. For the members it reaches, the file replaces the command, file edit, outside folder, web search and local skill rules of Agent permissions. Requires Managed OpenCode config and agent_permissions.manage with a recent sign-in.

## Request body

- ManagedOpencodeConfigAssignRequest
  - `config` string, required
  - `target` union, required
    - object
      - `everyone` true, required
    - object
      - `teamId` string, typeid, required: Den TypeID with 'tem_' prefix and a 26-character base32 suffix.
    - object
      - `memberId` string, typeid, required: Den TypeID with 'om_' prefix and a 26-character base32 suffix.
  - `lock` boolean

## Response `200`

Assigned, replaced, or already assigned.

- ManagedOpencodeConfigAssignResponse
  - `result` 'assigned' | 'replaced' | 'updated' | 'exists', required
  - `replaced` string, nullable, required
  - `assignment` ManagedOpencodeConfigAssignment, required
    - `scope` 'everyone' | 'team' | 'member', required
    - `teamId` string, nullable, required
    - `memberId` string, nullable, required
    - `label` string, required
    - `config` string, required
    - `assignedAt` string, date-time, required
    - `locked` boolean, required

## Other responses

- `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 member has not joined yet.

## Changes

- **2026-12-01** `3aa222e644a6`: 1 warning, 2 info
  - added the new `updated` enum value to the `result` response property for the response status `200`
  - added the new optional request property `lock`
  - added the required property `assignment/locked` to the response with the `200` status
- **2026-12-01** `418545ae8367`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/org/opencode-config-assignments/post.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)
