Settings
Generated from api/openapi.yaml (OpenAPI 3.1). Base URL: https://api.teemli.com. Auth: Authorization: Bearer <token or tml_ API key>. Errors are application/problem+json; writes accept an Idempotency-Key header.
Organisation model access and the tool catalogue
Start one-click “Connect OpenRouter” (owner/admin)
Section titled “Start one-click “Connect OpenRouter” (owner/admin)”POST /v1/orgs/{org}/settings/model/openrouterOpenRouter’s OAuth PKCE flow. Returns OpenRouter’s consent page; the PKCE verifier stays on
the server for this person (10 minutes). OpenRouter sends the browser to
/oauth/finish/openrouter?code=…, and the web app finishes it as the signed-in person
(POST /v1/oauth/finish/openrouter): the api exchanges the code and stores the key in the
vault. The key never reaches the browser. Someone else finishing the code gets nothing.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200Where to send the browser — object403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem429Rate limited (search, link previews, imports, uploads, model key checks): per person and per organisation token buckets. Retry afterRetry-Afterseconds. — Problem
Claim the $10 starter credit (when the server offers one; owner/admin)
Section titled “Claim the $10 starter credit (when the server offers one; owner/admin)”POST /v1/orgs/{org}/settings/model/starterMints a capped per-organisation OpenRouter key with Teemli’s management key, puts it behind the starter guardrail (only the starter model and its helpers) and saves it as the organisation’s key. Guards: a verified email (403); once per normalised email, company domain and organisation (409), once per device (409), a few per network a day (429); a platform-wide daily dollar cap and the operator kill switch (503); never for throwaway inboxes. 404 when the credit is switched off.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
device |
string | The app’s random per-install id (not a fingerprint); kept only as a salted hash |
Responses
200Claimed — object404Not found (also returned for rows the caller may not see, and for disabled features) — Problem409Conflicting state (card already answered, duplicate in flight, name taken) — Problem429Rate limited (search, link previews, imports, uploads, model key checks): per person and per organisation token buckets. Retry afterRetry-Afterseconds. — Problem
Models that can use tools, with names and prices (for the model picker; cached for an hour)
Section titled “Models that can use tools, with names and prices (for the model picker; cached for an hour)”GET /v1/orgs/{org}/settings/model/catalogAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200Models — object
Model access
Section titled “Model access”GET /v1/orgs/{org}/settings/modelThe organisation’s provider, key hint (never the key), default and fallback model. can_edit = owner/admin (in a one-person org, the person).
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200Settings — ModelSettings401Missing, invalid or expired token — Problem
Set model access (owner/admin)
Section titled “Set model access (owner/admin)”PUT /v1/orgs/{org}/settings/modelapi_key is validated first (OpenRouter: the free GET /key; others: GET /models),
then stored in OpenBao — never in the database, never shown again, never sent to
agents. Omitted fields keep their value. Changing provider needs a new key.
base_url “” = provider default; fallback_model “” clears it.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
provider |
ModelProvider | openrouter (recommended; one key, many models); openai_compatible (any base URL, e.g. vLLM); openai (OpenAI API key, Responses API) |
base_url |
string | Required for openai_compatible; must be https and public |
api_key |
string | |
default_model |
string | |
fallback_model |
string | |
zero_data_retention |
boolean | Model calls only. Speech-to-text always runs with zero data retention, whatever this says. |
context_window_tokens |
250000, 500000, 1000000 |
Responses
200Saved — ModelSettings & object401Missing, invalid or expired token — Problem403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem422Invalid input — Problem
Check a key without saving it (owner/admin)
Section titled “Check a key without saving it (owner/admin)”POST /v1/orgs/{org}/settings/model/validateFor the live “✓ Key works · balance $18.20” check while pasting. 422 when the provider rejects it.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
api_key (required) |
string | |
provider |
ModelProvider | openrouter (recommended; one key, many models); openai_compatible (any base URL, e.g. vLLM); openai (OpenAI API key, Responses API) |
base_url |
string |
Responses
200The key works — KeyInfo401Missing, invalid or expired token — Problem403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem422Invalid input — Problem
Tool catalogue
Section titled “Tool catalogue”GET /v1/orgs/{org}/toolsBuilt-in tools with their action class (drives which actions ask first) and family. Useful for step icons.
API keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200Tools — object401Missing, invalid or expired token — Problem