accounts
Check account health
Returns detailed health info for a specific account including token status, permissions, and recommendations.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
accountIdstring
The account ID to check
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.accounts.getAccountHealth({ path: { accountId: 'account_abc123', },});console.log(data);{
"accountId": "abc123",
"platform": "instagram",
"username": "myaccount",
"displayName": "My Account",
"status": "healthy",
"tokenStatus": {
"valid": true,
"expiresAt": "2025-06-15T00:00:00Z",
"expiresIn": "180 days",
"needsRefresh": false
},
"permissions": {
"posting": [
{
"scope": "instagram_basic",
"granted": true,
"required": true
},
{
"scope": "instagram_content_publish",
"granted": true,
"required": true
}
],
"analytics": [
{
"scope": "instagram_manage_insights",
"granted": true,
"required": false
}
],
"optional": [],
"canPost": true,
"canFetchAnalytics": true,
"missingRequired": []
},
"issues": [],
"recommendations": []
}{
"error": "Unauthorized"
}{
"error": "Not found"
}List accounts GET
Returns connected social accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on. Supports optional server-side pagination via page/limit params. When omitted, returns all accounts (backward-compatible).
Check accounts health GET
Returns health status of all connected accounts including token validity, permissions, and issues needing attention.