Introduction

With DialLink API, you can easily access our apps and create integrations with other products. Our API is meant to be simple and human-readable: you send requests to endpoints and get responses, just like with any other REST API.

This API reference describes public DialLink endpoints and methods as well as explains important concepts that will help you create awesome integrations with DialLink products.

How is DialLink API organized?

DialLink allows access to all DialLink products as well as common services running under the hood. Depending on your goal, look for endpoints in a corresponding section:

  • Phone System API - provides access to calls, auto-receptionist settings, etc.
  • Hub API - provides access to common settings, user and role management, subscription settings, etc.
  • Object Bucket Storage API - manages documents and files stored with DialLink.
  • Call Queue API - manages call queue functionality in DialLink.
  • Number Porting API - facilitates transferring phone numbers to DialLink.

New to the API world? Need more details about REST API?

With an API (application programming interface), you can request data or send it to the app without any visual user interface (what you see on your screen). It’s handy for computer-to-computer interaction. In most cases, APIs sort of copy what humans do while using the app.

In REST APIs, the data is sent in and out through specially exposed gateways, called endpoints. A company with a public API allows access to its resources through a dedicated server. Together, the server name followed by an endpoint look like a regular URL. For example https://api.diallink.com/v1/phone-system/recordings

While each service operates differently, in general you will leverage standard HTTP methods such as GET to query data and POST, PUT, or PATCH to submit data. Standard HTTP responses such as 200 OK or 401 Unauthorized will notify on the call results. Along with these requests, you’ll send or receive data. For example, after querying the list of companies, you’ll get a JSON with company objects. But to create a new company, you have to send a company object in a POST body instead.

Authentication

To access DialLink resources, you’ve got to authenticate your API calls. DialLink allows authenticating with Bearer tokens and with API keys. The latter method is recommended.

API key authentication

The API key is a safe and reliable way to authenticate and authorize your apps with DialLink. Start by creating an API key in DialLink Account. Learn more about generating API keys. Note that DialLink doesn’t store the unencrypted API key, just the last four digits so make sure to copy it before closing the popup window.

To authenticate your calls, include X-API-KEY in the request header.

The API key has the same permissions as the user who generated it (for example, view-only rights). To see your permissions, send GET /users/me request. An API key is valid for 365 days. Once the key expires, the access to DialLink resources will be revoked.

Bearer authentication

When authenticating with a Bearer token, you leverage the same very token that is generated when you log in to the product online. With a token, you can send requests to DialLink API and get access to resources the user is authorized to see. The bearer token consists of the access token and the refresh token. Initially, look for them in the Local Storage.

The Authorization: Bearer should be provided in the request header for every call you make.

The token expires after 1 minute. To continue using API, you have to refresh it by sending a request to /auth/tokens/. The refresh token is valid for 10 minutes.

API key authentication
1$ curl https://api.diallink.com/v1/phone-system/contacts -i -X GET 
2 -H 'Accept: application/json' 
3 -H 'X-API-KEY: $YOUR-APIKEY' 
4 
Bearer authentication
1$ curl https://api.diallink.com/v1/phone-system/contacts -i -X GET 
2 -H 'Accept: application/json' 
3 -H 'Authorization: Bearer $YOUR-TOKEN' 
4 

Quick Start

Ready to start? Let’s dive right in. Follow these steps to get started with DialLink API.

Get your DialLink account

Make sure you have an account with DialLink. It’s a good idea to create a new account dedicated to API integration.

If you are the first user and need more information on how to set a tenant, then refer to DialLink user documentation.

Generate an API key

To authenticate your calls to DialLink API, you have to provide an API key with each request. Otherwise, DialLink will return an error 401 Unauthorized.

To get a key:

  1. Go DialLink Account, sign in, and proceed to the API key page.
  2. Select Add API key, enter its name, and click Generate.
  3. Copy the key and save it to a secure location. Note that DialLink doesn’t store the unencrypted key and you won’t be able to see it after closing the window.

Understand DialLink API structure

Depending on your goal, look for endpoints in a corresponding section:

  • Phone System API - provides access to calls, auto-receptionist settings, etc.
  • Hub API - provides access to common settings, user and role management, subscription settings, etc.
  • Message Center API - facilitates sending and receiving emails.
  • Object Bucket Storage API - manages documents and files stored with DialLink.
  • Call Queue API - manages call queue functionality in DialLink.
  • Number Porting API - facilitates transferring phone numbers to DialLink.

Send a test GET request

Note: for this tutorial, we assume your company has an active subscription to DialLink.

Let’s start with a safe and easy API call. We’ll query the products currently offered by your company.

Request:

curl -i -X GET \
   -H "Accept:application/json" \
   -H "X-API-KEY:$YOUR-APIKEY" \
 'https://api.diallink.com/v1/phone-system/users'

Response:

200 OK

{
    "data": [
        {
            "id": "758e5507-ab14-4835-99ce-0020a12ea467",
            "status": {
                "status": "OFFLINE"
            },
            "email": "john.doe@company.com",
            "firstName": "John",
            "lastName": "Doe",
            "jobTitle": "CEO",
            "admin": true,
            "parallelCallsEnabled": true
        }
    ],
    "paging": {
        "pageNumber": 1,
        "pageSize": 20,
        "totalNumberOfRecords": 1,
        "totalNumberOfPages": 1,
        "hasNextPage": false,
        "hasPreviousPage": false,
        "hasMore": false
    }
}

Add query parameters

Like with any other REST API, you can modify your queries by adding parameters. For example, change the number of objects returned per page or query the objects from the next page. For example, let’s update the query to return 25 records per page and get the second page.

curl -i -X GET \
   -H "Accept:application/json" \
   -H "X-API-KEY:$YOUR-APIKEY" \
  'https://api.diallink.com/v1/phone-system/users?pageSize=1'

Send a test POST request

Let’s add a new product. Before sending a POST request, check the incoming object specification, i.e. the parameters the object must have to be accepted by DialLink API. You can always look for the request object in API reference.

In case the object has JSON-formatted properties (and the ProductRequest object does!), retrieve properties by sending GET to https://api.diallink.com/v1/phone-system/contacts.

Request:

curl -i -X POST \
   -H "Accept:application/json" \
   -H "X-API-KEY:$YOUR-APIKEY" \
   -H "Content-Type:application/json" \
   -d \
    '{
      "firstName": "Sophia",
      "lastName": "Brooks",
      "companyName": "Company inc.",
      "shared": false,
      "favorite": false,
      "phoneNumbers": [
          {
              "type": "WORK",
              "phoneNumber": "+17175501675"
          }
      ]
  }' \
 'https://api.diallink.com/v1/phone-system/contacts'

Response:

201 CREATED

Send a test DELETE request

  1. To delete the created contact by the following request

Request:

curl -i -X DELETE \
   -H "Accept:application/json" \
   -H "X-API-KEY:$YOUR-APIKEY" \
 'https://api.diallink.com/v1/phone-system/contacts/671db0b8-0576-4867-a611-662bba3ae364'

Response:

200 OK

{
    "data":[
        {
            "id": "$ID-UUID",
            "tenantId": null,
            "properties":{
                "code": "hp",
                "cost": 7600,
                "price": 11990,
                "name": "Harp",
                "description": "Full-size pedal harp"
            }
        }
    ],
    "paging":{}
}

PUT or PATCH?

Diallink allows modifying data with PUT and PATCH requests. The former completely re-writes the object while the latter updates the parameters you pass and keeps remaining as they are.

Object Models

DialLink APIs operate with objects. High-level objects can include smaller subordinary objects. For example the Quote object includes Items, PaymentPlans, and AdditionalFees.

In some cases, the object you submit and the object you receive may slightly vary in structure. The objects returned by DialLink API typically include the UUID generated by the server and other additional parameters. To distinguish models, the incoming object names typically end with “request”. For example, ContactRequest.

Incoming object model - ContactRequest

{
    "companyName": "Arrow Inc.",
    "industry": "RETAIL",
    "type": "LEAD",
    "employeeCount": "100",
    "addressLine1": "232 1st street",
    "addressLine2": "Suite 2210",
    "city": "Newtown",
    "country": "US"
}
1$ curl GET https://api.diallink.com/v1/phone-system/contacts -i -X GET 
2 -H 'Accept:application/json' 
3 -H 'X-API-KEY:$YOUR-APIKEY' 
4 
200 OK
{
  "data": [
    {
      "firstName": "Sophia",
      "lastName": "Brooks",
      "companyName": "Company inc.",
      "shared": false,
      "addresses": [],
      "phoneNumbers": [
        {
          "type": "WORK",
          "id": "f7d43da9-694d-444d-a04e-e7676d0fa02d",
          "phoneNumber": "+17175501675"
        }
      ],
      "emails": [],
      "favorite": false,
      "forceSave": false,
      "id": "671db0b8-0576-4867-a611-662bba3ae364",
      "type": "EXTERNAL"
    }
  ],
  "paging": {
    "pageNumber": 1,
    "pageSize": 20,
    "totalNumberOfRecords": 1,
    "totalNumberOfPages": 1,
    "hasNextPage": false,
    "hasPreviousPage": false,
    "hasMore": false
  }
}

Responses

DialLink API uses standard HTTP responses for API calls. Depending on the request method (POST, GET, DELETE, PUT, or PATCH), you’ll receive a response that can either be successful or failed.

Successful responses

  • 200 OK is returned for successful GET, PATCH, and PUT operations.
  • 201 CREATED is returned for successful POST operations.
  • 204 NO CONTENT is returned for successful DELETE operations.

200 and 201 responses return the object in the response body. Note that incoming objects and the objects returned in response may slightly vary in structure.

Error responses

  • 400 BAD REQUEST
  • 401 UNAUTHORIZED
  • 404 NOT FOUND
  • 405 METHOD NOT ALLOWED
  • 500 INTERNAL SERVER ERROR and other 5XX errors

The errors come with a description explaining the issue.

Filtering

For most high-level GET requests, DialLink enables you to filter data before retrieving it. You can create flexible and complex queries while searching for records you are interested in. The parameters you can filter by are listed in the parameters section for each endpoint call.

Basic filtering

For queries such as “List US-based companies” or “Retrieve all outbound calls”, you can leverage simple filtering. Add a filtering parameter to your API call and provide the value you are looking for: /endpoint?{parametername}={value}. The DialLink API will return records that are exact matches.

For example:

  • https://api.diallink.com/v1/phone-system/calls?direction=outbound

To learn about the filtering parameters, check out descriptions for each endpoint and operation individually.

Filtering with match type operators

Available in Hub API, Message Center API, OBS API, Phone System API, Call Queue API, and Number Porting API.

You can leverage operators such as ‘like’ or ‘equals’ and look for a wider range of records. Add {parametername}={operator}::{value} to your query.

For example,https://api.diallink.com/v1/talk/contacts?fullName=like::L returns all contacts whose names contain the letter L.

Supported operators

OperatorDescriptionExample
isnullIs empty or unknownisnull(zip)
isnotnullIsn't empty or unknownisnotnull(country)
eqEqualseq(country,US)
neqIsn't equalneq(industry,GOVERNMENT)
gtGreater thangt(employeeCount,1000)
gteGreater than or equalgte(annualRevenue,500000)
ltLess thangt(employeeCount,15)
lteLess than or equalgte(annualRevenue,200000)
inAny ofin(country,US,GE,FR)
ninNone ofnin(industry,HEALTHCARE,FINANCIAL)
btnBetweenbtn(employeeCount,15,50)
likeContainslike(companyName,Enterprise)
notlikeDoesn't containnotlike(companyName,Corp)

Advanced filtering with grouping

Available for specific endpoints in Phone System API and Hub API

Advanced filtering is a versatile tool for data management. You can create multi-tier complex queries combining AND and OR clauses, organizing filtering parameters into groups, introducing nesting, searching for fuzzy results, etc. The endpoint calls that support advanced filtering have a special filter parameter and explicitly mention the possibility of advanced filtering.

To introduce an advanced query, add filter={operator}({parameter},{value}). Each {value} can be replaced with a subgroup.

For example, you can search for companies that either demonstrated annual revenue of more than $500,000, or have more than 1,000 employees and reside in the U.S. Seems complex? But let’s break it down into logical groups.

  • [Annual revenue > $500,000] — Condition 1

OR

  • [Employee count > 1,000] AND [Country is USA] — Condition 2 that includes two sub-conditions with AND relationship

On a high level, the filter string looks like: filter=OR(Condition1,Condition2). The condition 1 is: gt(annualRevenue,500000) The condition 2 is a conjunction of two subconditions joined by AND: AND(gt(employeeCount,1000),eq(country,US))

As a result, the final API call will look as follows:

GET https://api.diallink.com/v1/phone-system/contacts?filter=AND(eq(firstName,Sophia),like(phoneNumbers.phoneNumber,1675))

Supported operators

OperatorDescriptionExample
ANDLogical conjunctionAND(gt(employeeCount,1000),eq(country,US))
ORlogical disjunctionOR(gt(annualRevenue,500000)),gt(employeeCount,1000))
isnullIs empty or unknownisnull(zip)
isnotnullIsn't empty or unknownisnotnull(country)
eqEqualseq(country,US)
neqIsn't equalneq(industry,GOVERNMENT)
gtGreater thangt(employeeCount,1000)
gteGreater than or equalgte(annualRevenue,500000)
ltLess thangt(employeeCount,15)
lteLess than or equalgte(annualRevenue,200000)
inAny ofin(country,US,GE,FR)
ninNone ofnin(industry,HEALTHCARE,FINANCIAL)
btnBetweenbtn(employeeCount,15,50)
likeContainslike(companyName,Enterprise)
notlikeDoesn't containnotlike(companyName,Corp)
Example: filtering with match type operators
1$ curl https://api.diallink.com/v1/phone-system/contacts?fullName=like::So -i -X GET 
2 -H 'Accept: application/json' 
3 -H 'X-API-KEY: $YOUR-APIKEY' 
4
Example: advanced filtering
1$ curl https://api.diallink.com/v1/phone-system/contacts?filter=AND(eq(firstName,Sophia),like(phoneNumbers.phoneNumber,1675)) -i -X GET 
2 -H 'Accept: application/json' 
3 -H 'X-API-KEY: $YOUR-APIKEY' 
4

Paging and Sorting

Paging

To avoid time-consuming queries, DialLink returns data page after page while you can control the number of objects per page and the offset. For example, you’d like to get your companies and run the GET /companies query. DialLink will return the first 50 records and notify you about the remaining companies in the paging section. To query the next 50 records, add the pageNumber=2 parameter to your query. Alternatively, you can update the pageSize parameter.

Sorting

With most data fetching queries, you can sort the results by a certain parameter, for example by name or price, either in ascending (+) or descending (-) order. By default, sorting isn’t applied. To configure sorting, add the sort parameter to your query. For example, sort the companies by the country they originate in, in descending order: sort=-country.

Understanding response

The paging response section is available with almost all bulk listing queries such as GET /companies, GET /contacts, or GET /quotes. Here, you’ll find information about paging and applied sorting.

  • pageNumber: the current page number. If no sorting is applied, the records are divided into pages based on their position in the database, starting from the bottom.
  • pageSize: the number of records returned per page. By default, 20.
  • totalNumberOfRecords: how many records are available in total.
  • totalNumberOfPages: how many pages are populated all together.
  • hasNextPage: the true value notifies you that there are more pages containing records. The false value means this is the last page.
  • hasPreviousPage: the true value notifies you that there are pages before the current one. The false value means this is the first page.
  • sortingCriteria: the null value marks that no sorting is applied. + with a parameter name means ascending sorting (e.g., +price), - with a parameter name means descending sorting (e.g., -country).
  • hasMore: the true value notifies you that there are more records besides those retrieved. The false value means this is no more data left.
GET Companies with paging and sorting
1$ curl https://api.diallink.com/v1/phone-system/contacts?pageSize=5&sort=-updatedAt -i -X GET 
2 -H 'Accept:application/json' 
3 -H 'X-API-KEY:$YOUR-APIKEY' 
4 
200 OK
{
  "data": [
    {
      "firstName": "Sophia",
      "lastName": "Brooks",
      "companyName": "Company inc.",
      "shared": false,
      "addresses": [],
      "phoneNumbers": [
        {
          "type": "WORK",
          "id": "f7d43da9-694d-444d-a04e-e7676d0fa02d",
          "phoneNumber": "+17175501675"
        }
      ],
      "emails": [],
      "favorite": false,
      "forceSave": false,
      "id": "671db0b8-0576-4867-a611-662bba3ae364",
      "type": "EXTERNAL"
    }
  ],
  "paging": {
    "pageNumber": 1,
    "pageSize": 5,
    "totalNumberOfRecords": 1,
    "totalNumberOfPages": 1,
    "hasNextPage": false,
    "hasPreviousPage": false,
    "sortingCriteria": "-updatedAt",
    "hasMore": false
  }
}

Rate Limits

We’ve enforced rate limiting for API calls to ensure all customers have no-latency access to DialLink resources. If API key exceeds the call limit, you won’t have access to DialLink API for a while.

Integrations

We encourage you to create custom integrations with DialLink and enrich your corporate workflows.

In our turn, we are about to launch the DialLink Marketplace, a place with useful apps and ready-to-use integrations that will help you seamlessly connect DialLink products with your favorite tools.

Looking for ready-to-use integrations?

Check out our Marketplace!

Account Hub API

The DialLink Account Hub API provides access to the service that manages tenant and account settings, subscriptions, user rights and permissions. The Account Hub service (account.diallink.com) is an essential part of DialLink ecosystem. All tenants regardless of apps included in their subscriptions have access to the Hub at all times.

API Keys

API keys are used instead of bearer tokens to authenticate applications connecting to DialLink via API.

endpoints

Retrieve API keys

Use this endpoint to get a list of API keys. This endpoint supports paging, sorting, and filtering.

Parameters

id string

A unique ID of the API key.

name string

The name of the API key.

pageNumber integer

This parameter affects paging. It defines the chunk of data to be retrieved, e.g., records from page 3.

pageSize integer

This parameter affects paging. It defines the number of records per page, e.g., 20 records per page.

sort string

This parameter affects sorting. It specifies the property name to sort records, e.g., by price or date.

Returns

200

Returns API keys. Note that for security reasons you won't be able to see key secret.

default

Bad request, security violation, or internal server error.

get

/api-keys

Select languageLang

shell

java

php

node

python

go

csharp

1curl --request get \
2	--url https://api.diallink.com/v1/account-hub/api-keys \
3	--header 'X-API-KEY: $YOUR-APIKEY'
response 200
{
  "data": [
    {
      "id": "4a18bc90-4a4d-448a-b48d-b808cf2a4c52",
      "name": "API key for integration",
      "enabled": true,
      "key": "5d5b4ed1-0000-XXXX-0000-8c9d90d23c2b+58df84fc-0000-XXXX-0000-8d381496bc2a",
      "expiresAt": 1691146442391
    },
    {
      "id": "4a18bc90-4a4d-448a-b48d-b808cf2a4c52",
      "name": "API key for integration",
      "enabled": true,
      "key": "5d5b4ed1-0000-XXXX-0000-8c9d90d23c2b+58df84fc-0000-XXXX-0000-8d381496bc2a",
      "expiresAt": 1691146442391
    }
  ],
  "paging": {
    "pageNumber": 1,
    "pageSize": 20,
    "totalNumberOfRecords": 1,
    "totalNumberOfPages": 1,
    "hasNextPage": false,
    "hasPreviousPage": false,
    "sortingCriteria": null,
    "hasMore": false
  }
}

Create an API key

Use this endpoint to create a new API key.

Request Body

Content Type: application/json

Hide

name string Required

A user-friendly key name.

enabled boolean Required

The key status.

Returns

201

Returns a new API key. Make sure to save it to a secure location. DialLink Account Hub doesn't store API keys.

default

Bad request, security violation, or internal server error.

post

/api-keys

Select languageLang

shell

java

php

node

python

go

csharp

1curl --request post \
2	--url https://api.diallink.com/v1/account-hub/api-keys \
3	--header 'Content-Type: application/json' \
4	--header 'X-API-KEY: $YOUR-APIKEY' \
5	--data '{"name":"API key for integration","enabled":true}'
response 201
{
  "id": "4a18bc90-4a4d-448a-b48d-b808cf2a4c52",
  "name": "API key for integration",
  "enabled": true,
  "key": "5d5b4ed1-0000-XXXX-0000-8c9d90d23c2b+58df84fc-0000-XXXX-0000-8d381496bc2a",
  "expiresAt": 1691146442391
}

Get an API key

Use this endpoint to retrieve an existing API key by its ID. Note that DialLink doesn't store the unencrypted API key, just the last four digits.

Parameters

id string

A unique ID of the object.

Returns

200

Returns the requested API key. Note that for security reasons you won't be able to see key secret.

default

Bad request, security violation, or internal server error.

get

/api-keys/{id}

Select languageLang

shell

java

php

node

python

go

csharp

1curl --request get \
2	--url https://api.diallink.com/v1/account-hub/api-keys/%7Bid%7D \
3	--header 'X-API-KEY: $YOUR-APIKEY'
response 200
{
  "id": "4a18bc90-4a4d-448a-b48d-b808cf2a4c52",
  "name": "API key for integration",
  "enabled": true,
  "key": "5d5b4ed1-0000-XXXX-0000-8c9d90d23c2b+58df84fc-0000-XXXX-0000-8d381496bc2a",
  "expiresAt": 1691146442391
}