EmpireUC: API specification - Empire Telecom

EmpireUC: API specification

Empire Telecom · EmpireUC Teams Connect

EmpireUC runs on the NetSapiens platform and exposes its full REST API (NetSapiens API v2) for users, numbers, call routing, call history, recordings, call control, queues and real-time events.

Open the Teams admin center →Where: Microsoft 365 admins sign in at admin.teams.microsoft.com and admin.microsoft.com.
Direct link: https://admin.teams.microsoft.com

EmpireUC is Empire Telecom's own cloud phone system (UCaaS). It is built on the NetSapiens platform, so everything you can do in EmpireUC can also be done in code through the NetSapiens API v2: a JSON REST API with bearer-token authentication that covers users, phones, phone numbers, call routing, schedules, auto attendants, call queues, voicemail, call history (CDRs), recordings, transcriptions, SMS, live call control and event subscriptions (webhooks). In short: it is a complete, mature API, and almost every screen in the phone system has an endpoint behind it.

Tip: You do not need code for day-to-day changes. Customers can manage EmpireUC without any programming in the Phones section of the Empire Telecom customer portal (users, numbers, ring groups, call history and more). Use the API when you want to connect EmpireUC to your own systems, such as an EHR, CRM, wallboard or reporting tool.

At a glance

ItemDetail
API typeREST over HTTPS, OpenAPI 3.1 specification
API versionNetSapiens API v2, platform release 44.x (about 239 paths and 111 schemas)
Base URLhttps://<your-EmpireUC-API-server>/ns-api/v2 (Empire Telecom provides the server address)
AuthenticationOAuth-style access and refresh tokens from POST /tokens (client ID + secret + user login); JWT tokens; API keys for server-to-server use. All sent as Authorization: Bearer <token>
Data formatJSON request and response bodies; field names are kebab-case (for example name-first-name)
IdentifiersDomains (your organisation) are numeric IDs; users are extension@domain; ~ means "my own" domain or user
VersioningPlatform release in the path family /ns-api/v2; GET /version returns the running API version
SandboxNo public sandbox. Test against a non-production user or domain first; ask Empire Telecom to set one up
Rate limitsNot published. Keep polling modest, use event subscriptions instead of tight loops, and back off on errors
Webhooks / eventsEvent subscriptions (POST /subscriptions) push JSON to your HTTPS URL; delivery is near-real-time (checked about every 3 seconds)
SDKsNo official SDK. Any HTTP client works; the OpenAPI file can generate a client. NetSapiens also offers an MCP server for AI tools
Developer portaldocs.ns-api.com (choose version 44.4 to match EmpireUC)
Status pageNo public status page. Contact Empire Telecom support for service status
How to get accessAsk Empire Telecom for API access; Empire requests a client ID and secret for your account and sets the user scope

Getting access

1Ask Empire Telecom for API access. Tell us what you want to build (for example "pull call history into our reporting tool" or "click-to-call from our CRM"). Empire Telecom requests an API client (a client ID and client secret) for your organisation. Credentials are delivered securely, usually through a one-time link.
2Choose the user the integration will sign in as. We recommend a dedicated service user rather than a person's own extension, so the integration keeps working when staff change.
3Agree the scope. NetSapiens permissions follow the user's scope. Customers are given Basic User (the user's own data: their calls, voicemail, contacts, answer rules) or Office Manager (everything in your organisation's domain: all users, numbers, queues, call history). The higher Reseller scope is kept by Empire Telecom.
4Get the server address. Empire Telecom gives you the EmpireUC API server address. Your base URL is https://<your-EmpireUC-API-server>/ns-api/v2.
5Request a token with POST /tokens (see Authentication) and make a first test call such as GET /domains/~ or GET /domains/~/users/~.
6Optional: API key. For long-running server-to-server integrations you can use an API key. Creating a key through /apikeys itself needs a bearer token, so you must first sign in with the client ID and secret. Ask Empire Telecom if you would prefer that a restricted key be created for you (read-only, limited to certain IP addresses or limited to certain data models).
7Test first. Run your integration against a test user or a quiet period before you point it at live call flows. Writes such as creating users or changing number routing take effect immediately and can be billable.

Important: The client ID and the client secret are two separate values that go in two separate fields. Pasting both into the client ID field produces the error Invalid_client.

Authentication

Access token (username and password)

Request a token from POST /tokens. The body is JSON, not form-encoded. The /tokens call is the only one that does not need a bearer token.

POST https://<your-EmpireUC-API-server>/ns-api/v2/tokens
Content-Type: application/json

{
"grant_type": "password",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"username": "1000@<domain>",
"password": "<password>"
}

The response includes access_token, refresh_token, expires_in (seconds), token_type, scope, user, domain, uid, displayName, user_email, client_id and apiversion. Send the token on every other request:

Authorization: Bearer <access_token>
Accept: application/json

Refresh the token (preferred)

When the access token expires, use the refresh token instead of sending the password again:

POST /ns-api/v2/tokens
{
"grant_type": "refresh_token",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"refresh_token": "<refresh_token>"
}

Multi-factor authentication

If the user has MFA turned on, the first request returns a token with the mfa_required scope. Repeat POST /tokens with "grant_type": "mfa", the same client and login values, the mfa_vendor and mfa_type from the first response, the 6-digit passcode from the authenticator app, and the access_token you received with the mfa_required scope.

JWT tokens

NetSapiens also issues JSON Web Tokens, which suit end-user web applications:

MethodPathWhat it does
POST/jwtCreate a JWT from username/password (same client ID and secret); returns token and refresh
POST/jwtCreate a new JWT from a refresh JWT (body: refresh); the refresh JWT is revoked once used
GET/jwtRead the current JWT
DELETE/jwtRevoke the current JWT

API keys (machine to machine)

API keys are 60 characters long and are sent as a bearer token (Authorization: Bearer <key>). The first four characters show the scope: nsu_ Basic User, nsd_ Office Manager (domain), nsr_ Reseller, nss_ Super User. The first 12 characters are the Key ID, used to manage or revoke the key. A key is shown only once when it is created and cannot be retrieved later. Keys do not expire on their own, can be read-only, can be limited to IP addresses, limited to a domain, and limited to specific data models (allowed-models).

MethodPathWhat it does
GET/apikeysList API keys under your account
GET/apikeys/~Read information about the key you are using
POST/apikeysCreate an API key (requires a bearer token)
GET/apikeys/{key_id}Read one key by Key ID
PUT/apikeys/{key_id}Update a key
DELETE/apikeys/{key_id}Revoke a key

Endpoints and resources

All paths below are relative to https://<your-EmpireUC-API-server>/ns-api/v2. {domain} is your numeric domain ID (or ~ for the domain of the signed-in user). {user} is the extension (or ~ for yourself). Collection reads accept start and limit for paging.

Account, domain and version

MethodPathWhat it does
GET/versionAPI version, host name and current server time
GET/domains/~Your own domain (works even with a Basic User token)
GET/domains/{domain}Read a domain's settings
PUT/domains/{domain}Update domain settings
GET/domains/{domain}/billingDomain with billing summary
GET/domains/{domain}/countCheck whether a domain exists
GET/domainsList domains visible to your token (reseller scope)

Users (extensions)

MethodPathWhat it does
GET/domains/{domain}/usersList users in the domain (optionally filter by site)
GET/domains/{domain}/users/listBasic info for all users (choose fields)
GET/domains/{domain}/users/countCount users
POST/domains/{domain}/usersCreate a user
GET/domains/{domain}/users/{user}Read one user
PUT/domains/{domain}/users/{user}Update a user
DELETE/domains/{domain}/users/{user}Delete a user
GET/domains/~/users/~Read your own user

Common user fields: user, name-first-name, name-last-name, email-address, user-scope, account-status, user-presence-status, status-message, department, site, time-zone, caller-id-number, dial-policy. Example create body:

{
"user": "1050",
"name-first-name": "Maria",
"name-last-name": "Lopez",
"email-address": "maria@example.org",
"user-scope": "Basic User",
"time-zone": "America/New_York"
}

Important: A new user is a new EmpireUC seat and is billable. Ask Empire Telecom before creating users in bulk.

Departments, sites and presence

There is no separate "department" object. department is a field on each user, and Sites group users by location.

MethodPathWhat it does
GET/domains/{domain}/sitesRead sites
POST/domains/{domain}/sitesCreate a site
PUT/domains/{domain}/sites/{site}Update a site
GET/domains/{domain}/sites/listBasic list of sites
GET/domains/{domain}/sites/countCount sites

Presence (available, on a call, do not disturb and so on) is returned on each user as user-presence-status, which the platform calculates from registration, answer rules and active calls.

Phones and devices

MethodPathWhat it does
GET/domains/{domain}/users/{user}/devicesDevices (SIP registrations/lines) for a user
POST/domains/{domain}/users/{user}/devicesCreate a device for a user
GET/domains/{domain}/users/{user}/devices/{device}Read one device
GET/domains/{domain}/devicesAll devices in the domain
GET/domains/{domain}/phonesDesk phones (MAC addresses) in the domain
POST/domains/{domain}/phonesAdd a phone by MAC address
GET/domains/{domain}/phones/{mac}Read one phone
GET/phones/modelsSupported phone models

There is no separate "registrations" collection; use the user's devices and presence instead.

Phone numbers

MethodPathWhat it does
GET/domains/{domain}/phonenumbersList the domain's phone numbers
GET/domains/{domain}/phonenumbers/countCount numbers
GET/domains/{domain}/phonenumbers/{phonenumber}Read one number and its routing
POST/domains/{domain}/phonenumbersAdd a number to the domain
PUT/domains/{domain}/phonenumbers/{phonenumber}Change where a number goes
DELETE/domains/{domain}/phonenumbers/{phonenumber}Remove a number from the domain

Routing is set with dial-rule-application (for example to-user, to-callqueue, to-voicemail, to-connection, to-single-device, available-number, hangup) and dial-rule-translation-destination-user (the extension, queue or number it goes to). Example:

PUT /domains/{domain}/phonenumbers/12015550100
{
"dial-rule-application": "to-user",
"dial-rule-translation-destination-user": "1000",
"dial-rule-description": "Main line to reception"
}

Tip: Point main numbers at an auto attendant, ring group or queue rather than at one person, so calls are not lost when that person is away. New numbers and porting are ordered through Empire Telecom.

Call routing: answer rules, schedules and ring groups

Each user has answer rules, one per timeframe (schedule). An answer rule decides what happens during that timeframe: simultaneous ring, forward always, forward on busy, forward when not answered, forward when unregistered, do not disturb, call screening, and lists of numbers to allow or reject.

MethodPathWhat it does
GET/domains/{domain}/users/{user}/answerrulesRead a user's answer rules
POST/domains/{domain}/users/{user}/answerrulesAdd an answer rule (body includes time-frame, enabled)
PUT/domains/{domain}/users/{user}/answerrules/{timeframe}Update the rule for a timeframe
DELETE/domains/{domain}/users/{user}/answerrules/{timeframe}Delete the rule for a timeframe
PUT/domains/{domain}/users/{user}/answerrules/reorderChange rule priority (array of time-frame values)

Timeframes come in five types: always, days-of-week, specific-dates, holiday and custom. Shared (domain) timeframes and per-user timeframes have matching endpoints:

MethodPathWhat it does
GET/domains/{domain}/timeframesRead shared timeframes
POST/domains/{domain}/timeframesCreate a shared timeframe (set timeframe-type)
GET/domains/{domain}/timeframes/{id}Read one shared timeframe
PUT/domains/{domain}/timeframes/{id}Update or replace its entries
DELETE/domains/{domain}/timeframes/{id}Delete a shared timeframe
GET/domains/{domain}/users/{user}/timeframesRead a user's own timeframes
POST/domains/{domain}/users/{user}/timeframesCreate a user timeframe
GET/holidays/countriesCountries with holiday data
GET/holidays/{country}/{year}Holidays for a country and year (to build holiday timeframes)

Ring groups are not a separate object. A ring group is built from a user (often a system extension) whose answer rules ring several destinations at once or in order, with timeframes for business hours and after hours. Use /answerrules/reorder to set which rule wins.

Auto attendants (welcome menus)

MethodPathWhat it does
GET/domains/{domain}/autoattendantsList auto attendants
POST/domains/{domain}/autoattendantsCreate an auto attendant (requires attendant-name, user)
GET/domains/{domain}/users/{user}/autoattendants/{prompt}Read one menu
PUT/domains/{domain}/users/{user}/autoattendants/{prompt}Update a menu (keys, greeting, timeouts)

On the EmpireUC release there is no DELETE for auto attendants through the API; ask Empire Telecom to remove one.

Call queues and agents (contact center)

MethodPathWhat it does
GET/domains/{domain}/callqueuesRead call queues (includes live counts such as calls waiting and agents available)
GET/domains/{domain}/callqueues/listBasic list of queues
POST/domains/{domain}/callqueuesCreate a queue
GET/domains/{domain}/callqueues/{callqueue}Read one queue
PUT/domains/{domain}/callqueues/{callqueue}Update a queue
DELETE/domains/{domain}/callqueues/{callqueue}Delete a queue
GET/domains/{domain}/callqueues/{callqueue}/agentsAgents in a queue
POST/domains/{domain}/callqueues/{callqueue}/agentsAdd an agent (callqueue-agent-id, for example 1000@<domain>)
PUT/domains/{domain}/callqueues/{callqueue}/agents/{callqueue-agent-id}Update an agent
DELETE/domains/{domain}/callqueues/{callqueue}/agents/{callqueue-agent-id}Remove an agent
GET/domains/{domain}/agentsAll agents in the domain
PATCH/domains/{domain}/callqueues/{callqueue}/agents/{callqueue-agent-id}/loginLog an agent in
PATCH/domains/{domain}/callqueues/{callqueue}/agents/{callqueue-agent-id}/logoutLog an agent out
PATCH/domains/{domain}/callqueues/{callqueue}/agents/{callqueue-agent-id}/onecallTake a single call, then go offline
PATCH/domains/{domain}/callqueues/all/agents/{callqueue-agent-id}/{status}Set an agent's offline status across all queues
GET/domains/{domain}/queuedcall/{queue}Calls currently waiting in a queue

Queue dispatch types include Round-robin, Tiered Round-robin, Ring All, Linear Cascade, Linear Hunt and Call Park.

Call history (CDRs)

MethodPathWhat it does
GET/domains/{domain}/cdrsCall records for the domain (datetime-start and datetime-end required)
GET/domains/{domain}/users/{user}/cdrsCall records for one user
GET/domains/{domain}/cdrs/countCount calls and total minutes

Useful filters: datetime-start, datetime-end, type (Inbound, Outbound, On-net, Off-net, Missed, Received), dialled, caller, site, group (department), plus start and limit (default 100, maximum 1000). Key fields: id, call-direction, call-start-datetime, call-answer-datetime (present only when the call was answered), call-disconnect-datetime, call-orig-from-user, call-orig-caller-id, call-orig-from-name, call-orig-to-user, call-term-user, call-talking-duration-seconds, call-total-duration-seconds, call-disconnect-reason-text, call-orig-call-id and call-intelligence-job-id.

Recordings and transcriptions

Recordings are looked up by call ID (from the CDR, call-orig-call-id), not listed as a collection.

MethodPathWhat it does
GET/domains/{domain}/recordings/{callid}Recording(s) for a call in the domain
GET/domains/{domain}/users/{user}/recordings/{callid}Recording for a call for one user
GET/domains/{domain}/transcriptionsTranscription for a call (query: id, date as YYYYMM, callid)

The recording response includes call-recording-status, file-duration-seconds, file-size-kilobytes and file-access-url, a link you use to download the audio. Call recording must be turned on for the user or number; ask Empire Telecom (recording is included free with EmpireUC).

Voicemail and greetings

MethodPathWhat it does
GET/domains/{domain}/users/{user}/voicemails/{folder}List voicemails in new, save or trash
GET/domains/{domain}/users/{user}/voicemails/{folder}/{filename}Read one voicemail (includes an audio link)
DELETE/domains/{domain}/users/{user}/voicemails/{folder}/{filename}Delete a voicemail
PATCH/domains/{domain}/users/{user}/voicemails/{folder}/{filename}/saveMove to the saved folder
PATCH/domains/{domain}/users/{user}/voicemails/{folder}/{filename}/forwardForward to another user
GET/domains/{domain}/users/{user}/greetingsList greetings
POST/domains/{domain}/users/{user}/greetingsCreate a greeting (text to speech or uploaded audio)
GET/domains/{domain}/users/{user}/greetings/{index}Read one greeting
GET/domains/{domain}/users/{user}/vmailnagVoicemail reminder settings
GET/domains/{domain}/mohMusic on hold for the domain
GET/domains/{domain}/users/{user}/mohMusic on hold for a user

Messaging (SMS, MMS and chat)

MethodPathWhat it does
GET/domains/{domain}/smsnumbersSMS-enabled numbers in the domain
POST/domains/{domain}/smsnumbersEnable a number for SMS (number, application, dest)
PUT/domains/{domain}/smsnumbers/{smsnumber}Update an SMS number
DELETE/domains/{domain}/smsnumbers/{smsnumber}Remove SMS from a number
GET/domains/{domain}/users/{user}/smsnumbersSMS numbers assigned to a user
GET/domains/{domain}/users/{user}/messagesessionsA user's conversations
GET/domains/{domain}/messagesessionsConversations for the domain
POST/domains/{domain}/users/{user}/messagesStart a new message session
GET/domains/{domain}/users/{user}/messagesessions/{messagesession}/messagesMessages in a conversation
POST/domains/{domain}/users/{user}/messagesessions/{messagesession}/messagesSend a message (type sms, mms, chat; message, destination, from-number)

Important: Business texting in the US requires 10DLC registration of the sending numbers. Ask Empire Telecom to register and enable SMS before you send through the API.

Live calls and call control

MethodPathWhat it does
GET/domains/{domain}/callsActive calls in the domain
GET/domains/{domain}/calls/countCount active calls
GET/domains/{domain}/users/{user}/callsA user's active calls
GET/domains/{domain}/users/{user}/calls/{callid}Read one active call
POST/domains/{domain}/users/{user}/callsPlace a call (click-to-call: rings the user's phone, then dials call-term-user)
DELETE/domains/{domain}/users/{user}/calls/{call_id}Hang up
PATCH/domains/{domain}/users/{user}/calls/{call_id}/answerAnswer
PATCH/domains/{domain}/users/{user}/calls/{call_id}/holdHold
PATCH/domains/{domain}/users/{user}/calls/{call_id}/unholdTake off hold
PATCH/domains/{domain}/users/{user}/calls/{call_id}/transferTransfer
DELETE/domains/{domain}/users/{user}/calls/{call_id}/rejectReject a ringing call (the published reference lists DELETE; confirm against your release)

These act on the user's desk phone or app. You do not need a browser softphone to control calls.

Contacts

MethodPathWhat it does
GET/domains/{domain}/users/{user}/contactsA user's personal contacts
POST/domains/{domain}/users/{user}/contactsCreate a personal contact
GET/domains/{domain}/contactsShared (company) contacts
POST/domains/{domain}/contactsCreate a shared contact

Emergency (911) addresses

MethodPathWhat it does
GET/domains/{domain}/addressesEmergency addresses in the domain
POST/domains/{domain}/addressesCreate an address
POST/domains/{domain}/addresses/validateValidate an address before saving it
PUT/domains/{domain}/addresses/{emergency-address-id}Update an address
DELETE/domains/{domain}/addresses/{emergency-address-id}Delete an address
GET/domains/{domain}/addresses/countCount addresses
GET/domains/{domain}/users/{user}/addressesAddresses assigned to a user
POST/domains/{domain}/users/{user}/addressesAssign an address to a user
GET/domains/{domain}/addresses/endpointsAddress endpoints for the domain

Required fields for an address: address-name, caller-name, address-line-1, address-city, address-state-province-abbreviation, address-postal-code, address-country-abbreviation and address-location-description (for example "2nd floor nurses' station").

Dial plans, conferences and other areas

MethodPathWhat it does
GET/domains/{domain}/dialplans/{dialplan}/dialrulesRead dial rules in a dial plan
POST/domains/{domain}/dialplans/{dialplan}/dialrulesAdd a dial rule
PUT/domains/{domain}/dialplans/{dialplan}/dialrules/{dialrule}Update a dial rule
DELETE/domains/{domain}/dialplans/{dialplan}/dialrules/{dialrule}Delete a dial rule
GET/domains/{domain}/connectionsSIP connections (trunks) for the domain
GET/domains/{domain}/subscriptionsEvent subscriptions for the domain

The full reference also covers meetings and video, phone templates, images, configurations, backups and certificate management. Most of these are platform-administration features that Empire Telecom manages for you.

Features that depend on the platform release

The NetSapiens reference for newer releases (45 and later) documents some endpoints that may not be on the EmpireUC release yet. Check with Empire Telecom before relying on them:

MethodPathWhat it does
GET/domains/{domain}/statistics/callqueues/{callqueue}Queue statistics (default fields VOL,CH,ATT,AC,AWT,SL)
GET/domains/{domain}/statistics/callqueues/aggregateStatistics for all queues combined
GET/domains/{domain}/statistics/agentAgent statistics
GET/domains/{domain}/statistics/agentLogAgent log
GET/domains/{domain}/callqueuereport/abandonedAbandoned calls
GET/domains/{domain}/departments/listList departments
GET/domains/{domain}/presence/listPresence for the whole domain in one call
PATCH/domains/{domain}/users/{user}/calls/{call_id}/transferPeerTransfer the other party of a call

Call blocking

MethodPathWhat it does
GET/domains/{domain}/number-filtersNumbers blocked for the whole domain
POST/domains/{domain}/number-filtersBlock numbers for the domain
DELETE/domains/{domain}/number-filtersUnblock numbers for the domain
GET/domains/{domain}/users/{user}/number-filtersNumbers blocked for one user
POST/domains/{domain}/users/{user}/number-filtersBlock numbers for one user
DELETE/domains/{domain}/users/{user}/number-filtersUnblock numbers for one user

Example body: {"phone-numbers-to-reject": {"parameters": ["2015550199"]}}. You can also block callers for a user with the phone-numbers-to-reject list on that user's answer rule.

Webhooks and events

EmpireUC pushes events to your system through event subscriptions. You register an HTTPS URL, and the platform POSTs JSON arrays of changed objects to it.

MethodPathWhat it does
GET/subscriptionsList your subscriptions
POST/subscriptionsCreate a subscription
GET/subscriptions/{id}Read one subscription
PUT/subscriptions/{id}Update a subscription
DELETE/subscriptions/{id}Delete a subscription
GET/domains/{domain}/subscriptionsSubscriptions for a domain
POST/domains/{domain}/subscriptionsCreate a subscription for a domain

Example:

POST /ns-api/v2/subscriptions
{
"model": "call",
"post-url": "https://hooks.example.org/empireuc/calls",
"domain": "<domain>",
"user": "*"
}

Models you can subscribe to: call (every change to active calls: ringing, answered, ended), call_origid, cdr (one event when a call completes), agent (queue agent availability), presence, subscriber (user record changes), voicemail (a new voicemail; the transcription may arrive later), message and messagesession (SMS and chat), auditlog_lite (create and delete of key objects). Create one subscription per model.

Good to know:

  • Delivery is near-real-time, not instant: the platform checks for changes about every 3 seconds. A screen pop typically appears by the second ring.
  • Each POST carries an X-Correlation-ID header holding the subscription ID; use it to check that the post is genuine and to route posts when several subscriptions share one URL.
  • post-url should be HTTPS with a valid certificate. Custom ports are allowed.
  • A subscription created with a timed token expires with that token unless you set subscription-expires-datetime; one created with an API key lasts much longer. Re-create subscriptions when they expire.
  • The response shows status (pending, active or error), posts-count and error-count, which help you troubleshoot.

Errors, limits and good practice

StatusMeaning
200Success, data returned
202Accepted: the change was queued. Many write calls accept "synchronous": "yes" to wait and return 200 with the saved object
400Bad request: a field is missing or invalid (body has code and message)
401Not authenticated: token missing, expired or invalid. Refresh and retry once
403Forbidden: your user scope does not allow this (for example a Basic User reading another user)
404Record not found: check the domain ID, extension or call ID
409Conflict: the object already exists (for example a duplicate phone number or subscription)
  • Paging: collection reads accept start (offset, starting at 0) and limit. CDR reads return at most 1,000 records per page. Keep requesting until fewer than limit records come back. Count endpoints (/count) tell you the total first.
  • Dates: CDR and statistics filters accept YYYY-MM-DD HH:MM:SS or RFC 3339 with an offset. State the time zone explicitly.
  • Rate limits: NetSapiens does not publish fixed limits. Avoid polling faster than a few seconds, use event subscriptions for live data, and use exponential back-off on errors or 5xx responses.
  • Logging tag: add the header X-NetSapiens-Log: <your-tag> to a request when Empire Telecom support is helping you trace a problem; it lets the request be found in the platform logs.
  • Security: keep the client secret, refresh tokens and API keys in a secrets vault, never in source code or browser JavaScript. Restrict keys to your server IP addresses where possible, share credentials with as few people as possible, test against a non-production user first, and log your own API activity so you can audit changes.
  • Least privilege: use a Basic User login for single-user tools (click-to-call, personal call history) and Office Manager only when the integration truly needs the whole organisation.

Common tasks

Pull yesterday's call log

1Get a token with POST /tokens.
2Call GET /domains/~/cdrs?datetime-start=2026-10-19 00:00:00&datetime-end=2026-10-19 23:59:59&limit=1000.
3If 1,000 records come back, repeat with start=1000, start=2000 and so on.
4Treat a call as answered when call-answer-datetime is present; use call-talking-duration-seconds for talk time.

Download a call recording

1Find the call in the CDRs and take its call-orig-call-id.
2Call GET /domains/~/recordings/{callid}.
3Download the audio from the returned file-access-url (send your bearer token if asked) and store it securely; recordings may contain patient or resident information.

Get notified when a call ends

1Create a subscription: POST /subscriptions with "model": "cdr" and your HTTPS post-url.
2Check X-Correlation-ID on each incoming POST matches your subscription ID.
3Read the call details from the JSON array in the body and save them in your system.

Click-to-call from your CRM

1Sign in as the agent (or use Office Manager scope for the domain).
2Call POST /domains/~/users/1000/calls with "synchronous": "yes", a unique call-id and "call-term-user": "12015550123".
3The agent's phone rings first; when they answer, the platform dials the customer.

Change where the main number rings after hours

1Read the number: GET /domains/~/phonenumbers/{phonenumber}.
2Update it: PUT /domains/~/phonenumbers/{phonenumber} with a new dial-rule-application (for example to-voicemail or to-callqueue) and dial-rule-translation-destination-user.
3For time-based switching, use a timeframe and answer rules on the destination user instead of changing the number each evening.

Add a new staff member

1Create the user: POST /domains/~/users with user, name-first-name, name-last-name, email-address, user-scope.
2Assign a device or desk phone (POST /domains/~/users/{user}/devices or POST /domains/~/phones).
3Add them to a queue if needed: POST /domains/~/callqueues/{callqueue}/agents.
4Assign their 911 address: POST /domains/~/users/{user}/addresses.

Build a simple wallboard

1Poll GET /domains/~/callqueues every 10 to 15 seconds for waiting calls and available agents, or subscribe to the agent and call models.
2Show active calls from GET /domains/~/calls.
3Show each person's status from user-presence-status on GET /domains/~/users.

More information

Need a hand? Call Empire Telecom support at (732) 363-9898, email support@empiretelecomnj.com, or open a ticket in the customer portal.