Sign in with an email verification code, Google, or GitHub. Ownership must be verified before mailbot issues a usable credential or provisions an inbox. Password registration at `POST /v1/auth/register` is retired and returns `410`.

Use bearer authentication for protected `/v1/*` requests. The sign-in and verification endpoints are public and rate limited.

```bash
curl -H "Authorization: Bearer mb_xxx" \
  https://getmail.bot/v1/inboxes
```

```ts
const client = new MailBot({ apiKey: 'mb_xxx' });
```

See [Python SDK](/docs/python-sdk) for the published prerelease and required base URL. Public signup and verification endpoints do not require an existing API key.

## Browser sessions and integration keys

The credential returned by OTP/OAuth sign-in is a browser session with a maximum lifetime of 24 hours. Create a separate integration key for a service or SDK; do not store the browser session as a permanent service credential.

- `POST /v1/auth/logout` revokes the current browser session and returns `204`.
- `POST /v1/auth/revoke-sessions` revokes all browser sessions for the account and returns `204`. It requires write permission.
- Password recovery/reset invalidates browser sessions and preserves already-verified integration keys. API-key recovery is different: it revokes all active keys before issuing a replacement.
- Realtime connections recheck credentials on events and on a five-second heartbeat.

Read-only keys cannot send, provision resources, change settings or create keys. Child keys cannot exceed the parent's permissions or inbox scope. Browser credentials cannot be converted into permanent integration credentials.

## Legacy account migration

An unverified legacy account must prove email ownership. Its first successful verification revokes all credentials issued before proof, because their ownership cannot be established safely. Replace affected integration keys after verification. Scheduled messages without recorded authorization require review and reauthorization; they are not silently sent under a replacement key.
