GET/v1/social-accounts

List all connected social media accounts in the current workspace. Returns active accounts by default; disconnected accounts are excluded unless queried by ID.

Requires AuthRate Limited

Overview

After connecting social accounts (either via the dashboard or the Connect flow), this endpoint returns them with their platform, status, and the id you need for publishing.

Filter by platform to list only Instagram accounts, or by external_user_id to find accounts onboarded by a specific end user via Connect.

Authentication

Authorization: Bearer up_live_xxxx

Request

GET https://api.unipost.dev/v1/social-accounts
Query Parameters
ParameterTypeRequiredDescription
platformstringXFilter by platform: "twitter", "linkedin", "instagram", "threads", "tiktok", "youtube", "bluesky".
external_user_idstringXFilter by the external_user_id set during a Connect flow. Useful for looking up accounts onboarded by a specific end user.

Examples

const response = await fetch(
  'https://api.unipost.dev/v1/social-accounts',
  {
    headers: {
      'Authorization': 'Bearer up_live_xxxx',
    },
  }
);

const { data } = await response.json();
for (const account of data) {
  console.log(account.id, account.platform, account.status);
}

Response

200 — Success
{
  "data": [
    {
      "id": "sa_instagram_123",
      "platform": "instagram",
      "account_name": "magicxiaobo416",
      "account_avatar_url": "https://...",
      "status": "active",
      "connection_type": "byo",
      "connected_at": "2026-04-02T10:00:00Z",
      "external_user_id": null
    },
    {
      "id": "sa_linkedin_456",
      "platform": "linkedin",
      "account_name": "Xiaobo Yu",
      "account_avatar_url": "https://...",
      "status": "active",
      "connection_type": "managed",
      "connected_at": "2026-04-05T14:30:00Z",
      "external_user_id": "user_abc"
    }
  ]
}
Response fields
ParameterTypeRequiredDescription
idstringXSocial account ID. Use this as account_id in POST /v1/social-posts.
platformstringXPlatform name: twitter, linkedin, instagram, threads, tiktok, youtube, bluesky.
account_namestring?XHuman-readable handle or display name from the platform.
statusstringX"active" (ready to post), "reconnect_required" (token expired, needs re-auth).
connection_typestringX"byo" (White-label — your own credentials) or "managed" (connected via UniPost Connect flow).
connected_atstringXISO 8601 timestamp when the account was connected.
external_user_idstring?XYour identifier for the end user, set during a Connect session. Null for BYO accounts.
connection_type explained
byo = White-label (your own platform credentials, OAuth shows your app name).
managed= Connected via UniPost Connect flow (end-user OAuth through UniPost's hosted page).

Error Codes

CodeHTTPDescription
UNAUTHORIZED401Missing or invalid API key.
INTERNAL_ERROR500Server error.
← View full docs|Last updated: April 2026 · API v1