---
title: "Create or update a config entry (reserved env-only keys are rejected). Global-scope writes auto-trigger an integrations reload (debounced ~250ms) so Slack/GitHub/Linear/Jira/AgentMail pick up new credentials without an explicit /api/config/reload call."
method: PUT
path: "/api/config"
tags: ["Config"]
---

# Create or update a config entry (reserved env-only keys are rejected). Global-scope writes auto-trigger an integrations reload (debounced ~250ms) so Slack/GitHub/Linear/Jira/AgentMail pick up new credentials without an explicit /api/config/reload call.

`PUT /api/config`

## Request body

- object
  - `scope` 'global' | 'agent' | 'repo', required
  - `scopeId` string, nullable
  - `key` string, required
  - `value` unknown
  - `isSecret` boolean
  - `envPath` string, nullable
  - `description` string, nullable

## Response `200`

Config entry upserted

- SwarmConfig
  - `id` string, uuid, required
  - `scope` 'global' | 'agent' | 'repo', required
  - `scopeId` string, nullable, required
  - `key` string, required
  - `value` string, required
  - `isSecret` boolean, required
  - `envPath` string, nullable, required
  - `description` string, nullable, required
  - `createdAt` string, required
  - `lastUpdatedAt` string, required
  - `encrypted` boolean, required

## Other responses

- `400` — Validation error

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/0375890be8c4/schema)
