> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/start-with-an-ai-agent/llm/accounts.md).

# Account lookup

Resolve REST account, Page, board, and playlist IDs without guessing a publishing destination.

Compact reference for agents making REST requests. All endpoint paths below are relative to `https://backend.blotato.com/v2`. For task instructions, read the [workflow guide](/api-and-mcp-concepts/accounts-and-identifiers.md). For tool calls, use the [MCP reference](/start-with-an-ai-agent/mcp/tools.md).

## Step 0: get accounts (always do this first)

Before publishing, match the returned platform and account name to the user's requested destination. Use the account's `id` as `post.accountId`. If several accounts match, ask which to use. If none match, check [Accounts](https://my.blotato.com/accounts). An empty list is not publishing readiness.

```
GET /users/me/accounts
GET /users/me/accounts?platform=twitter  (filter by platform)

Response:
{
  "items": [
    { "id": "98432", "platform": "twitter", "fullname": "Jane", "username": "jane" }
  ]
}

For a Facebook Page or LinkedIn company Page, fetch the selected account's subaccounts.
GET /users/me/accounts/{accountId}/subaccounts

Response:
{
  "items": [
    { "id": "123456789", "accountId": "selected_account_id", "name": "My Business Page" }
  ]
}

Facebook Page: select the requested Page and use its id as target.pageId (required).
LinkedIn company Page: select the requested Page and use its id as target.pageId.
LinkedIn personal profile: omit target.pageId.
Do not replace post.accountId with a Page ID or select the first Page by default.

For YouTube, fetch subaccounts only when playlist placement is requested.
GET /users/me/accounts/{accountId}/subaccounts
Use the selected playlist items[].id values as target.playlistIds (optional array).
Omit playlistIds when no playlist placement is requested.

For Pinterest, fetch boards to get boardId:
GET /social/pinterest/boards?accountId={accountId}
Response: { "items": [{ "id": "1234567890123456789", "name": "Summer Outfits" }] }
Use items[].id as target.boardId when publishing a pin.
```

Keep the credential, platform, account, and destination together. Stop if a required Page or board ID is unavailable. After reconnection, fetch the current account ID again. For lookup errors, follow [Account not found](/api-and-mcp-concepts/accounts-and-identifiers.md#account-not-found).

Return to the [agent reference index](/start-with-an-ai-agent/llm.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.blotato.com/start-with-an-ai-agent/llm/accounts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
