# Accounts

Source: https://ampost.io/docs/accounts · Full reference: https://ampost.io/llms-full.txt

## Accounts

Accounts are the connected social profiles. `GET /api/accounts` returns `active` accounts by default; pass `status=revoked` for disconnected accounts or `status=all` for both. A platform set's `accountCount` is the default list's total for that set. `GET /api/accounts/{accountId}` also returns revoked accounts (`status: revoked`); reconnect one with the browser-assisted flow below and its `accountId`, and it keeps its id.

`DELETE /api/accounts/{accountId}` (MCP `accounts_disconnect`) disconnects an account: it deletes the stored tokens, sets `status: revoked` and asks the platform to revoke Ampost's access where it can: Facebook, LinkedIn, TikTok, X, YouTube (Google) and Discord (Ampost deletes the channel webhook). The result is the account plus `providerRevoked`, true when the platform confirmed the revoke, and `providerAccessSettings`: when `providerRevoked` is false, where the user removes Ampost in the platform itself; relay it. Instagram and Threads have no revoke endpoint, so they always return `providerRevoked: false`; the user removes Ampost in Instagram: Settings, Website permissions, Apps and websites, or in Threads: Settings, Account, Website permissions. Pinterest has no revoke for user tokens: the user removes Ampost in Pinterest: Settings, Security and logins, Apps. Telegram and Bluesky use the user's own bot and app password: the user removes the bot from the channel or deletes the app password. A second call returns the account with `providerRevoked: false`. Deleting a platform set does the same for its accounts.

`PATCH /api/accounts/{accountId}/analytics` (MCP `accounts_set_analytics`, scope `accounts:write`) with `{ "enabled": true }` turns X analytics on for an X account; `false` turns them off. X bills every read, so X analytics are off until the user opts in, need the Max or Scale plan (403 `UPGRADE_REQUIRED` otherwise), and count against the plan's 30-day X units: three post reads or one follower read cost one unit. Each account's `analytics` field says whether analytics are `available`, `optInRequired` and `enabled`. Other platforms need no opt-in and answer 400.

A Pinterest Pin needs a board. `GET /api/accounts/{accountId}/boards` (MCP `accounts_list_boards`) lists the account's boards and its `defaultBoardId`; `PATCH /api/accounts/{accountId}/board` (MCP `accounts_set_board`, scope `accounts:write`) sets the default with `boardId`, or creates a board with `newBoardName` and makes it the default. A connect picks the board by itself when the account has exactly one; otherwise the account has the `BOARD_NOT_SELECTED` health warning until one is set, and each post must name `options.pinterest.boardId`.

`health` says whether an account can publish and why not: `canPost` (active and no `error` issue), `needsReconnect` (there is an issue, and only a reconnect fixes it) and `issues[]`, each with a `code`, a `severity` (`error` blocks publishing, `warning` needs attention soon) and a `message` to relay. Codes: `ACCOUNT_REVOKED`, `TOKEN_EXPIRED` (the login expired and Ampost cannot renew it), `MISSING_SCOPE:<scope>` (for example `MISSING_SCOPE:w_member_social`), `REFRESH_TOKEN_EXPIRING` (the platform login ends within 7 days: TikTok, LinkedIn), `TOKEN_EXPIRING` (the token expires within 7 days and Ampost cannot renew it: LinkedIn without a refresh token, or an Instagram or Threads renewal that failed). Ampost renews logins by itself: Instagram and Threads 30 days before they expire, even when the account does not post, and short tokens with a refresh token (TikTok, X, LinkedIn, Bluesky, YouTube, Pinterest) on use, so an expired short token is no issue. Each issue shows up 7 days before the login lapses, and `account.needs_reconnect` fires then (once per lapse), not at the failed publish. `tokenHealth` is the bare token state: `healthy`, `non_expiring`, `expiring_soon`, `expired` or `inactive` (revoked); where Ampost renews a short token from a refresh token it follows the refresh token, so a YouTube account with a 1-hour access token reads `healthy`.

`platformMetadata` holds public details captured at connect time, a fixed list per platform. Facebook: `pageId`, `pageName`. LinkedIn: `displayName`, `locale`, `organizationPostingEnabled`. Instagram: `displayName`, `accountType`. Threads: `displayName`. TikTok: `creatorNickname`, `privacyLevelOptions`, `commentDisabled`, `duetDisabled`, `stitchDisabled`, `maxVideoPostDurationSec`. X: `displayName`. Bluesky: `displayName`. Telegram: `chatTitle`, `chatType`, `botUsername`. Discord: `guildName`, `channelId`. YouTube: `channelTitle`, `customUrl`. Pinterest: `displayName`, `accountType`, `boardId` and `boardName` (the default board; missing until one is picked).

### List social accounts

`GET /api/accounts` · MCP tool `accounts_list` · scope `accounts:read` · rate limit `apiRead` · success `200`

List your social accounts, optionally only one platform or one platform set. `status` defaults to `active`, the accounts that can publish; pass `revoked` for disconnected accounts or `all` for both. The `active` total for a set equals that set's `accountCount` in platform_sets_list. `health` says whether each account can publish (`canPost`), whether only a reconnect helps (`needsReconnect`), and why (`issues[]` with codes such as `TOKEN_EXPIRED` or `MISSING_SCOPE:w_member_social`). Fix with accounts_connect and the account's id as `accountId`. `platformMetadata` has public per-platform details, such as the TikTok creator's allowed privacy levels. Use it to see what a user can post to or to find an account id; use accounts_get to re-check one account whose id you have, and platform_sets_list for the sets themselves. Paginated with `limit` and `offset`. A key restricted to some sets sees only their accounts; an unknown `platformSetId` is 404 PLATFORM_SET_NOT_FOUND.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `platform` | query | instagram \| facebook \| linkedin \| tiktok \| threads \| twitter \| discord \| telegram \| bluesky \| youtube \| pinterest | no | Only accounts on this platform. Default: every platform. |
| `platformSetId` | query | string | no | Only accounts in this platform set (`id` from platform_sets_list). Default: every set the key can see. |
| `status` | query | active \| revoked \| all | no | `active` (default): accounts that can publish. `revoked`: disconnected accounts. `all`: both. |
| `limit` | query | integer | no | Page size, 1-100. Default 20. |
| `offset` | query | integer | no | Number of items to skip. Default 0. |

Example response:

```json
{
  "data": [],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 0,
    "hasMore": false
  }
}
```

### Get a connected account

`GET /api/accounts/{accountId}` · MCP tool `accounts_get` · scope `accounts:read` · rate limit `apiRead` · success `200`

Get one social account by id, including revoked ones (`status: revoked`). `health`: `canPost`, `needsReconnect` and `issues[]` (codes such as `ACCOUNT_REVOKED`, `TOKEN_EXPIRED`, `MISSING_SCOPE:<scope>`, each with a message to relay). When `needsReconnect` is true, call accounts_connect with `accountId` set to this id; the account keeps its id. `platformMetadata` has public per-platform details. Use it to check one account before posting or after a reconnect; use accounts_list to find accounts by platform, set or status. 404 ACCOUNT_NOT_FOUND when no account with this id is yours or the key is restricted to other sets.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Account id (UUID): `id` from accounts_list |

Example response:

```json
{
  "id": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
  "platform": "instagram",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "platformAccountId": "17841400000000000",
  "username": "ampost.io",
  "avatarUrl": null,
  "status": "active",
  "scopes": [
    "instagram_business_basic",
    "instagram_business_content_publish"
  ],
  "tokenExpiresAt": "2026-12-05T09:00:00.000Z",
  "tokenHealth": "healthy",
  "health": {
    "canPost": true,
    "needsReconnect": false,
    "issues": []
  },
  "platformMetadata": {
    "displayName": "Ampost",
    "accountType": "BUSINESS"
  },
  "analytics": {
    "available": true,
    "optInRequired": false,
    "enabled": true
  },
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-06T09:00:00.000Z",
  "lastUsedAt": "2026-10-06T09:00:04.000Z"
}
```

### Disconnect an account

`DELETE /api/accounts/{accountId}` · MCP tool `accounts_disconnect` · scope `accounts:write` · rate limit `connectPlatform` · success `200`

Disconnect a social account: Ampost revokes its access at the platform where the platform allows it, deletes the stored tokens and sets `status: revoked`. Scheduled posts for the account will fail. The account keeps its id and can be reconnected later with accounts_connect and `accountId`. `providerRevoked` says whether the platform confirmed the revoke; when false, `providerAccessSettings` says where the user removes Ampost in the platform's settings. Instagram and Threads have no revoke endpoint, so they always return `providerRevoked: false`. Calling it again on a disconnected account returns the account unchanged with `providerRevoked: false`.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Account id (UUID): `id` from accounts_list |

Example response:

```json
{
  "id": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
  "platform": "instagram",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "platformAccountId": "17841400000000000",
  "username": "ampost.io",
  "avatarUrl": null,
  "status": "revoked",
  "scopes": [],
  "tokenExpiresAt": null,
  "tokenHealth": "inactive",
  "health": {
    "canPost": false,
    "needsReconnect": true,
    "issues": [
      {
        "code": "ACCOUNT_REVOKED",
        "severity": "error",
        "message": "The account is disconnected. Reconnect it with accounts_connect and its accountId."
      }
    ]
  },
  "platformMetadata": {
    "displayName": "Ampost",
    "accountType": "BUSINESS"
  },
  "analytics": {
    "available": true,
    "optInRequired": false,
    "enabled": true
  },
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-06T12:20:00.000Z",
  "lastUsedAt": "2026-10-06T09:00:04.000Z",
  "providerRevoked": false,
  "providerAccessSettings": "Instagram: Settings > Website permissions > Apps and websites"
}
```

### Turn X analytics on or off

`PATCH /api/accounts/{accountId}/analytics` · MCP tool `accounts_set_analytics` · scope `accounts:write` · rate limit `connectPlatform` · success `200`

Opt an X account in to analytics, or out again. Every X read is billed, so X analytics are off until the account opts in, and the reads count against the plan's 30-day X units like publishing (Max and Scale). When on, Ampost reads the metrics of the posts it published to the account during their first 29 days (daily for 3 days, then weekly) and the follower count once a day; three post reads or one follower read cost one X unit. The sync pauses when the units run out and resumes when they reset. Other platforms need no opt-in (`analytics.optInRequired` is false) and return 400. A plan without X returns 403 UPGRADE_REQUIRED. Returns the account with its `analytics` state.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Account id (UUID): `id` from accounts_list |
| `enabled` | body | boolean | yes | `true` starts the metered X analytics sync for the account; `false` stops it |

Example request:

```json
{
  "enabled": true
}
```

Example response:

```json
{
  "id": "9a4e2c7b-3d1f-4b8a-9c6e-5f2a8d1b7c40",
  "platform": "twitter",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "platformAccountId": "1580000000000000000",
  "username": "ampost_io",
  "avatarUrl": null,
  "status": "active",
  "scopes": [
    "tweet.read",
    "tweet.write",
    "users.read",
    "media.write",
    "offline.access"
  ],
  "tokenExpiresAt": "2026-10-07T11:00:00.000Z",
  "tokenHealth": "healthy",
  "health": {
    "canPost": true,
    "needsReconnect": false,
    "issues": []
  },
  "platformMetadata": {},
  "analytics": {
    "available": true,
    "optInRequired": true,
    "enabled": true
  },
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-07T10:00:00.000Z",
  "lastUsedAt": "2026-10-06T09:00:04.000Z"
}
```

### List a Pinterest account's boards

`GET /api/accounts/{accountId}/boards` · MCP tool `accounts_list_boards` · scope `accounts:read` · rate limit `apiRead` · success `200`

List the boards of an active Pinterest account (up to 250), read from Pinterest (the same list is reused for up to a minute; a board made with accounts_set_board shows at once). `defaultBoardId` is the board Pins go to when a post sets no `options.pinterest.boardId`; it is `null` until one is picked, and the account then has the `BOARD_NOT_SELECTED` health warning. Ask the user which board to use and call accounts_set_board. An account with a single board gets it as the default at connect. Other platforms return 400.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Account id (UUID): `id` from accounts_list |

Example response:

```json
{
  "data": [
    {
      "id": "813744226420795883",
      "name": "Product launches",
      "privacy": "PUBLIC",
      "isDefault": true
    },
    {
      "id": "813744226420795901",
      "name": "Drafts",
      "privacy": "SECRET",
      "isDefault": false
    }
  ],
  "defaultBoardId": "813744226420795883"
}
```

### Pick a Pinterest account's default board

`PATCH /api/accounts/{accountId}/board` · MCP tool `accounts_set_board` · scope `accounts:write` · rate limit `connectPlatform` · success `200`

Set the board Pins go to when a post sets no `options.pinterest.boardId`: pass `boardId` (from accounts_list_boards), or `newBoardName` to create a public board and use it. Ampost checks the board with Pinterest first. The choice survives a reconnect. Returns the account; `platformMetadata.boardId` and `boardName` show the default. Other platforms return 400.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Account id (UUID): `id` from accounts_list |
| `boardId` | body | string | no | An existing board of the account, from accounts_list_boards. Pass this or `newBoardName` |
| `newBoardName` | body | string | no | Creates a public board with this name and makes it the default. Pass this or `boardId` |

Example request:

```json
{
  "boardId": "813744226420795883"
}
```

Example response:

```json
{
  "id": "6b1f3d8a-4e2c-4a9b-8d7f-2c5e9a1b3d70",
  "platform": "pinterest",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "platformAccountId": "813744295139952108",
  "username": "ampost_io",
  "avatarUrl": null,
  "status": "active",
  "scopes": [
    "user_accounts:read",
    "boards:read",
    "boards:write",
    "pins:read",
    "pins:write"
  ],
  "tokenExpiresAt": "2026-11-06T10:00:00.000Z",
  "tokenHealth": "healthy",
  "health": {
    "canPost": true,
    "needsReconnect": false,
    "issues": []
  },
  "platformMetadata": {
    "displayName": "Ampost",
    "accountType": "BUSINESS",
    "boardId": "813744226420795883",
    "boardName": "Product launches"
  },
  "analytics": {
    "available": true,
    "optInRequired": false,
    "enabled": true
  },
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-07T10:00:00.000Z",
  "lastUsedAt": "2026-10-06T09:00:04.000Z"
}
```

### Connect a social account

`POST /api/accounts/connect` · MCP tool `accounts_connect` · scope `accounts:write` · rate limit `connectPlatform` · success `201`

Create a short-lived Ampost-hosted link that connects one social account to a platform set. The user opens `connectUrl` in a browser and authorizes there; consent cannot happen in chat. In MCP, a client that supports URL elicitation asks the user to open the page itself, and the result then has no `connectUrl`. Then poll the connection request until it is connected, failed or expired. To reconnect an existing account (a revoked one, or an active one whose `health.needsReconnect` is true), pass its id as `accountId`; `platform` may then be omitted. For a new connection, `expectedUsername` or `expectedPlatformAccountId` makes sure the user signs in to the right account. If the user signs in to another account, the request fails with ACCOUNT_MISMATCH and nothing changes. A new request replaces the pending one for the same platform and set, also one the user opened but did not finish (it fails with SUPERSEDED), so call this again when the user lost or closed the page. A coming-soon platform (`availability: coming_soon` in platforms_list) returns 403 PLATFORM_COMING_SOON for accounts it is not open to yet, reconnects included.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `platform` | body | instagram \| facebook \| linkedin \| tiktok \| threads \| twitter \| discord \| telegram \| bluesky \| youtube \| pinterest | no | The platform to connect. Required unless `accountId` is given. |
| `platformSetId` | body | string | no | Target platform set. Default: your default set, or for a reconnect the account's own set. An active account cannot change sets. |
| `accountId` | body | string | no | Reconnect this existing account (active: refreshes its token and permissions; revoked: reactivates it). The user must sign in to the same platform account, otherwise the request fails with ACCOUNT_MISMATCH and nothing changes. |
| `expectedUsername` | body | string | no | New connections: the username the user must sign in to, as `username` in accounts_get (Facebook: the Page name). Case and a leading @ are ignored. Otherwise the request fails with ACCOUNT_MISMATCH. |
| `expectedPlatformAccountId` | body | string | no | New connections: the platform's id of the account the user must sign in to, as `platformAccountId` in accounts_get. Otherwise the request fails with ACCOUNT_MISMATCH. |
| `redirectUrl` | body | string | no | When done, the result page links the browser here (the user clicks to leave Ampost), with the outcome in the query (https; http only for localhost). |
| `state` | body | string | no | Returned unchanged as `state` on `redirectUrl`. |
| `Idempotency-Key` (MCP `idempotencyKey`) | header | string | no | Idempotency key (1-255 visible ASCII characters, for example a UUID). A retry with the same key and arguments within 24 hours returns the first result instead of running again. Send a new key for each new action. See Idempotency. |

Example request:

```json
{
  "platform": "instagram",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40"
}
```

Example response:

```json
{
  "id": "11111111-1111-4111-8111-111111111111",
  "platform": "instagram",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "status": "pending",
  "reconnectAccountId": null,
  "expectedPlatformAccountId": null,
  "expectedUsername": null,
  "redirectUrl": null,
  "connectUrl": "https://ampost.io/connect/11111111-1111-4111-8111-111111111111#token=one-time-token",
  "createdAt": "2026-10-06T12:00:00.000Z",
  "expiresAt": "2026-10-06T12:10:00.000Z"
}
```

### Get a connection request

`GET /api/accounts/connect/{connectRequestId}` · MCP tool `accounts_connect_status` · scope `accounts:read` · rate limit `apiRead` · success `200`

Read the status of an account connection request: pending, awaiting_selection, connected, failed or expired. Poll every 2-5 seconds. When connected, `accountId` is the account's id (a reconnected account keeps its id). When failed or expired, `error.message` says why and what the user should do next; relay it as is. `ACCOUNT_MISMATCH` means the user signed in to another account than `accountId` or the expected one; nothing was changed. `SOCIAL_ACCOUNT_IN_USE` means a Free workspace tried to connect a social account another Ampost workspace has (or had in the last 30 days); a paid plan can connect it. `SUPERSEDED` means a newer request for this platform replaced this one: poll the newer request instead. `USER_CANCELLED` means the user cancelled or declined consent.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `connectRequestId` | path | string | yes | Connection request id (UUID): `id` from accounts_connect |

Example response:

```json
{
  "id": "11111111-1111-4111-8111-111111111111",
  "platform": "instagram",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "status": "connected",
  "accountId": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
  "reconnectAccountId": null,
  "expectedPlatformAccountId": null,
  "expectedUsername": null,
  "redirectUrl": null,
  "error": null,
  "createdAt": "2026-10-06T12:00:00.000Z",
  "expiresAt": "2026-10-06T12:10:00.000Z",
  "completedAt": "2026-10-06T12:02:14.000Z",
  "updatedAt": "2026-10-06T12:02:14.000Z"
}
```

### Browser-Assisted Account Connection

`POST /api/accounts/connect` creates a ten-minute connection request; `GET /api/accounts/connect/{connectRequestId}` reads its status. Show the complete `connectUrl` to the user once and tell them to open it in a browser. The URL fragment is a one-time secret: never log, analyze, transform or repeat it after that handoff, and never ask the user to paste it back. Provider consent cannot be completed headlessly or inside the LLM conversation. The create response is the only result that contains `connectUrl`.

To reconnect an account (revoked, or active with `health.needsReconnect`), pass its `accountId`; `platform` may be omitted. An active account gets fresh tokens and permissions and stays in its set; a revoked one is reactivated. For a new connection, `expectedUsername` (the `username` accounts_get would show; Facebook: the Page name; case and a leading @ ignored) or `expectedPlatformAccountId` pins the account the user must sign in to. If the user signs in to any other account, the request fails with `ACCOUNT_MISMATCH` and nothing is written.

Poll every 2-5 seconds until the status is `connected` (then `accountId` is the account; a reconnected account keeps its id), `failed` or `expired`. On `failed` or `expired`, `error.message` says why and what the user should do next; relay it, and offer a new link only when it says so. `error.code` is one of `USER_CANCELLED` (the user cancelled or declined consent), `SUPERSEDED` (a newer request for this platform and set replaced this one; poll the newer one. A new request also replaces one the user opened but did not finish, so create one when the user lost or closed the page), `REQUEST_EXPIRED`, `OAUTH_DENIED`, `REQUIRED_PERMISSIONS_MISSING` (the platform did not grant a permission Ampost needs; if the app is not approved for it, retrying won't help), `ACCOUNT_MISMATCH`, `ACCOUNT_ALREADY_CONNECTED`, `PLATFORM_ALREADY_CONNECTED`, `ACCOUNT_LIMIT_REACHED`, `SOCIAL_ACCOUNT_IN_USE` (Free: the social account is connected in another Ampost workspace, or was disconnected from one less than 30 days ago; a paid plan can connect it), `PLATFORM_SET_NOT_FOUND`, `API_KEY_REVOKED` or `CONNECTION_FAILED`. Status results never include `connectUrl`, the fragment token, provider tokens, authorization codes, OAuth state or raw provider errors. Another user gets 404.

Embed account connection in your app: pass `redirectUrl` (absolute `https`, `http` only for localhost, at most 2048 characters, no user name or password) and optionally `state` (at most 512 characters). When the request ends, connected, failed (also a cancel or declined consent) or expired, Ampost's result page tells the browser that went through the flow that it is leaving Ampost for your host and links to `redirectUrl` (a click, not an automatic redirect) with `status` (`connected`, `failed` or `expired`), `connectRequestId`, `platform`, `accountId` (connected) or `error` (the status resource's `error.code`, e.g. `USER_CANCELLED`) and `state` unchanged; your own query parameters stay. No tokens are added. Anyone can forge these parameters, so confirm with `GET /api/accounts/connect/{connectRequestId}` before acting. The URL is stored with the request and shown (its host) on the confirmation page; Ampost never takes a redirect from a callback URL. It works for OAuth platforms, the Telegram and Bluesky form and Facebook Page selection.

There are no separate profiles (platform sets group accounts) or headless authorization: the user always finishes in a browser. Facebook Page selection is hosted by Ampost in the browser; a reconnect or an expected account offers only that Page. Telegram and Bluesky have no consent screen: the `connectUrl` opens an Ampost page where the user enters their bot token and channel (Telegram) or handle and app password (Bluesky). Discord asks the user to pick the server and channel. On Free, X needs a confirmed email first; before that `accounts_connect` fails with `UPGRADE_REQUIRED`. A coming-soon platform (`availability: coming_soon`) fails with 403 `PLATFORM_COMING_SOON` for accounts it is not open to yet, reconnects included.

### MCP Browser-Assisted Account Connection

`accounts_connect` takes `platform` and an optional `platformSetId`, or `accountId` to reconnect, plus the optional `expectedUsername` / `expectedPlatformAccountId` and `redirectUrl` / `state`, with the same service, `connectPlatform` rate limit, ten-minute expiry and errors as REST. Show the returned `connectUrl` to the user, then call `accounts_connect_status` with `connectRequestId` every 2-5 seconds. Never ask the user for an access token, OAuth authorization code, password, bot token, app password, state value, URL fragment or Facebook Page token: Telegram and Bluesky credentials are typed on the Ampost page, not in the conversation.

### Opening Links in the User's Browser (MCP)

On MCP protocol revision 2026-07-28, a client that declares the `elicitation.url` capability does not get `connectUrl` (`accounts_connect`) or `uploadPageUrl` (`media_upload_create`) in the result. Ampost answers the call with a URL-mode elicitation instead: the client shows the user the page address, opens it in the browser after the user agrees, and retries the call. The result then has every other field, and its note says the page was opened. The link never reaches the model or the chat. If the user declines, or the client does not support URL elicitation (every 2025-era client, since this server keeps no sessions), the result has the link as before. REST is unchanged.
