Account

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 Blotato Settingsarrow-up-right.

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 and LinkedIn Company Pages. Use this to get the pageId required for publishing to these platforms.

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 or LinkedIn Company Page in Blotato Settingsarrow-up-right.

Example


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, YouTube

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

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. Board IDs are not available via the API. Ask the user to provide their Pinterest Board ID.

The user finds their Board ID in Blotato:

  1. Create a draft Pinterest post

  2. Click "Publish" and choose a board

  3. Copy the Board ID from the dropdown

Use the Board ID as target.boardId in your publish request.

Last updated