---
title: "Submit per-user-headers values"
method: PUT
path: "/api/mcp/per-user-headers/flows/{id}"
tags: ["MCP"]
---

# Submit per-user-headers values

`PUT /api/mcp/per-user-headers/flows/{id}`

Consumes a pending submission flow row: verifies the caller's values
against the upstream MCP server, upserts the credential keyed by the flow
row's (mode, identity), then deletes the flow row and the bound temp
token. Mirrors the OAuth callback's "complete the flow" semantics.

Values for any key not in the live `per_user_header_keys` schema are
dropped server-side so a stale UI can't persist deprecated keys.

## Path parameters

- `id` string, required

## Request body

- MCPHeadersSubmitRequest — Request body for PUT /api/mcp/per-user-headers/flows/{id}. The flow row identifies the (mode, identity, mcp_client) triple, so the caller carries only the values. Extra keys not in the live `per_user_header_keys` schema are dropped server-side.
  - `headers` object, required

## Response `200`

Credential persisted

- MCPHeadersSubmitResponse
  - `status` 'success', required
  - `credential_id` string, required
  - `updated_at` string, date-time, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized — missing or invalid credentials
- `404` — Resource not found
- `410` — Flow expired
- `422` — Upstream verification failed with the supplied values
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
