# Private sign-in

> Private sign-in (the password goes to the vault and the computer's browser, never to the model) and saved logins: 6 endpoints of the Teemli API.

Source: https://docs.teemli.com/developers/reference/sign-in/

Generated from [`api/openapi.yaml`](/developers/api/) (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.

Private sign-in (the password goes to the vault and the computer's browser, never to the model) and saved logins

## Submit the private sign-in form for a `sign_in` card

```http
POST /v1/orgs/{org}/sign-in-requests/{card}
```

The credential goes to the vault (OpenBao) and from there into the computer's browser, after the
page's origin is checked again; the agent only learns "Signed in to <site>" or why it didn't work.
It's held only for this request unless `save` is true (then it's a saved login, offered on the
next sign-in card for that site). Saved logins are never typed without a card: answer with
`use_saved_login` (the id in the card's `details.saved_login`) instead of a password, or with
`use_vault_login` (one of the card's `details.vault_logins`, from the person's Bitwarden or
1Password Connect: name + masked username only); that password is read from the vault only when
the agent's call resumes, straight into the page (403 if the admin switch `password_manager` is
off). Problems reaching a vault are in `details.vault_problems` (sentences to show). The helper
types only into the `<input type=password>` of a login form on the expected origin that submits
to that origin. Never logged. Only the person the card is routed to may submit (403).

**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. |
| `card` (required) | path | string (uuid) |  |

**Request body** (JSON)

| Field | Type | Description |
|---|---|---|
| `username` | string |  |
| `password` | string (password) |  |
| `save` | boolean |  |
| `use_saved_login` | string (uuid) | Use this saved login (for the card's site) instead of typing one; no password or save then. |
| `use_vault_login` | object | A login the card offers from a password manager; no password or save then. |

**Responses**

- `202` Accepted; the agent continues (watch `/v1/ws` for `card.updated` and the turn) — Card
- `401` Missing, invalid or expired token — Problem
- `403` Authenticated but not allowed (e.g. unverified email, not the agent's controller, card routed to someone else) — Problem
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem
- `409` Conflicting state (card already answered, duplicate in flight, name taken) — Problem
- `422` Invalid input — Problem
- `503` A dependency (e.g. the sign-in service) is unavailable — Problem

## Saved logins (mine, and AI employees' I manage). Never includes passwords

```http
GET /v1/orgs/{org}/saved-logins
```

**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**

- `200` Saved logins — object
- `401` Missing, invalid or expired token — Problem

## Forget a saved login (removed from the vault)

```http
DELETE /v1/orgs/{org}/saved-logins/{login}
```

**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. |
| `login` (required) | path | string (uuid) |  |

**Responses**

- `204` Deleted
- `401` Missing, invalid or expired token — Problem
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem

## Connected password managers (mine, and AI employees' I manage). Metadata only

```http
GET /v1/orgs/{org}/password-managers
```

**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**

- `200` Connections — object
- `401` Missing, invalid or expired token — Problem

## Connect (or replace) a password manager for private sign-in

```http
PUT /v1/orgs/{org}/password-managers/{provider}
```

**Bitwarden** (bitwarden.com, bitwarden.eu or a self-hosted Bitwarden / Vaultwarden at `server_url`):
the account's personal API key (`client_id` "user.…", `client_secret`) and master password; Teemli
signs in like Bitwarden's CLI and decrypts the vault itself (personal items; organisation items
aren't offered yet). **1Password Connect**: the Connect server's URL and an access token. The
values are checked by signing in once (422 with a sentence if that fails), then stored only in
OpenBao, never in Postgres, the model, the computer or logs. The vault address must be public
HTTPS (self-hosted Teemli can allow private ones with `TEEMLI_ALLOW_PRIVATE_PASSWORD_MANAGERS`).
403 when the admin switch `password_manager` is off. A vault whose key settings are outside
Bitwarden's own limits (PBKDF2 > 2,000,000 iterations; Argon2 > 10 iterations, > 1 GiB or > 16 lanes)
is refused (422); keys are derived off the request threads; rate limited (429). Re-audit R-3.

**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. |
| `provider` (required) | path | `bitwarden`, `onepassword` |  |
| `agent_id` | query | string (uuid) | An AI employee you manage (its own vault); omit for yours. |

**Request body** (JSON)

| Field | Type | Description |
|---|---|---|
| `server_url` | string |  |
| `client_id` | string | Bitwarden |
| `client_secret` | string (password) | Bitwarden |
| `master_password` | string (password) | Bitwarden |
| `token` | string (password) | 1Password Connect |

**Responses**

- `200` Connected — PasswordManagerConnection
- `401` Missing, invalid or expired token — Problem
- `403` Authenticated but not allowed (e.g. unverified email, not the agent's controller, card routed to someone else) — Problem
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem
- `422` Invalid input — Problem
- `503` A dependency (e.g. the sign-in service) is unavailable — Problem

## Disconnect a password manager (its secrets leave the vault)

```http
DELETE /v1/orgs/{org}/password-managers/{provider}
```

**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. |
| `provider` (required) | path | `bitwarden`, `onepassword` |  |
| `agent_id` | query | string (uuid) | An AI employee you manage (its own vault); omit for yours. |

**Responses**

- `204` Disconnected
- `401` Missing, invalid or expired token — Problem
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem
