In this section of the documentation we’re going to describe how to work with our API by covering a few basic examples. The examples primarily relate to a push integration, but all integration methods available to you are detailed in the final section.

<aside> 🗣️

Note that the purpose of it is not to cover every single detail of the API and its methods. For that, the appropriate resource is the API reference.

</aside>

Basics

Our API uses REST with JSON-encoded content both in the requests and responses.

For that, we recommend setting the following headers in all your requests:

Content-Type: "application/json"
Accept: "application/json"

The base URL were we build all our documentation in top of is:

<https://api.edgetier.com>

Authentication

All the requests to this API require to be authenticated. In order to do so, you’ll need to get a key pair from some EdgeTier staff.

Once you get your API client ID and secret, you can use a standard OAuth2 approach to get a token to authenticate your other requests. You just need to issue a POST request to /oauth2/token with the following data on it:

{
    "client_id": "<your-client-ID",
    "client_secret": "<your-client-secret",
    "grant_type": "client_credentials",
}

And that will return a valid bearer token that you will just need to include in your requests as a header.

Authorization: "Bearer <your-token>"

Interactions

Interactions are the central object of our system. They represent any instance of communication between a contact centre and a customer, including chats, emails, calls, etc. (Check Interaction Types for more information).

Create Interactions

To create a new interaction we need to issue a POST to /interactions: