Pogton
Docs Accounts

API reference

Accounts

List the social accounts your users connected, check whether an account needs to reconnect, look up boards and playlists, import their post history, and disconnect an account.

An account is one connected social profile, page, channel, board or location. A user can have several accounts on the same platform, such as a LinkedIn profile and two LinkedIn company pages. You publish to accounts by their id.

The account object

{
  "id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed",
  "platform": "linkedin",
  "type": "organization",
  "name": "Acme Inc.",
  "username": "acme",
  "avatar_url": "https://media.licdn.com/...",
  "platform_account_id": "urn:li:organization:12345",
  "user_id": "user_123",
  "status": "active",
  "status_reason": null,
  "token_expires_at": "2026-12-20T09:00:00.000Z",
  "scopes": ["w_member_social", "w_organization_social"],
  "connected_at": "2026-10-21T09:00:00.000Z",
  "revoked_at": null,
  "test": false
}
FieldDescription
idUse in account_ids when publishing.
typeWhat the account is on the platform: personal, page, organization, business, channel, board, location …
platform_account_idThe page, channel, board, organization or location ID on the platform.
statusactive, needs_reauth or revoked.
status_reasonWhy the account needs to reconnect, from the platform's error.
token_expires_atWhen the current access token expires. Pogton refreshes tokens before they expire where the platform allows it.
testtrue for sandbox accounts.

Responses also include _id, accountType, subAccountId, subAccountName and connectedAt (milliseconds) for clients of the first API version. Prefer the snake_case fields.

Account status

StatusMeaningWhat to do
activePublishing works.Nothing.
needs_reauthThe platform rejected the token, or it expired and couldn't be refreshed. Posts to the account fail with auth_expired.Send the user a connect link with account_id.
revokedThe account was disconnected.The user can connect it again with a new link; it gets the same ID.

When an account moves to needs_reauth, Pogton sends one account.needs_reauth webhook. Use it to email the user or show a banner in your app.

List a user's accounts

curl "https://pogton.com/api/v1/accounts?user_id=user_123&status=needs_reauth" \
  -H "Authorization: Bearer pk_3f9a..."
QueryRequiredDescription
user_idYesYour ID for the user.
platformNoOnly accounts on this platform.
statusNoactive or needs_reauth.
{
  "data": [
    { "id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed", "platform": "linkedin", "name": "Acme Inc.", "status": "needs_reauth", "status_reason": "Token expired and could not be refreshed: LinkedIn tokens can't be refreshed", "...": "..." }
  ],
  "accounts": ["... same as data, for the first API version ..."]
}

A live key lists real accounts and a test key lists sandbox accounts. Disconnected accounts are not listed.

Get an account

curl https://pogton.com/api/v1/accounts/j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed \
  -H "Authorization: Bearer pk_3f9a..."

Returns the account object, including disconnected accounts (status: "revoked").

Lookup resources

Some platform options take an ID that the user picks from a list: a Pinterest board, a YouTube playlist. GET /api/v1/platforms lists the kinds each platform offers in resources.

curl https://pogton.com/api/v1/accounts/j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed/resources/boards \
  -H "Authorization: Bearer pk_3f9a..."
{
  "data": [
    { "id": "987654321", "name": "Spring collection" },
    { "id": "987654322", "name": "Recipes" }
  ]
}

Extra query parameters are passed to the platform. A kind the platform doesn't have returns 404 unknown_resource with the kinds it does have.

Post history

GET /api/v1/accounts/{id}/history lists the posts an account already has on the platform, newest first, including the ones published outside Pogton. Use it to import a user's past posts when they connect, or to show their whole feed.

curl "https://pogton.com/api/v1/accounts/j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed/history?limit=25" \
  -H "Authorization: Bearer pk_3f9a..."
{
  "account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed",
  "platform": "instagram",
  "data": [
    {
      "platform_post_id": "17998456123456789",
      "url": "https://www.instagram.com/p/DA1b2C3d4E5/",
      "text": "Spring is here",
      "type": "carousel",
      "created_at": "2026-10-14T09:12:00.000Z",
      "media": [
        { "type": "image", "url": "https://scontent.cdninstagram.com/...", "thumbnail_url": null, "alt_text": null }
      ],
      "metrics": { "likes": 182, "comments": 14 },
      "pogton_post_id": null
    }
  ],
  "next_cursor": "QVFIUmx1...",
  "has_more": true
}

Pass next_cursor as cursor for the next page. limit is 1 to 100 (default 25); some platforms return fewer per page: TikTok 20, Mastodon 40, YouTube 50.

FieldMeaning
platform_post_idThe post's ID on the platform, the same kind of ID Pogton posts have in targets[].platform_post_id
typetext, image, carousel, video, reel, short, story, link, pin, update or document
mediaImages and videos with URLs as the platform returns them. Platform CDN URLs expire; download what you want to keep.
metricsCounts the platform returns with the list, or null. Use analytics for more.
pogton_post_idThe Pogton post that published it, or null when it was published outside Pogton

Platforms with history: true in GET /api/v1/platforms support it, with the permissions the connect page already asks for:

PlatformWhat's listed
FacebookThe Page's published posts
InstagramThe professional account's posts, reels and carousels
ThreadsThe account's threads, without reposts
YouTubeThe channel's uploads
LinkedInCompany page posts. LinkedIn doesn't let apps read members' own posts, so personal profiles return 400 not_supported. LinkedIn returns media as references, so media is empty.
PinterestThe pins on the connected board
TikTokThe account's videos
BlueskyThe account's posts, without replies and reposts
MastodonThe account's posts, without boosts
Google Business ProfileThe location's updates

X, Telegram and Discord return 400 not_supported: X charges for every post read through its API, Telegram bots can't read messages from before they joined, and Discord webhooks can only post. Sandbox accounts return two sample posts.

Disconnect an account

curl -X DELETE https://pogton.com/api/v1/accounts/j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed \
  -H "Authorization: Bearer pk_3f9a..."
{ "success": true, "account_id": "j97fk2m8q4r1t6v3w8x0y5z2a7b4c9ed", "platform": "linkedin" }

Pogton deletes the tokens and sends account.disconnected with reason: "api". Posts already published stay on the platform. Scheduled posts to the account fail when they come due. Users can also disconnect accounts themselves on the connect page (reason: "end_user").

To remove a user and all their accounts, use DELETE /api/v1/users/{user_id}.

Analytics

Account metrics and follower history are on the Analytics page.