Accounts API
Manage connected social media accounts, check health, and view account details.
List Accounts
GET /v1/accounts
Returns all connected social accounts for the current API key.
Query Parameters
platform— string (optional) — Filter by platform name (e.g.instagram,twitter)
Examples
Python
import httpx
resp = httpx.get(
"https://api.socialsyncerapi.com/v1/accounts",
headers={"Authorization": "Bearer sk_your_api_key"}
)
for account in resp.json()["accounts"]:
print(f"{account['platform']}: {account['username']} ({account['accountId']})") curl
curl "https://api.socialsyncerapi.com/v1/accounts" \
-H "Authorization: Bearer sk_your_api_key" Node.js
const resp = await fetch("https://api.socialsyncerapi.com/v1/accounts", {
headers: { "Authorization": "Bearer sk_your_api_key" }
});
const data = await resp.json();
data.accounts.forEach(a => console.log(a.platform + ":", a.username)); Response
{
"accounts": [
{
"platform": "instagram",
"accountId": "ig_user_id",
"username": "mybusiness",
"connectedAt": "2026-01-15T10:00:00Z"
},
{
"platform": "facebook",
"accountId": "fb_page_id",
"username": "My Business Page",
"connectedAt": "2026-01-15T10:05:00Z"
},
{
"platform": "twitter",
"accountId": "tw_user_id",
"username": "@mybusiness",
"connectedAt": "2026-01-15T10:10:00Z"
}
]
} Account Health
GET /v1/accounts/health
Check if your connected accounts are healthy. Returns token validity, permissions status, and recommendations.
Response
{
"accounts": [
{
"platform": "instagram",
"accountId": "ig_user_id",
"username": "mybusiness",
"health": "healthy",
"tokenValid": true,
"permissions": ["instagram_basic", "instagram_content_publish"],
"recommendations": []
},
{
"platform": "twitter",
"accountId": "tw_user_id",
"username": "@mybusiness",
"health": "warning",
"tokenValid": true,
"permissions": ["tweet.read", "tweet.write"],
"recommendations": ["Token expires in 3 days. Consider reconnecting."]
}
]
} Disconnect Account
DELETE /v1/accounts/{platform}/{accountId}
Remove a connected social account. This revokes the OAuth token and deletes stored credentials.
Example
curl -X DELETE https://api.socialsyncerapi.com/v1/accounts/instagram/ig_user_id \
-H "Authorization: Bearer sk_your_api_key" Response
{
"deleted": true
} Account ID Format
Each platform uses a different format for account IDs:
- Instagram: Instagram User ID (numeric, e.g.
17841400123456789) - Facebook: Facebook Page ID (numeric, e.g.
111222333444555) - Threads: Threads User ID (numeric)
- TikTok: TikTok Open ID (alphanumeric)
- Twitter: Twitter User ID (numeric, e.g.
1234567890)
The account ID is returned when you connect an account via OAuth. You can also retrieve it from GET /v1/accounts.