# Update federation config

Atomically updates federation mode and allowlist. Optionally triggers a purge of all non-allowlisted content.

RBAC: requires Federation.Manage

Endpoint: PUT /api/v1/admin/federation/config
Version: 1.0
Security: header

## Request fields (application/json):

  - `mode` (string, required)
    Target federation mode
    Enum: "OPEN", "LIMITED", "CLOSED"

  - `allowlist` (array, required)
    Full allowlist to apply

  - `purgeNonAllowlisted` (boolean)
    Whether to purge all non-allowlisted content after applying updates

## Response 200 fields (application/json):

  - `mode` (string, required)
    Current federation mode
    Enum: "OPEN", "LIMITED", "CLOSED"

  - `allowlist` (array, required)
    Current allowlist

## Response 400 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 403 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


