For the complete documentation index, see llms.txt. This page is also available as Markdown.

Account

Retrieve connected social account IDs and subaccounts before selecting a publishing destination.

List Connected Accounts

Endpoint

Base URL: https://backend.blotato.com/v2

URL: /users/me/accounts

Method: GET

Description

Returns all social media accounts connected to your Blotato account. Use this to get the accountId required for publishing posts.

Query Parameters

Field
Type
Required
Description

platform

string

No

Filter by platform. Values: twitter, instagram, linkedin, facebook, tiktok, pinterest, threads, bluesky, youtube

The platform values here are the same values used in content.platform and target.targetType when publishing.

Response

Status Code: 200 OK

{
  "items": [
    {
      "id": "98432",
      "platform": "twitter",
      "fullname": "Jane Smith",
      "username": "janesmith"
    },
    {
      "id": "98433",
      "platform": "facebook",
      "fullname": "Jane Smith",
      "username": "janesmith"
    }
  ]
}
Field
Type
Description

items

array

List of connected accounts

items[].id

string

Account ID. Use this as accountId when publishing.

items[].platform

string

Platform type (e.g., twitter, facebook, instagram)

items[].fullname

string

Display name of the account

items[].username

string

Username or handle

If no accounts are returned, the user needs to connect social accounts in Accounts.

Examples

List all accounts

Filter by platform


List Subaccounts (Pages)

Endpoint

Base URL: https://backend.blotato.com/v2

URL: /users/me/accounts/:accountId/subaccounts

Method: GET

Description

Returns subaccounts for a connected account. Subaccounts include Facebook Pages, LinkedIn Company Pages, and YouTube Playlists. Use this to get the pageId required for publishing to Facebook/LinkedIn, or playlistIds for adding YouTube videos to playlists.

Path Parameters

Field
Type
Required
Description

accountId

string

Yes

The account ID from the List Accounts endpoint

Response

Status Code: 200 OK

Field
Type
Description

items

array

List of subaccounts

items[].id

string

Subaccount ID. Use this as target.pageId when publishing to Facebook or LinkedIn.

items[].accountId

string

Parent account ID

items[].name

string

Name of the page

If subaccounts is empty, the user needs to connect a Facebook Page, LinkedIn Company Page, or YouTube account in Accounts.

Example


List Available LinkedIn Pages

Use GET /v2/integrations/oauth2/linkedin/pages?accountId=ACCOUNT_ID to list organization pages the connected LinkedIn account administers. accountId is required and comes from List Connected Accounts.

The response contains items, each with id, name, and isActive. isActive: true means Blotato is already connected to the page. This endpoint discovers available pages. For publishing, retrieve connected page IDs through List Subaccounts above.

Connect missing pages in Accounts, then repeat the subaccounts lookup. A 422 response for an expired connection requires reconnection. The route limit is 20 requests per minute.

How to Get the Right IDs for Publishing

Different platforms need different IDs. Here is how to get them for each platform.

Twitter, Instagram, TikTok, Threads, Bluesky

These platforms need only an accountId:

  1. Call GET /v2/users/me/accounts?platform=twitter (replace with your platform)

  2. Use items[].id as accountId in your publish request

  3. If multiple accounts are returned, use fullname or username to identify the correct one, or ask the user which account to use

YouTube

YouTube needs an accountId. To add videos to playlists, also fetch subaccounts to get playlist IDs:

  1. Call GET /v2/users/me/accounts?platform=youtube

  2. Use items[].id as accountId

  3. Call GET /v2/users/me/accounts/{accountId}/subaccounts

  4. Use items[].id values as target.playlistIds in your publish request

  5. playlistIds is optional -- omit it to publish without adding to a playlist

Facebook

Facebook requires both accountId and pageId:

  1. Call GET /v2/users/me/accounts?platform=facebook

  2. Use items[].id as accountId

  3. Call GET /v2/users/me/accounts/{accountId}/subaccounts

  4. Use items[].id as target.pageId in your publish request

  5. If multiple pages are returned, use name to identify the correct one, or ask the user which page to use

Full example:

LinkedIn Company Page

To post to a LinkedIn Company Page instead of your personal profile:

  1. Call GET /v2/users/me/accounts?platform=linkedin

  2. Use items[].id as accountId

  3. Call GET /v2/users/me/accounts/{accountId}/subaccounts

  4. Use items[].id as target.pageId

  5. If you skip pageId, the post goes to your personal LinkedIn profile

Pinterest

Pinterest requires a boardId. Fetch boards with the List Pinterest Boards endpoint:

  1. Call GET /v2/users/me/accounts?platform=pinterest

  2. Use items[].id as accountId

  3. Call GET /v2/social/pinterest/boards?accountId={accountId}

  4. Use items[].id as target.boardId in your publish request

  5. If multiple boards are returned, use name to identify the correct one, or ask the user which board to use

Web app shortcut: you can also grab a Board ID without the API. Go to Accounts, scroll to your Pinterest account, and select a Board -- Blotato copies its Board ID to your clipboard. Use this if the boards endpoint returns an empty list.

Full example:


List Pinterest Boards

Endpoint

Base URL: https://backend.blotato.com/v2

URL: /social/pinterest/boards

Method: GET

Description

Returns boards owned by a connected Pinterest account. Use this to get the boardId required when publishing a pin.

Query Parameters

Field
Type
Required
Description

accountId

string

Yes

Blotato Pinterest account ID from GET /users/me/accounts.

Response

Status Code: 200 OK

Field
Type
Description

items

array

List of Pinterest boards (max 250)

items[].id

string

Board ID. Use this as target.boardId when publishing a pin.

items[].name

string

Display name of the board on Pinterest

Example

Last updated