---
title: "Library Router Config"
method: POST
path: "/library/router-config/{tenant}"
---

# Library Router Config

`POST /library/router-config/{tenant}`

## Request

- Base URL: `https://api-docs.session-exchange.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.session-exchange.com/library/router-config/{tenant}`
- Auth: none declared

Publish a tenant's OWN provider upstream (BYO) into its vault so the fleet-router can serve it.
Stores the credential + a `router-routes` config in the tenant's vault and grants the router
producer read on both. Scoped server-side to the target tenant (the vault is Host-scoped), so the
apex-hosted web + CLI can both call it. The fleet never lends its provider account.

Body: {route?, model, secret_name?, credential, force?}. `route` defaults to "openrouter" (which
reads the fixed `openrouter` secret); other routes name their credential secret via `session`.
Refuses with 409 `would_clobber_agents` when the stored table carries per-agent policies
(published via PUT /library/router-routes/{tenant} or by hand) unless `force: true`.

## Path parameters

- `tenant` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/session-exchange/apis/a4sx.md) · [All operations](https://skmtc.dev/session-exchange/apis/a4sx/llms.txt) · [OpenAPI document](https://skmtc.dev/session-exchange/apis/a4sx/revisions/abaefc33dfc7?raw)
