OverviewProductsPlatformsAPI ReferenceResources
Accounts

List accounts

GEThttps://zernio.com/api/v1/accounts

Returns connected accounts. Only includes accounts within the plan limit by default. Follower data requires analytics add-on.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Query parameters

Optional
profileIdstring

Filter accounts by profile ID. Must be a valid ObjectId.

platformstring

Filter accounts by platform (e.g. "instagram", "twitter").

statusstringOne of connected | disconnected

Filter accounts by connection status. connected returns healthy accounts; disconnected returns accounts that need reconnection (per the same reconnection check surfaced in the dashboard). Omit to return accounts in any status. When combined with page/limit, pagination totals reflect the filtered result set.

searchstring, max 100

Case-insensitive match on the account username, display name or platform user id. A 24-character hexadecimal value is read as an account id and matches only that exact account. Combine with page/limit to paginate the matches.

categorystringOne of social | ads | communication | blogs | crm | analytics

Only accounts of this kind. ads = ad accounts (Meta, Google, LinkedIn, Pinterest, TikTok, X, OpenAI, Reddit, Microsoft), communication = WhatsApp, Telegram, Discord, Slack, iMessage, LINE and WeChat, blogs = Shopify and WordPress, crm = HubSpot, analytics = Google Analytics, social = every other platform.

sortstringOne of account | platform | profile | status | connected

Sort an offset-paginated listing (page and limit) by account name, platform, profile name, status (accounts needing a reconnect first when ascending) or connection date. Ties keep the default order: platform, then newest first.

orderstringDefault ascOne of asc | desc

Direction for sort.

includeOverLimitbooleanDefault false

When true, includes accounts from over-limit profiles.

excludeHiddenbooleanDefault false

When true, leaves out accounts the dashboard does not show as connections:

  • posting accounts with enabled: false (ads accounts are always kept, whatever their enabled value);
  • the internal sms and phone accounts behind each phone number.

Applied before pagination, so page totals and statusCounts count only the remaining accounts. Sandbox accounts added by includeSandbox are appended after this filter. Accepts true or false in any letter case; any other value returns 400.

platformsstring

Comma-separated platforms (up to 50) to list together, the several-platform form of platform. Applied before pagination.

adAccountRowsbooleanDefault false

When true, lists every ads account row, one per ad account. By default an API key or OAuth app sees each ads login once per profile and platform, as the single ads connection it had before rows per ad account: its oldest row.

Only changes the result once ads are connected as one row per ad account; until then the two shapes are the same. Applied before pagination. Accepts true or false in any letter case; any other value returns 400.

includeCreatorAccountsbooleanDefault false

When true, also lists the accounts creators connected to your creator campaigns. They sit on creator profiles, which GET /v1/profiles does not list, and are left out by default.

Asking for one creator profile by profileId lists its accounts either way. Applied before pagination. Accepts true or false in any letter case; any other value returns 400.

includeSandboxbooleanDefault false

When true, appends the shared WhatsApp sandbox account and the iMessage sandbox account to the list when they are active, honouring platform but no other filter.

Ignored on a paginated request (page, limit or cursor) and together with perProfile. Accepts true or false in any letter case; any other value returns 400.

includeStatusCountsbooleanDefault false

When true, the response carries statusCounts: how many accounts match every other filter of the request (with status lifted) in total and how many of those need a reconnection. Accepts true or false in any letter case; any other value returns 400.

pageinteger

Page number (1-based) for offset paging. Requires limit; omit page, limit and cursor for an unpaged listing (at most 500 accounts for an API key or OAuth app).

limitinteger

Page size. With page, an offset page; alone or with cursor, a cursor page.

cursorstring

Opaque cursor from a previous response's pagination.nextCursor; returns the next page of limit accounts (500 when limit is omitted). A cursor we cannot parse returns 400. Cannot be combined with page.

profileIdsstring

Comma-separated profile IDs (up to 50) to preview, together with perProfile. The response then also carries profileTotals.

perProfileinteger

Return a preview of each profile in profileIds: the newest account of every platform it has, topped up to at least N. Requires profileIds; cannot be combined with page, limit or cursor.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Pagination

Server-side pagination is optional. When omitted, the dashboard gets every account, while an API key or OAuth app gets at most 500: the first cursor page, ordered by account id.

When that cap cuts the list, the response carries warning and pagination.nextCursor, plus the X-Result-Truncated: true and X-Result-Limit: 500 headers. Pass nextCursor back as cursor (with limit) to list the rest.

  • Cursor paging: send limit alone for the first page, then pass pagination.nextCursor back as cursor until it is null. Pages are ordered by account id, so accounts added or removed between calls never shift a page. Cannot be combined with page, sort or perProfile.
  • Offset paging: send page and limit together. Out-of-range page/limit values are rejected with 400 rather than silently clamped.
GET/v1/accounts
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.accounts.listAccounts();console.log(data);
{  "accounts": [    {      "_id": "64e1...",      "platform": "twitter",      "profileId": {        "_id": "64f0...",        "name": "My Brand",        "slug": "my-brand"      },      "username": "@acme",      "displayName": "Acme",      "profileUrl": "https://x.com/acme",      "isActive": true    }  ],  "hasAnalyticsAccess": false}
OpenAPI specification
Was this page helpful?