How requests are authenticated
The app key is the HTTP header name. The auth key is that header's value. There is no Authorization scheme, no Bearer token, and no Basic auth for API keys.
That sandbox key was checked against GET /campaigns. It returns 200 and a JSON object with records, lastId, totalRecords, and code.
When to include a workspace id
/workspaces/:workspaceId is only necessary when the account owns more than one workspace. With a single workspace, call the resource directly.
- One workspace:
GET /campaigns - More than one workspace:
GET /workspaces/335/campaigns
Use the plural path /workspaces/:workspaceId. /workspace/:id is not a route. Leave the workspace id blank in the tester below and it drops that prefix for you.
Settings do not have a direct alias. Those calls stay on GET /workspaces/:workspaceId/settings.
The tester in this page cannot finish the call from another website. The API only allows the headers Content-Type, Authorization, syft-entrance-api-key, and workspace-id on a browser preflight, and the app key is a different header name. Use the curl the tester prints.
These GET paths perform the action rather than reporting it: campaign send, pause, resume, cancel, channel unclaim, and logout.
Try a request
The tester sends the app key as the header name and the auth key as the value. Paste your own keys. Examples below show only the prefix.
App key and auth key
Session access token
Email and password
Email login is a separate session flow. API key calls do not use it.
139
Total Endpoints
6
Categories
63
GET Endpoints
41
POST Endpoints
The sections below are in the order most integrations need them. Campaigns first, then the inbox. Every endpoint on this page is a real route. Calls that are not registered, still return 500, or only exist on localhost are not listed.
Campaigns
35 endpointsStart here. Most integrations list campaigns, put contacts on one, then read progress.
Making a campaign
List with GET /campaigns. That is the same data as GET /workspaces/:workspaceId/campaigns when the account has one workspace. Create with POST /workspaces/:workspaceId/campaigns, then set the text with PATCH /campaigns/:id.
Direct list. Add /workspaces/:workspaceId in front only when the account owns more than one workspace. Returns records, lastId, totalRecords, and code.
Adding and removing contacts
Read the audience with GET /workspaces/:workspaceId/campaigns/:id/contacts. Add numbers with POST on that path. Remove them with POST /campaigns/:id/contacts/delete.
Permissions
See who can use a campaign with GET /campaigns/:id/permissions. Add a user or a group with the POST routes below. There is no route to delete a single user permission.
Sending and results
Do not use send, pause, resume, or cancel to check status. Those GETs perform the action. Progress is upload-progress and send-progress: HTTP 200 when a row exists, HTTP 404 when this campaign has not reached that step. Analytics summary is HTTP 200 even when those sections are null.
This GET performs the action. It does not return status.
This GET performs the action. It does not return status.
This GET performs the action. It does not return status.
This GET performs the action. It does not return status.
Templates and text filters
Saved campaign copy and the text filters applied while uploading contacts.
Messaging
26 endpointsThe inbox. Open a thread, read it, and send a reply.
Channels
Unclaimed threads are GET /channels?claimed=false. One thread is GET /workspaces/:workspaceId/channels/:id. Unclaim is a GET that releases the thread.
This GET performs the action. It does not return status.
Messages
History for one thread is GET /workspaces/:workspaceId/messages with channelid set to that channel. POST on the same path sends a reply.
Keywords, stops, and templates
Words that trigger an action, unsubscribe filters, and reusable reply text.
Contacts
25 endpointsPeople, the lists they sit on, and numbers you will not message.
People
Search the workspace address book. This is not the list of people already attached to a campaign.
Contact lists
A list is a saved audience you can attach to a campaign. A missing list id returns 404.
Flags, blocks, and shortlists
Flags label threads. Blocked numbers are never messaged. Shortlists are the small working set for a user.
Workspaces
13 endpointsWhich workspace you are in, its settings, and who can use it.
Your workspace
GET /workspaces lists what this key can see. Settings only exist at GET /workspaces/:workspaceId/settings. Daily stats are the dashboard counts.
Who has access
Assign a user to this workspace, or list who is already assigned.
Automation
12 endpointsWebhooks and subscriber lists, after campaigns and the inbox are working.
Webhooks
Subscribe this workspace to events such as newMessage. GET /webhooks/events lists the event names.
Subscriber lists
List, create, and update opt-in lists. Fetching one list by id currently returns 500, so use the collection.
Account
28 endpointsUsers, API keys, phone numbers, and sign-in. Most API-key integrations skip this.
Sign in
API keys do not use these routes. Email login returns a session token. Logout ends that session.
This GET ends the session.
Users and groups
People who can log into the workspace, and the groups used by campaign permissions.
API keys and billing
Keys for other users, and usage for this workspace.
Phone numbers
Order numbers and inspect number pools.
Node.js Module Usage
Installation
Call the API
Pass the app key as the header name and the auth key as the value. Omit /workspaces/:workspaceId when the account has one workspace.
Quick Start Guide
Base URL: https://apiv2.entrancegrp.com
Header name = app key. Header value = auth key. Do not send Authorization: Bearer for API key calls.
Workspaces
/workspaces/:workspaceId is only necessary when the account owns more than one workspace. Otherwise hit the endpoint directly, for example GET /campaigns instead of GET /workspaces/335/campaigns.
Page through lists with lastid set to the id of the last record you received, plus limit and order.