Social0|Docs
API

Accounts

List, connect, and disconnect social accounts via the Social0 API.

GET /v1/accounts

List connected social accounts for the authenticated user.

Auth: Bearer API key (required)

Response 200

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "platform": "linkedin",
      "username": "jane",
      "profile_image_url": "https://example.com/avatar.jpg",
      "is_active": true,
      "token_expires_at": "2026-08-01T00:00:00.000Z",
      "token_status": "ok",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}
FieldTypeDescription
idUUIDConnected account ID — use in platforms when posting
platformstringPlatform enum (linkedin, instagram, etc.)
usernamestringHandle or display name
profile_image_urlstringAvatar URL
is_activebooleanWhether the account is active
token_expires_atdatetimeWhen the OAuth token expires
token_statusstringok, expiring_soon, or expired
created_atdatetimeWhen the account was connected

cURL

curl https://api.social0.app/v1/accounts \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

JavaScript

const res = await fetch("https://api.social0.app/v1/accounts", {
  headers: { Authorization: `Bearer ${process.env.SOCIAL0_API_KEY}` },
});
const { data } = await res.json();
const accountIds = data.map((a) => a.id);

Python

import requests, os

r = requests.get(
    "https://api.social0.app/v1/accounts",
    headers={"Authorization": f"Bearer {os.environ['SOCIAL0_API_KEY']}"},
)
accounts = r.json()["data"]

Errors

HTTPCodeWhen
401invalid_api_keyMissing or invalid API key

POST /v1/accounts/connect

Returns an OAuth authorization URL to open in a browser. Does not connect an account inside the API call — the user must complete OAuth in the browser; then GET /v1/accounts shows the new account.

Recommended flow: connect once in Dashboard → Connections, then use GET /v1/accounts for UUIDs. Use this endpoint only if you build custom onboarding that redirects users to OAuth.

Auth: Bearer API key (required)

Request body

{
  "platform": "linkedin"
}
FieldTypeRequiredDescription
platformstringYesPlatform to connect

Supported platform values: linkedin, instagram, youtube, pinterest, tiktok, threads, facebook

Not supported (dashboard only): twitter_x, bluesky (BYOK — handle + app password in dashboard)

Response 200

{
  "authorization_url": "https://..."
}

Redirect the end user to authorization_url in a browser. They must be logged into Social0.

cURL

curl -X POST https://api.social0.app/v1/accounts/connect \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform": "linkedin"}'

Errors

HTTPCodeWhen
400validation_errorUnsupported platform (twitter_x, bluesky)
401invalid_api_keyMissing or invalid API key

DELETE /v1/accounts/:id

Disconnect an account. Revokes token on the platform (best effort) and deletes the row.

Auth: Bearer API key (required)

Path parameters

ParamTypeDescription
idUUIDConnected account ID

Response 204

Empty body on success.

cURL

curl -X DELETE https://api.social0.app/v1/accounts/ACCOUNT_UUID \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

Errors

HTTPCodeWhen
401invalid_api_keyMissing or invalid API key
403forbiddenAccount belongs to another user
404not_foundAccount not found

On this page