Zernio
Zernio
OverviewCLIPosting commandsInbox commandsAnalytics commandsAds commandsPlatform commandsManagement commands
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
CLI

Posting commands

Create profiles, connect accounts, publish and schedule posts, upload media and manage queue slots from the terminal, with posts:create and its flags.


The posting commands create profiles, connect accounts, publish and schedule posts, upload media, manage queue slots and validate content before it goes out. Install the CLI with npm install -g @zernio/cli and log in with zernio auth:login, both covered on the CLI page.

First command

posts:create carries the whole posting surface in its flags:

FlagWhat it sets
--textThe post text
--accountsThe account ids to publish to; the CLI looks each one up and fills in its platform
--scheduledAtThe scheduled time. Omit it to publish now
--timezoneIANA name, such as America/New_York
--draftSaves the post as a draft instead
--mediaThe mediaItems of Create post
--title, --tags, --hashtagsThe fields of the same name on Create post
--prettyIndents the JSON output

Publish to one account right now:

zernio posts:create \
  --text "The spring collection is live." \
  --accounts 66b2e19d8c3f5a7e9d0b1c2d \
  --pretty

Output (the 201 body of POST /v1/posts):

{
  "message": "Post published successfully",
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "content": "The spring collection is live.",
    "status": "published",
    "publishedAt": "2027-01-01T17:00:05Z",
    "platforms": [
      {
        "platform": "linkedin",
        "accountId": { "_id": "66b2e19d8c3f5a7e9d0b1c2d", "platform": "linkedin", "username": "acme" },
        "status": "published",
        "publishedAt": "2027-01-01T17:00:05Z",
        "platformPostId": "urn:li:share:7123456789012345678",
        "platformPostUrl": "https://www.linkedin.com/feed/update/urn:li:share:7123456789012345678"
      }
    ]
  }
}

Commands

zernio --help prints the full command list. Each command maps to one endpoint in the reference:

GroupReference
profiles:, accounts:Profiles, accounts
connect:Connect an account
posts:Posts
media:Media
queue:Queue slots
validate:Validation

The posts group is written by hand, which is why its flags read --text and --accounts rather than the API's content and platforms. The generated groups name their flags after the API fields.

How it behaves

Zernio reads the scheduled time in the timezone you pass

A --scheduledAt value without a Z or an offset (2027-01-01T12:00:00) is read as local time in --timezone. A value that carries one is taken as it is, and --timezone has no effect on it. An unknown timezone name returns 400.

Zernio publishes to every account in one request

--accounts takes several ids. When you omit --scheduledAt, all of them publish inside that one request, which is why the response carries a platformPostUrl per account. A post where some accounts published and others failed comes back as 207 with post.status set to partial; Post lifecycle covers the statuses.

Zernio answers 403 when a target account is disconnected

{
  "error": "Account 6a0f6d2e520992756d96bb6c (facebook \"My Page\") is disconnected and cannot be posted to. Facebook tokens expired. Please reconnect your Facebook account. After reconnecting, refresh your account IDs from GET /v1/accounts.",
  "code": "ACCOUNT_DISCONNECTED"
}

Reconnect the account, then run zernio accounts:list and use the ids it returns. zernio accounts:health reports which accounts are in this state before you post.

Related

  • CLI: install, log in, and the first posts:create
  • Create post: every field posts:create maps its flags to
  • Connecting accounts: what the connect: commands drive
  • Media uploads: limits behind media:upload and validate:media
  • Queue scheduling: what a queue slot is
Was this page helpful?

CLI

Install the Zernio CLI, log in, and schedule a post from the terminal with one command that prints the API response as JSON.

Inbox commands

Read and answer DMs, comments and reviews from the terminal, with one runnable example and the response it prints.

On this page

First commandCommandsHow it behavesZernio reads the scheduled time in the timezone you passZernio publishes to every account in one requestZernio answers 403 when a target account is disconnectedRelated