npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

entrancesms

v1.0.3

Published

Comprehensive Node.js SDK for Entrance API v2 Cloud - Complete access to all 224+ API endpoints including SMS marketing, campaigns, contacts, workspaces, and more

Downloads

151

Readme

Entrance API v2 Cloud - Node.js SDK

Complete Node.js SDK for the Entrance API v2 Cloud platform. This module provides comprehensive access to all API endpoints including authentication, accounts, workspaces, campaigns, SMS marketing, contacts, channels, users, and more.

Features

  • Complete API Coverage: All 224+ endpoints documented and accessible
  • Type-safe Method Calls: Intuitive method names matching API functionality
  • Comprehensive Documentation: JSDoc comments for every endpoint
  • Built-in HTTP Client: Uses Node.js built-in modules (no external dependencies)
  • Error Handling: Proper error handling with status codes and response data
  • SMS Marketing: Full support for SMS campaigns and marketing features
  • Workspace Management: Complete workspace, user, and permission management

Installation

npm install entrancesms

Quick Start

const EntranceAPI = require('entrancesms');

// Initialize the client
const client = new EntranceAPI({
  baseUrl: 'https://apiv2.entrancegrp.com',
  // You can set accessToken here or use setAccessToken() after login
});

// Example: Login and get access token
async function authenticate() {
  try {
    const result = await client.login({
      email: '[email protected]',
      password: 'your-password'
    });
    
    // Set the access token for subsequent requests
    client.setAccessToken(result.record.access_token);
    
    console.log('Logged in successfully!');
    console.log('Workspace ID:', result.record.workspace_id);
    console.log('User ID:', result.record.user_id);
    
    return result;
  } catch (error) {
    console.error('Login failed:', error.message);
    throw error;
  }
}

// Example: Create a campaign
async function createCampaign() {
  try {
    const campaign = await client.createCampaign({
      workspaceId: 'your-workspace-id',
      body: {
        name: 'My SMS Campaign',
        message: 'Hello from Entrance API!',
        // ... other campaign fields
      }
    });
    
    console.log('Campaign created:', campaign);
    return campaign;
  } catch (error) {
    console.error('Failed to create campaign:', error.message);
    throw error;
  }
}

API Categories

The SDK is organized into the following categories:

  • ** **: 1 endpoints
  • 10DLC: 2 endpoints
  • 10DLC Registrations: 2 endpoints
  • Accounts: 3 endpoints
  • Analytics: 1 endpoints
  • Authentication: 4 endpoints
  • Billing: 2 endpoints
  • Campaign Templates: 3 endpoints
  • Campaign Text Filters: 3 endpoints
  • Campaigns (SMS Marketing): 13 endpoints
  • Contacts: 1 endpoints
  • Docs: 1 endpoints
  • Flags: 4 endpoints
  • Http:: 5 endpoints
  • Https:: 1 endpoints
  • Incoming Message Keywords: 2 endpoints
  • Influencers: 6 endpoints
  • Live Chat: 2 endpoints
  • Message Filters: 4 endpoints
  • Message Templates: 3 endpoints
  • Message-status: 2 endpoints
  • Mms.entrancegrp.com: 1 endpoints
  • Number Order Requests: 2 endpoints
  • Number Pools: 2 endpoints
  • Receive SMS: 1 endpoints
  • Root: 18 endpoints
  • Send-messages: 1 endpoints
  • Shortlists: 3 endpoints
  • Subscriber Lists: 4 endpoints
  • Syft: 24 endpoints
  • User API Keys: 3 endpoints
  • User Groups: 7 endpoints
  • Users: 7 endpoints
  • Webhooks: 5 endpoints
  • Workspace Numbers: 7 endpoints
  • Workspace-analytics: 1 endpoints
  • Workspace-billing: 2 endpoints
  • Workspace-blocked-numbers: 3 endpoints
  • Workspaces: 67 endpoints
  • }: 1 endpoints

Complete API Documentation

Total Endpoints: 224

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | PUT | /workspaces/:workspaceId/contacts/:contactId/meta | editMeta() | Edit Meta |

10DLC

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /ten-dlc | list10DLCRegistrations() | Get All 10DLC Registrations | | GET | /ten-dlc/:id | get10DLCRegistration() | Get 10DLC Registration |

10DLC Registrations

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /10dlc | create10DLCRegistration() | Create 10DLC Registration | | PUT | /10dlc/:id | update10DLCRegistration() | Update 10DLC Registration |

Accounts

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /accounts | createAccount() | Create Account | | GET | /accounts | getAccount() | Get Account | | PATCH | /accounts/ | updateAccount() | Update Account |

Analytics

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /analytics/daily-stats | getDailyStatsForDashboard() | Get Daily Stats For Dashboard |

Authentication

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /authentication/login | login() | Login | | GET | /authentication/logout | logout() | Logout | | POST | /authentication/refresh-token | refreshToken() | Refresh Token | | POST | /authentication/syft/retrieve-user | retrieveUser() | Retrieve User |

Billing

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /billing/usage | getUsage() | Get Usage | | GET | /billing/segment-profile | getSegmentProfile() | Get Segment Profile |

Campaign Templates

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /campaign-templates | createCampaignTemplate() | Create Campaign Template | | PUT | /campaign-templates/:id | updateCampaignTemplate() | Update Campaign Template | | DELETE | /campaign-templates/:id | deleteCampaignTemplate() | Delete Campaign Template |

Campaign Text Filters

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /campaign-text-filters | getCampaignTextFilters() | Get Campaign Text Filters | | POST | /campaign-text-filters | createCampaignTextFilter() | Create Campaign Text Filter | | DELETE | /campaign-text-filters/:id | deleteCampaignTextFilter() | Delete Campaign Text Filter |

Campaigns (SMS Marketing)

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /campaigns/:id/permissions | getCampaignPermissions() | Get Campaign Permissions | | POST | /campaigns/:id/permissions/users | addUser() | Add User | | DELETE | /campaigns/:id/permissions/users?user_id=564 | removeUser() | Remove User | | POST | /campaigns/:id/permissions/groups | addUserGroup() | Add User Group | | DELETE | /campaigns/:id/permissions/groups?user_group_id=2 | removeUserGroup() | Remove User Group | | DELETE | /campaigns/:id/permissions | clearPermissions() | Clear Permissions | | PATCH | /campaigns/:id | updateCampaign() | Update Campaign | | POST | /campaigns/:id/attach-media | attachMedia() | Attach Media | | DELETE | /campaigns/:id/attach-media | removeMedia() | Remove Media | | POST | /campaigns/:id/attach-media | attachMediaCopy() | Attach Media Copy | | POST | /campaigns/:campaignId/contacts/delete | deleteUploadedContacts() | Delete Uploaded Contacts | | GET | /campaigns/:id/responses?lastid=0&order=ASC&limit=20&stop=false | getResponses() | Get Responses | | GET | /campaigns/:campaignId/clicks | getCampaignClicks() | Get Campaign Clicks |

Contacts

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /contacts | createContact() | Create Contact |

Docs

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /docs/events | getEventDocs() | Get Event Docs |

Flags

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /flags | createFlag() | Create Flag | | PUT | /flags/1 | updateFlag() | (DEPRECATED) Update Flag | | PATCH | /flags/:flagId | updateFlag() | Update Flag | | DELETE | /flags/2 | removeFlag() | Remove Flag |

Http:

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | http://127.0.0.1:6003?wid=1 | testReceiveSMSLocal() | Test Receive SMS Local | | POST | http://127.0.0.1:6001/message-status/campaign?workspace_id=3&campaign_id=481&manual_user_id=3 | testMessageStatusLocal() | Test Message Status Local | | POST | http://127.0.0.1:6005/channels/:id/create-shortlink | testCreateShortLink() | Test CreateShortLink | | GET | http://127.0.0.1:6000/api/documentation | getDocument() | Get Document | | GET | http://127.0.0.1:6022/syft-voice?last_id=1&limit=100& | testRetrieveUser() | Test Retrieve User |

Https:

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | https://apiv2.entrancegrp.com/user-api-keys | createUserApiKey() | Create User Api Key |

Incoming Message Keywords

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /incoming-message-keywords | getKeywords() | Get Keywords | | POST | /incoming-message-keywords | addKeyword() | Add Keyword |

Influencers

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /influencers | createInfluencerList() | Create Influencer List | | GET | /influencers/:id | getInfluencerListById() | Get Influencer List by Id | | PUT | /influencers/:id | updateInfluencerList() | Update Influencer List | | PUT | /influencers/:id/phone-number | addUpdateInfluencerListNumber() | Add/Update Influencer List Number | | PUT | /influencers/:id/add-keywords | updateKeywords() | Update Keywords | | DELETE | /influencers/:id | archiveInfluencerList() | Archive Influencer List |

Live Chat

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /live-chat | createLiveChat() | Create Live Chat | | POST | /live-chat/:id/message | createLiveChatMessage() | Create Live Chat Message |

Message Filters

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /message-filters | addFilter() | Add Filter | | POST | /message-filters | createFilter() | Create Filter | | PATCH | /message-filters/:messageFilterId | updateFilter() | Update Filter | | DELETE | /message-filters/:messageFilterId | deleteFilter() | Delete Filter |

Message Templates

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /message-templates | createMessageTemplate() | Create Message Template | | PATCH | /message-templates/:id | updateMessageTemplate() | Update Message Template | | DELETE | /message-templates/:id | deleteMessageTemplate() | Delete Message Template |

Message-status

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /message-status/campaign?workspace_id=3&campaign_id=481&manual_user_id=3 | testMessageStatusBeta() | Test Message Status Beta | | POST | /message-status/campaign?workspace_id=3&campaign_id=481&manual_user_id=3 | testMessageStatusLive() | Test Message Status Live |

Mms.entrancegrp.com

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /media?source=https://mms.entrancegrp.com/beta_1-270786-2059-iyU-1729091738210.png | getProtectedMedia() | Get Protected Media |

Number Order Requests

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /number-order-requests/:id | getNumberOrderRequest() | Get Number Order Request | | POST | /number-order-requests | createNumberOrderRequest() | Create Number Order Request |

Number Pools

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /number-pools/:id | getById() | Get By Id | | POST | /number-pools | create() | Create |

Receive SMS

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /receive-sms/receive | testReceiveSMSBeta() | Test Receive SMS Beta |

Root

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /flags?lastid=9999999999&order=DESC | listWorkspaceFlags() | Get All Workspace Flags | | GET | /workspace-blocked-numbers?lastid=0&limit=20&order=ASC | getNumbers() | Get Numbers | | GET | /message-filters?unsubscribe=true | getFilter() | Get Filter | | GET | /channels?claimed=false | trackClick() | Track Click | | GET | /message-templates?limit=1 | getMessageTemplates() | Get Message Templates | | DELETE | /incoming-message-keywords?keyword=test | deleteKeyword() | Delete Keyword | | GET | /campaign-templates?last_id=9999999999999&limit=20&order=DESC | getCampaignTemplates() | Get Campaign Templates | | GET | /users?last_id=9999999999999&limit=20&order=DESC | listWorkspaceUsers() | Get All Workspace Users | | GET | /user-groups?lastid=9999999999&limit=20&order=DESC | getUserGroups() | Get User Groups | | GET | /subscriber-lists?last_id=9999999999999&limit=20&order=DESC&is_influencer_list=true | getSubscriberLists() | Get Subscriber Lists | | GET | /user-api-keys?last_id=9999999999999&limit=20&order=DESC | getUserApiKeysInWorkspace() | Get User Api Keys in Workspace | | GET | /workspace-numbers?last_id=99999999999&order=DESC&limit=10 | listWorkspaceNumbers() | Get All Workspace Numbers | | GET | /workspace-numbers?count=true | getCountOfWorkspaceNumbers() | Get Count of Workspace Numbers | | GET | /number-order-requests?last_id=99999999&order=DESC&limit=10 | listNumberOrderRequests() | Get All Number Order Requests | | GET | /influencers?last_id=9999999999999&limit=20&order=DESC | getInfluencerLists() | Get Influencer Lists | | GET | /message-filters?unsubscribe=true | list() | Get All | | GET | /workspace-logs?lastid=0&limit=999&order=ASC | getLogs() | Get Logs | | POST | `` | testPost() | Test Post |

Send-messages

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /send-messages/:channelId/send | testsendMessage() | Test Send Message |

Shortlists

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /shortlists | getShortlistContacts() | Get Shortlist Contacts | | POST | /shortlists | addShortlistContact() | Add Shortlist Contact | | DELETE | /shortlists/:shortlistId | removeShortlistContact() | Remove Shortlist Contact |

Subscriber Lists

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /subscriber-lists/:subscriberListId | getSubscriberListById() | Get Subscriber List by Id | | POST | /subscriber-lists | createSubscriberList() | Create Subscriber List | | PUT | /subscriber-lists/:subscriberListId | updateSubscriberList() | Update Subscriber List | | DELETE | /subscriber-lists/:subscriberListId | deleteSubscriberList() | Delete Subscriber List |

Syft

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /syft/registration | registration() | Registration | | GET | /syft/campaigns/:id/whitelist | getWhitelist() | Get Whitelist | | POST | /syft/campaigns/:id/whitelist | addAssignedToUser() | Add Assigned To User | | DELETE | /syft/campaigns/:id/whitelist/:assignedTo | removeAssignedToUser() | Remove Assigned To user | | GET | /syft/campaigns?last_id=9999999999999&limit=20&order=DESC | getCampaigns() | Get Campaigns | | GET | /syft/campaigns/:id | getCampaignById() | Get Campaign by Id | | POST | /syft/campaigns | addCampaign() | Add Campaign | | PUT | /syft/campaigns/:id | updateCampaign() | Update Campaign | | DELETE | /syft/campaigns/:id | deleteCampaign() | Delete Campaign | | GET | /syft/custom-prompts?last_id=9999999999999&limit=20&order=DESC | getCustomPrompts() | Get Custom Prompts | | GET | /syft/custom-prompts/:id | getCustomPromptById() | Get Custom Prompt By Id | | POST | /syft/custom-prompts | createCustomPrompt() | Create Custom Prompt | | PUT | /syft/custom-prompts/:id | updateCustomPrompt() | Update Custom Prompt | | GET | /syft/custom-prompts/:id | deleteCustomPrompt() | Delete Custom Prompt | | GET | /syft/gpt-settings | getWorkspaceGPTSettings() | Get Workspace GPT Settings | | POST | /syft/gpt-settings | updateWorkspaceGPTSettings() | Update Workspace GPT Settings | | GET | /syft/gpt-settings/reset | resetWorkspaceGPTSettings() | Reset Workspace GPT Settings | | GET | /syft/representatives?last_id=9999999999999&limit=20&order=DESC | getRepresentatives() | Get Representatives | | GET | /syft/representatives/:id | getRepById() | Get Rep By Id | | POST | /syft/representatives | addRepresentative() | Add Representative | | PUT | /syft/representatives/:id | updateRepresentative() | Update Representative | | DELETE | /syft/representatives/:id | deleteRepresentative() | Delete Representative | | PUT | /syft/users/:id | update() | Update | | GET | /syft/users | getWorkspaceUsers() | Get Workspace Users |

User API Keys

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /user-api-keys/4065 | getUserApiKey() | Get User Api Key | | POST | /user-api-keys/:id/refresh | updateUserApiKey() | Update User Api Key | | DELETE | /user-api-keys/:id | deleteUserApiKey() | Delete User Api Key |

User Groups

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /user-groups/:userGroupId/users | getUsersInGroup() | Get Users in Group | | POST | /user-groups/:userGroupId/users | addUserToUserGroup() | Add User To User Group | | DELETE | /user-groups/:userGroupId/users/:userId | removeUserFromUserGroup() | Remove User From User Group | | POST | /user-groups | createUserGroup() | Create User Group | | GET | /user-groups/:userGroupId | getUserGroup() | Get User Group | | PATCH | /user-groups/:id | updateUserGroup() | Update User Group | | DELETE | /user-groups/:id | deleteUserGroup() | Delete User Group |

Users

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /users/:id | getUser() | Get User | | POST | /users | addWorkspaceUser() | Add Workspace User | | PATCH | /users/1 | updateUser() | Update User | | PATCH | /users/:id | updateUserPassword() | Update User Password | | DELETE | /users/:id?reassign=5 | deleteWorkspaceUser() | Delete Workspace User | | POST | /users/push-token | addPushToken() | Add Push Token | | GET | /users/:id/workspace-assigns | getWorkspaceAssigns() | Get Workspace Assigns |

Webhooks

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /webhooks/events | getEvents() | Get Events | | GET | /webhooks/events | getCategories() | Get Categories | | GET | /webhooks | listWebhooks() | Get All Webhooks | | POST | /webhooks | createWebhook() | Create Webhook | | GET | /webhooks/test | testGet() | Test Get |

Workspace Numbers

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /workspace-numbers/available?state=MI&page=0&pageSize=1 | availableToRent() | Available To Rent | | POST | /workspace-numbers/order | orderNumbers() | Order Numbers | | GET | /workspace-numbers/stats?last_id=99999999999&order=DESC&limit=10&stats=month | getNumberStats() | Get Number Stats | | GET | /workspace-numbers/:id | getWorkspaceNumber() | Get Workspace Number | | POST | /workspace-numbers/activate | activateWorkspaceNumbers() | Activate Workspace Numbers | | POST | /workspace-numbers/deactivate | deactivateWorkspaceNumbers() | Deactivate Workspace Numbers | | DELETE | /workspace-numbers/delete | deleteNumbers() | Delete Numbers |

Workspace-analytics

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /workspace-analytics/:id/manual-blast-data?period=month&start_date=2021-10-10&end_date=2024-10-10 | getManualBlastData() | Get Manual Blast Data |

Workspace-billing

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /workspace-billing//reports | getBillingReports() | Get Billing Reports | | GET | /workspace-billing//reports/:reportId/download | downloadBillingReport() | Download Billing Report |

Workspace-blocked-numbers

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | POST | /workspace-blocked-numbers | addNumber() | Add Number | | GET | /workspace-blocked-numbers/:id | getNumberById() | Get Number by Id | | DELETE | /workspace-blocked-numbers/3 | deleteNumber() | Delete Number |

Workspaces

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | /workspaces/:id/flags/4 | getFlagById() | Get Flag By Id | | PATCH | /workspaces/:id/message-filters/:id | updateFilter() | Update Filter | | DELETE | /workspaces/:id/message-filters/:id | deleteFilter() | Delete Filter | | GET | /workspaces/:workspaceId/campaigns/:id/pause | pauseCampaign() | Pause Campaign | | GET | /workspaces/:workspaceId/campaigns/:id/resume | resumeCampaign() | Resume Campaign | | GET | /workspaces/:workspaceId/campaigns/:id/cancel | cancelCampaign() | Cancel Campaign | | GET | /workspaces/:workspaceId/campaigns/:id/upload-progress | getUploadProgress() | getUploadProgress | | GET | /workspaces/:workspaceId/campaigns/:id/send-progress | getSendProgress() | getSendProgress | | GET | /workspaces/:id/campaigns/:campaignId/contact-lists | getContactLists() | Get Contact Lists | | POST | /workspaces/:id/campaigns/:campaignId/contact-lists | addContactList() | Add Contact List | | DELETE | /workspaces/:id/campaigns/:campaignId/contact-lists/:campaignContactListId | removeContactListByRecordId() | Remove Contact List by Record Id | | GET | /workspaces/:workspaceId/campaigns?order=DESC&limit=100&types=SINGLE_BLAST | list() | Get All | | GET | /workspaces/:workspaceId/campaigns/:id | getCampaign() | Get Campaign | | POST | /workspaces/:workspaceId/campaigns | createCampaign() | Create Campaign | | GET | /workspaces/:id/campaigns/:campaignId/campaign-contacts | getCampaignContacts() | Get Campaign Contacts | | GET | /workspaces/:id/campaigns/:campaignId/contacts?lastid=0&limit=20&order=ASC | getContacts() | Get Contacts | | POST | /workspaces/:workspaceId/campaigns/:campaignId/contacts | addContacts() | Add Contacts | | GET | /workspaces/:workspaceId/campaigns/:campaignId/send | send() | Send | | POST | /workspaces/:workspaceId/campaigns/:id/test | sendtestMessage() | Send Test Message | | GET | /workspaces/:workspaceId/campaigns/:campaignId/analytics-summary | campaignAnalyticsSummary() | Campaign Analytics Summary | | POST | /workspaces/:workspaceId/campaigns/:campaignId/schedule | scheduleCampaign() | Schedule Campaign | | GET | /workspaces/:workspaceId/channels?claimed=true | getChannels() | Get Channels | | GET | /workspaces/:workspaceId/channels/:id | getChannel() | Get Channel | | PATCH | /workspaces/:workspaceId/channels/:id | updateChannel() | Update Channel | | POST | /workspaces/:workspaceId/channels/:id/create-shortlink | createChannelShortlink() | Create Channel Shortlink | | GET | /workspaces/:workspaceId/channels/:id/meta?email=true | getChannelMeta() | Get Channel Meta | | GET | /workspaces/:workspaceId/channels/:id/syft-messages | syftMessages() | Syft Messages | | DELETE | /workspaces/:workspaceId/channels/:id/ | deleteChannels() | Delete Channels | | GET | /workspaces/:workspaceId/channels/:id/unclaim | unclaim() | Unclaim | | POST | /workspaces/:workspaceId/channels/:id/assign | assign() | Assign | | POST | /workspaces/:workspaceId/channels/bulk-assign-flag | bulkFlagAssign() | Bulk Flag Assign | | PUT | /workspaces/:workspaceId/contacts/:contactId/meta | addMeta() | Add Meta | | PUT | /workspaces/:workspaceId/channels/:id/meta | removeMeta() | Remove Meta | | GET | /workspaces/:workspaceId/contacts?limit=300&order=ASC | getContacts() | Get Contacts | | GET | /workspaces/:workspaceId/contacts/:contactId | getContact() | Get Contact | | PATCH | /workspaces/:workspaceId/contacts/:id | updateContact() | Update Contact | | GET | /workspaces//contact-lists?limit=100&order=ASC | listContactLists() | Get All Contact Lists | | GET | /workspaces/:workspaceId/contact-lists/:id?lastid=2&limit=100&order=ASC | getContactListById() | Get Contact List By Id | | POST | /workspaces/:workspaceId/contact-lists | createContactList() | Create Contact List | | PATCH | /workspaces/:workspaceId/contact-lists/:id | updateContactListById() | Update Contact List By Id | | GET | /workspaces/:workspaceId/contact-lists/:id/contacts?lastid=0&limit=100&order=ASC | getContactsInList() | Get Contacts in List | | POST | /workspaces//contact-lists/:contactListId/imports | importByFile() | Import By File | | POST | /workspaces/:workspaceId/contact-lists/:contactListId/imports | importByJsonBody() | Import By Json Body | | PATCH | /workspaces/:workspaceId/contact-lists/imports/:id | updateImport() | Update Import | | GET | /workspaces/:workspaceId/contact-lists/:id/imports?lastid=0&order=ASC&limit=100 | getContactListImports() | Get Contact List Imports | | GET | /workspaces/:workspaceId/contact-lists/imports/:importId/contacts?lastId=0&order=ASC&limit=100 | getContactsByImport() | Get Contacts By Import | | GET | /workspaces/:workspaceId/messages?channelid=&limit=100&ts=2025-03-17T19:11:02.461Z&order=ASC | get() | Get | | POST | /workspaces/:workspaceId/messages | sendMessage() | Send Message | | POST | /workspaces/:workspaceId/messages | sendMessageMMS() | Send Message MMS | | GET | /workspaces/:id/assigned | getWorkspaceUsers() | Get Workspace Users | | POST | /workspaces/:workspaceId/assign | assignUserToWorkspace() | Assign User To Workspace | | PATCH | /workspaces/:workspaceId/assigned/:userId | updateUserAssignPermission() | Update User Assign Permission | | DELETE | /workspaces/:workspaceId/assigned/:userId | deleteUserAssignment() | Delete User Assignment | | GET | /workspaces/:workspaceId/webhooks/:webhookId | getWebhook() | Get Webhook | | DELETE | /workspaces/:workspaceId/webhooks/:webhookId | deleteWebhook() | Delete Webhook | | POST | /workspaces/:workspaceId/webhooks/:webhookId/subscribe | subscribeToEvents() | Subscribe To Events | | POST | /workspaces/:workspaceId/webhooks/:webhookId/unsubscribe | unsubscribeFromEvents() | Unsubscribe From Events | | GET | /workspaces | getWorkspaces() | Get Workspaces | | GET | /workspaces/:workspaceId/permission | getWorkspacePermission() | Get Workspace Permission | | POST | /workspaces | createWorkspace() | Create Workspace | | GET | /workspaces/:workspaceId | getWorkspace() | Get Workspace | | PUT | /workspaces/:workspaceId | updateWorkspace() | Update Workspace | | DELETE | /workspaces/:workspaceId | archiveWorkspace() | Archive Workspace | | GET | /workspaces//settings | listSettings() | Get All Settings | | GET | /workspaces//settings?setting=disable_claims | getSpecificSetting() | Get Specific Setting | | PUT | /workspaces//settings | updateSetting() | Update Setting | | GET | /workspaces//daily-analytics | dailyAnalytics() | Daily Analytics |

}

| Method | Endpoint | Function | Description | |--------|----------|----------|-------------| | GET | }/workspaces/:workspaceId/contacts?lastid=0&limit=100&order=ASC | getStops() | Get Stops |

Usage Examples

Authentication

// Login
const loginResult = await client.login({
  email: '[email protected]',
  password: 'password'
});

client.setAccessToken(loginResult.record.access_token);

// Refresh token
const refreshResult = await client.refreshToken({
  client_id: 'your-client-id',
  refresh_token: 'your-refresh-token'
});

// Logout
await client.logout();

SMS Marketing & Campaigns

// Get all campaigns
const campaigns = await client.listCampaigns({
  workspaceId: 'workspace-id',
  query: { last_id: 0, limit: 20, order: 'DESC' }
});

// Get a specific campaign
const campaign = await client.getCampaign({
  workspaceId: 'workspace-id',
  id: 'campaign-id'
});

// Create a campaign
const newCampaign = await client.createCampaign({
  workspaceId: 'workspace-id',
  body: {
    name: 'My SMS Campaign',
    message: 'Hello from Entrance!'
    // ... other fields
  }
});

// Send campaign
await client.sendCampaign({
  workspaceId: 'workspace-id',
  id: 'campaign-id'
});

// Get campaign responses
const responses = await client.getResponses({
  id: 'campaign-id'
}, {
  lastid: 0,
  limit: 20,
  order: 'ASC'
});

Contacts & Contact Lists

// Get contacts
const contacts = await client.getContacts({
  workspaceId: 'workspace-id'
}, {
  last_id: 0,
  limit: 100
});

// Create contact
const contact = await client.createContact({
  workspaceId: 'workspace-id'
}, {
  phone_number: '+1234567890',
  first_name: 'John',
  last_name: 'Doe'
});

// Get contact lists
const lists = await client.getAllContactLists({
  workspaceId: 'workspace-id'
});

// Create contact list
const list = await client.createContactList({
  workspaceId: 'workspace-id'
}, {
  name: 'My Contact List'
});

Workspaces & Users

// Get workspaces
const workspaces = await client.getWorkspaces();

// Get workspace
const workspace = await client.getWorkspace({
  id: 'workspace-id'
});

// Get workspace users
const users = await client.listWorkspaceUsers({
  workspaceId: 'workspace-id'
}, {
  last_id: 0,
  limit: 20
});

// Add workspace user
const newUser = await client.addWorkspaceUser({
  workspaceId: 'workspace-id'
}, {
  email: '[email protected]',
  firstname: 'John',
  lastname: 'Doe'
});

Error Handling

All methods return Promises and can throw errors. Errors include:

  • status: HTTP status code
  • response: Error response body
  • message: Error message
try {
  const result = await client.getCampaign({ id: 'invalid-id' });
} catch (error) {
  console.error('Status:', error.status);
  console.error('Response:', error.response);
  console.error('Message:', error.message);
}

License

MIT

Support

For API documentation and support, visit the Entrance API documentation.