---
title: "Publish or update a saved extraction config (admin only)"
method: POST
path: "/v1/configs"
---

# Publish or update a saved extraction config (admin only)

`POST /v1/configs`

## Request

- Base URL: `https://api.clichefactory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.clichefactory.com/v1/configs`
- Auth: none declared

Upsert a saved config pushed from Emio when a user enables REST API access.

Configs carrying a BYOK key require ``FIELD_ENCRYPTION_KEY`` to be configured
so the secret can be encrypted at rest; without it we fail closed (503).

## Headers

- `X-API-KEY` string, nullable

## Request body

- ConfigUpsertRequest: Admin payload to publish/update a saved extraction config. Emio is the source of truth; it pushes a resolved snapshot of a user's ``PipelineConfig`` here when the user explicitly enables REST API access. ``config_id`` is omitted on first publish (the server mints one) and echoed back on subsequent re-publishes so the same id keeps resolving to the latest snapshot. ``byok_api_key`` travels in plaintext over the (TLS) admin channel and is encrypted at rest before it touches the database.
  - `tenant_id` string, required
  - `name` string, required
  - `config_id` string, nullable
  - `extraction_mode` string, nullable
  - `json_schema` object, nullable
  - `artifact_id` string, nullable
  - `model_name` string, nullable
  - `byok_api_key` string, nullable
  - `byok_api_base` string, nullable
  - `max_tokens` integer, nullable
  - `temperature` number, nullable
  - `allow_partial` boolean, nullable

## Response `200`

Successful Response

- ConfigResponse: Public-safe view of a saved config (never exposes the BYOK secret).
  - `config_id` string, required
  - `tenant_id` string, required
  - `name` string, required
  - `extraction_mode` string, nullable
  - `has_schema` boolean
  - `artifact_id` string, nullable
  - `model_name` string, nullable
  - `has_byok_key` boolean
  - `max_tokens` integer, nullable
  - `temperature` number, nullable
  - `allow_partial` boolean, nullable
  - `created_at` string, date-time, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/clichefactory/apis/aio-server.md) · [All operations](https://skmtc.dev/clichefactory/apis/aio-server/llms.txt) · [OpenAPI document](https://skmtc.dev/clichefactory/apis/aio-server/revisions/9bd59f9bbb31?raw)
