New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@zernio/node

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zernio/node

The official Node.js library for the Zernio API

latest
Source
npmnpm
Version
0.2.40
Version published
Weekly downloads
3.4K
6.55%
Maintainers
2
Weekly downloads
 
Created
Source

Zernio

Zernio Node.js SDK

npm version License

One API to post everywhere. 14 platforms, zero headaches.

The official Node.js SDK for the Zernio API — schedule and publish social media posts across Instagram, TikTok, YouTube, LinkedIn, X/Twitter, Facebook, Pinterest, Threads, Bluesky, Reddit, Snapchat, Telegram, WhatsApp, and Google Business Profile with a single integration.

Installation

npm install @zernio/node

Quick Start

import Zernio from '@zernio/node';

const zernio = new Zernio(); // Uses ZERNIO_API_KEY env var

// Publish to multiple platforms with one call
const { data: post } = await zernio.posts.createPost({
  body: {
    content: 'Hello world from Zernio!',
    platforms: [
      { platform: 'twitter', accountId: 'acc_xxx' },
      { platform: 'linkedin', accountId: 'acc_yyy' },
      { platform: 'instagram', accountId: 'acc_zzz' },
    ],
    publishNow: true,
  },
});

console.log(`Published to ${post.platforms.length} platforms!`);

Configuration

const zernio = new Zernio({
  apiKey: 'your-api-key', // Defaults to process.env['ZERNIO_API_KEY']
  baseURL: 'https://zernio.com/api',
  timeout: 60000,
});

Examples

Schedule a Post

const { data: post } = await zernio.posts.createPost({
  body: {
    content: 'This post will go live tomorrow at 10am',
    platforms: [{ platform: 'instagram', accountId: 'acc_xxx' }],
    scheduledFor: '2025-02-01T10:00:00Z',
  },
});

Platform-Specific Content

Customize content per platform while posting to all at once:

const { data: post } = await zernio.posts.createPost({
  body: {
    content: 'Default content',
    platforms: [
      {
        platform: 'twitter',
        accountId: 'acc_twitter',
        platformSpecificContent: 'Short & punchy for X',
      },
      {
        platform: 'linkedin',
        accountId: 'acc_linkedin',
        platformSpecificContent: 'Professional tone for LinkedIn with more detail.',
      },
    ],
    publishNow: true,
  },
});

Upload Media

// 1. Get presigned upload URL
const { data: presign } = await zernio.media.getMediaPresignedUrl({
  body: { filename: 'video.mp4', contentType: 'video/mp4' },
});

// 2. Upload your file
await fetch(presign.uploadUrl, {
  method: 'PUT',
  body: videoBuffer,
  headers: { 'Content-Type': 'video/mp4' },
});

// 3. Create post with media
const { data: post } = await zernio.posts.createPost({
  body: {
    content: 'Check out this video!',
    mediaUrls: [presign.publicUrl],
    platforms: [
      { platform: 'tiktok', accountId: 'acc_xxx' },
      { platform: 'youtube', accountId: 'acc_yyy', youtubeTitle: 'My Video' },
    ],
    publishNow: true,
  },
});

Get Analytics

const { data } = await zernio.analytics.getAnalytics({
  query: { postId: 'post_xxx' },
});

console.log('Views:', data.analytics.views);
console.log('Likes:', data.analytics.likes);
console.log('Engagement Rate:', data.analytics.engagementRate);

List Connected Accounts

const { data } = await zernio.accounts.listAccounts();

for (const account of data.accounts) {
  console.log(`${account.platform}: @${account.username}`);
}

Error Handling

import Zernio, { ZernioApiError, RateLimitError, ValidationError } from '@zernio/node';

try {
  await zernio.posts.createPost({ body: { /* ... */ } });
} catch (error) {
  if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry in ${error.getSecondsUntilReset()}s`);
  } else if (error instanceof ValidationError) {
    console.log('Invalid request:', error.fields);
  } else if (error instanceof ZernioApiError) {
    console.log(`Error ${error.statusCode}: ${error.message}`);
  }
}

SDK Reference

Posts

MethodDescription
posts.listPosts()List posts
posts.bulkUploadPosts()Bulk upload from CSV
posts.createPost()Create post
posts.getPost()Get post
posts.updatePost()Update post
posts.updatePostMetadata()Update post metadata
posts.deletePost()Delete post
posts.editPost()Edit published post
posts.retryPost()Retry failed post
posts.unpublishPost()Unpublish post

Accounts

MethodDescription
accounts.getAllAccountsHealth()Check accounts health
accounts.listAccounts()List accounts
accounts.getAccountHealth()Check account health
accounts.getFollowerStats()Get follower stats
accounts.getGoogleBusinessReviews()Get reviews
accounts.getLinkedInMentions()Resolve LinkedIn mention
accounts.getTikTokCreatorInfo()Get TikTok creator info
accounts.updateAccount()Update account
accounts.deleteAccount()Disconnect account

Profiles

MethodDescription
profiles.listProfiles()List profiles
profiles.createProfile()Create profile
profiles.getProfile()Get profile
profiles.updateProfile()Update profile
profiles.deleteProfile()Delete profile

Analytics

MethodDescription
analytics.getAnalytics()Get post analytics
analytics.getBestTimeToPost()Get best times to post
analytics.getContentDecay()Get content performance decay
analytics.getDailyMetrics()Get daily aggregated metrics
analytics.getGoogleBusinessPerformance()Get Google Business Profile performance metrics
analytics.getGoogleBusinessSearchKeywords()Get Google Business Profile search keywords
analytics.getInstagramAccountInsights()Get Instagram account-level insights
analytics.getInstagramDemographics()Get Instagram audience demographics
analytics.getLinkedInAggregateAnalytics()Get LinkedIn aggregate stats
analytics.getLinkedInPostAnalytics()Get LinkedIn post stats
analytics.getLinkedInPostReactions()Get LinkedIn post reactions
analytics.getPostingFrequency()Get posting frequency vs engagement
analytics.getPostTimeline()Get post analytics timeline
analytics.getYouTubeDailyViews()Get YouTube daily views
analytics.getYouTubeDemographics()Get YouTube audience demographics

Account Groups

MethodDescription
accountGroups.listAccountGroups()List groups
accountGroups.createAccountGroup()Create group
accountGroups.updateAccountGroup()Update group
accountGroups.deleteAccountGroup()Delete group

Queue

MethodDescription
queue.listQueueSlots()List schedules
queue.createQueueSlot()Create schedule
queue.getNextQueueSlot()Get next available slot
queue.updateQueueSlot()Update schedule
queue.deleteQueueSlot()Delete schedule
queue.previewQueue()Preview upcoming slots

Webhooks

MethodDescription
webhooks.createWebhookSettings()Create webhook
webhooks.getWebhookLogs()Get delivery logs
webhooks.getWebhookSettings()List webhooks
webhooks.updateWebhookSettings()Update webhook
webhooks.deleteWebhookSettings()Delete webhook
webhooks.testWebhook()Send test webhook

API Keys

MethodDescription
apiKeys.listApiKeys()List keys
apiKeys.createApiKey()Create key
apiKeys.deleteApiKey()Delete key

Media

MethodDescription
media.getMediaPresignedUrl()Get presigned upload URL

Users

MethodDescription
users.listUsers()List users
users.getUser()Get user

Usage

MethodDescription
usage.getUsageStats()Get plan and usage stats

Logs

MethodDescription
logs.listConnectionLogs()List connection logs
logs.listPostsLogs()List publishing logs
logs.getPostLogs()Get post logs

Connect (OAuth)

MethodDescription
connect.listFacebookPages()List Facebook pages
connect.listGoogleBusinessLocations()List GBP locations
connect.listLinkedInOrganizations()List LinkedIn orgs
connect.listPinterestBoardsForSelection()List Pinterest boards
connect.listSnapchatProfiles()List Snapchat profiles
connect.getConnectUrl()Get OAuth connect URL
connect.getFacebookPages()List Facebook pages
connect.getGmbLocations()List GBP locations
connect.getLinkedInOrganizations()List LinkedIn orgs
connect.getPendingOAuthData()Get pending OAuth data
connect.getPinterestBoards()List Pinterest boards
connect.getRedditFlairs()List subreddit flairs
connect.getRedditSubreddits()List Reddit subreddits
connect.getTelegramConnectStatus()Generate Telegram code
connect.getYoutubePlaylists()List YouTube playlists
connect.updateFacebookPage()Update Facebook page
connect.updateGmbLocation()Update GBP location
connect.updateLinkedInOrganization()Switch LinkedIn account type
connect.updatePinterestBoards()Set default Pinterest board
connect.updateRedditSubreddits()Set default subreddit
connect.updateYoutubeDefaultPlaylist()Set default YouTube playlist
connect.completeTelegramConnect()Check Telegram status
connect.connectBlueskyCredentials()Connect Bluesky account
connect.connectWhatsAppCredentials()Connect WhatsApp via credentials
connect.handleOAuthCallback()Complete OAuth callback
connect.initiateTelegramConnect()Connect Telegram directly
connect.selectFacebookPage()Select Facebook page
connect.selectGoogleBusinessLocation()Select GBP location
connect.selectLinkedInOrganization()Select LinkedIn org
connect.selectPinterestBoard()Select Pinterest board
connect.selectSnapchatProfile()Select Snapchat profile

Reddit

MethodDescription
reddit.getRedditFeed()Get subreddit feed
reddit.searchReddit()Search posts

Account Settings

MethodDescription
accountSettings.getInstagramIceBreakers()Get IG ice breakers
accountSettings.getMessengerMenu()Get FB persistent menu
accountSettings.getTelegramCommands()Get TG bot commands
accountSettings.deleteInstagramIceBreakers()Delete IG ice breakers
accountSettings.deleteMessengerMenu()Delete FB persistent menu
accountSettings.deleteTelegramCommands()Delete TG bot commands
accountSettings.setInstagramIceBreakers()Set IG ice breakers
accountSettings.setMessengerMenu()Set FB persistent menu
accountSettings.setTelegramCommands()Set TG bot commands

Ad Audiences

MethodDescription
adAudiences.listAdAudiences()List custom audiences
adAudiences.createAdAudience()Create a custom audience (Meta only)
adAudiences.getAdAudience()Get audience details
adAudiences.deleteAdAudience()Delete a custom audience
adAudiences.addUsersToAdAudience()Add users to a customer list audience

Ad Campaigns

MethodDescription
adCampaigns.listAdCampaigns()List campaigns with aggregate metrics
adCampaigns.getAdTree()Get nested campaign/ad-set/ad tree
adCampaigns.updateAdCampaignStatus()Pause or resume a campaign

Ads

MethodDescription
ads.listAdAccounts()List ad accounts for a social account
ads.listAds()List ads
ads.createStandaloneAd()Create a standalone ad with custom creative
ads.getAd()Get ad details
ads.getAdAnalytics()Get ad analytics with daily breakdown
ads.updateAd()Update ad (pause/resume, budget, targeting, name)
ads.deleteAd()Cancel an ad
ads.boostPost()Boost an existing post as a paid ad
ads.searchAdInterests()Search targeting interests
ads.syncExternalAds()Sync external ads from platform ad managers

Broadcasts

MethodDescription
broadcasts.listBroadcastRecipients()List broadcast recipients
broadcasts.listBroadcasts()List broadcasts
broadcasts.createBroadcast()Create a broadcast draft
broadcasts.getBroadcast()Get broadcast details
broadcasts.updateBroadcast()Update a broadcast
broadcasts.deleteBroadcast()Delete a broadcast (draft only)
broadcasts.addBroadcastRecipients()Add recipients to a broadcast
broadcasts.cancelBroadcast()Cancel a broadcast
broadcasts.scheduleBroadcast()Schedule broadcast for later
broadcasts.sendBroadcast()Trigger immediate send

Comment Automations

MethodDescription
commentAutomations.listCommentAutomationLogs()List trigger logs for an automation
commentAutomations.listCommentAutomations()List comment-to-DM automations
commentAutomations.createCommentAutomation()Create a comment-to-DM automation
commentAutomations.getCommentAutomation()Get automation details with recent logs
commentAutomations.updateCommentAutomation()Update automation settings
commentAutomations.deleteCommentAutomation()Delete automation and all logs

Comments (Inbox)

MethodDescription
comments.listInboxComments()List commented posts
comments.getInboxPostComments()Get post comments
comments.deleteInboxComment()Delete comment
comments.hideInboxComment()Hide comment
comments.likeInboxComment()Like comment
comments.replyToInboxPost()Reply to comment
comments.sendPrivateReplyToComment()Send private reply
comments.unhideInboxComment()Unhide comment
comments.unlikeInboxComment()Unlike comment

Contacts

MethodDescription
contacts.listContacts()List contacts
contacts.bulkCreateContacts()Bulk create contacts
contacts.createContact()Create a contact
contacts.getContact()Get contact with channels
contacts.getContactChannels()List channels for a contact
contacts.updateContact()Update a contact
contacts.deleteContact()Delete a contact

Custom Fields

MethodDescription
customFields.listCustomFields()List custom field definitions
customFields.createCustomField()Create a custom field definition
customFields.updateCustomField()Update a custom field definition
customFields.deleteCustomField()Delete a custom field definition
customFields.clearContactFieldValue()Clear a custom field value
customFields.setContactFieldValue()Set a custom field value

GMB Attributes

MethodDescription
gmbAttributes.getGoogleBusinessAttributes()Get attributes
gmbAttributes.updateGoogleBusinessAttributes()Update attributes

GMB Food Menus

MethodDescription
gmbFoodMenus.getGoogleBusinessFoodMenus()Get food menus
gmbFoodMenus.updateGoogleBusinessFoodMenus()Update food menus

GMB Location Details

MethodDescription
gmbLocationDetails.getGoogleBusinessLocationDetails()Get location details
gmbLocationDetails.updateGoogleBusinessLocationDetails()Update location details

GMB Media

MethodDescription
gmbMedia.listGoogleBusinessMedia()List media
gmbMedia.createGoogleBusinessMedia()Upload photo
gmbMedia.deleteGoogleBusinessMedia()Delete photo

GMB Place Actions

MethodDescription
gmbPlaceActions.listGoogleBusinessPlaceActions()List action links
gmbPlaceActions.createGoogleBusinessPlaceAction()Create action link
gmbPlaceActions.deleteGoogleBusinessPlaceAction()Delete action link

Messages (Inbox)

MethodDescription
messages.listInboxConversations()List conversations
messages.createInboxConversation()Create conversation
messages.getInboxConversation()Get conversation
messages.getInboxConversationMessages()List messages
messages.updateInboxConversation()Update conversation status
messages.deleteInboxMessage()Delete message
messages.addMessageReaction()Add reaction
messages.editInboxMessage()Edit message
messages.removeMessageReaction()Remove reaction
messages.sendInboxMessage()Send message
messages.sendTypingIndicator()Send typing indicator
messages.uploadMediaDirect()Upload media file

Reviews (Inbox)

MethodDescription
reviews.listInboxReviews()List reviews
reviews.deleteInboxReviewReply()Delete review reply
reviews.replyToInboxReview()Reply to review

Sequences

MethodDescription
sequences.listSequenceEnrollments()List enrollments for a sequence
sequences.listSequences()List sequences
sequences.createSequence()Create a sequence
sequences.getSequence()Get sequence with steps
sequences.updateSequence()Update a sequence
sequences.deleteSequence()Delete a sequence
sequences.activateSequence()Activate a sequence
sequences.enrollContacts()Enroll contacts in a sequence
sequences.pauseSequence()Pause a sequence
sequences.unenrollContact()Unenroll a contact from a sequence

Twitter Engagement

MethodDescription
twitterEngagement.bookmarkPost()Bookmark a tweet
twitterEngagement.followUser()Follow a user
twitterEngagement.removeBookmark()Remove bookmark
twitterEngagement.retweetPost()Retweet a post
twitterEngagement.undoRetweet()Undo retweet
twitterEngagement.unfollowUser()Unfollow a user

Validate

MethodDescription
validate.validateMedia()Validate media URL
validate.validatePost()Validate post content
validate.validatePostLength()Validate post character count
validate.validateSubreddit()Check subreddit existence

WhatsApp

MethodDescription
whatsapp.listWhatsAppGroupChats()List active groups
whatsapp.listWhatsAppGroupJoinRequests()List join requests
whatsapp.bulkDeleteWhatsAppContacts()Bulk delete contacts
whatsapp.bulkUpdateWhatsAppContacts()Bulk update contacts
whatsapp.createWhatsAppBroadcast()Create broadcast
whatsapp.createWhatsAppContact()Create contact
whatsapp.createWhatsAppGroupChat()Create group
whatsapp.createWhatsAppGroupInviteLink()Create invite link
whatsapp.createWhatsAppTemplate()Create template
whatsapp.getWhatsAppBroadcast()Get broadcast
whatsapp.getWhatsAppBroadcastRecipients()List recipients
whatsapp.getWhatsAppBroadcasts()List broadcasts
whatsapp.getWhatsAppBusinessProfile()Get business profile
whatsapp.getWhatsAppContact()Get contact
whatsapp.getWhatsAppContacts()List contacts
whatsapp.getWhatsAppDisplayName()Get display name and review status
whatsapp.getWhatsAppGroupChat()Get group info
whatsapp.getWhatsAppGroups()List contact groups
whatsapp.getWhatsAppTemplate()Get template
whatsapp.getWhatsAppTemplates()List templates
whatsapp.updateWhatsAppBusinessProfile()Update business profile
whatsapp.updateWhatsAppContact()Update contact
whatsapp.updateWhatsAppDisplayName()Request display name change
whatsapp.updateWhatsAppGroupChat()Update group settings
whatsapp.updateWhatsAppTemplate()Update template
whatsapp.deleteWhatsAppBroadcast()Delete broadcast
whatsapp.deleteWhatsAppContact()Delete contact
whatsapp.deleteWhatsAppGroup()Delete group
whatsapp.deleteWhatsAppGroupChat()Delete group
whatsapp.deleteWhatsAppTemplate()Delete template
whatsapp.addWhatsAppBroadcastRecipients()Add recipients
whatsapp.addWhatsAppGroupParticipants()Add participants
whatsapp.approveWhatsAppGroupJoinRequests()Approve join requests
whatsapp.cancelWhatsAppBroadcastSchedule()Cancel scheduled broadcast
whatsapp.importWhatsAppContacts()Bulk import contacts
whatsapp.rejectWhatsAppGroupJoinRequests()Reject join requests
whatsapp.removeWhatsAppBroadcastRecipients()Remove recipients
whatsapp.removeWhatsAppGroupParticipants()Remove participants
whatsapp.renameWhatsAppGroup()Rename group
whatsapp.scheduleWhatsAppBroadcast()Schedule broadcast
whatsapp.sendWhatsAppBroadcast()Send broadcast
whatsapp.sendWhatsAppBulk()Bulk send template messages
whatsapp.uploadWhatsAppProfilePhoto()Upload profile picture

WhatsApp Flows

MethodDescription
whatsappFlows.listWhatsAppFlows()List flows
whatsappFlows.createWhatsAppFlow()Create flow
whatsappFlows.getWhatsAppFlow()Get flow
whatsappFlows.getWhatsAppFlowJson()Get flow JSON asset
whatsappFlows.updateWhatsAppFlow()Update flow
whatsappFlows.deleteWhatsAppFlow()Delete flow
whatsappFlows.deprecateWhatsAppFlow()Deprecate flow
whatsappFlows.publishWhatsAppFlow()Publish flow
whatsappFlows.sendWhatsAppFlowMessage()Send flow message
whatsappFlows.uploadWhatsAppFlowJson()Upload flow JSON

WhatsApp Phone Numbers

MethodDescription
whatsappPhoneNumbers.getWhatsAppPhoneNumber()Get phone number
whatsappPhoneNumbers.getWhatsAppPhoneNumbers()List phone numbers
whatsappPhoneNumbers.purchaseWhatsAppPhoneNumber()Purchase phone number
whatsappPhoneNumbers.releaseWhatsAppPhoneNumber()Release phone number

Invites

MethodDescription
invites.createInviteToken()Create invite token

Requirements

  • Node.js 18+
  • Zernio API key (free tier available)

License

Apache-2.0

Keywords

zernio

FAQs

Package last updated on 04 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts