Glia API

Glia provides a robust set of APIs that allow for two-way data integrations with the Glia platform via secure REST API calls. This documentation provides information and examples for each of the available APIs delivered by Glia. These APIs allow clients to create integrations for areas of the platform such as Visitors, Operators, Engagements, Statistics, and Single Sign On. The APIs allow clients to keep Glia synchronized with their systems of record with minimal development effort.

This documentation is for Glia API v1 and includes example responses for each API method illustrating the attributes returned by that method. If you have any issues, requests or concerns with the documentation please contact our Customer Support team at

Current Version

The current API version is v1 and it must be explicitly requested via the Accept header.

Accept: application/vnd.salemove.v1+json


All API access is over HTTPS and accessed from the endpoint. All data is sent and received as JSON. The only supported cryptographic protocol is TLS 1.2.

Blank fields are included as null instead of being omitted.

HTTP/1.1 200 OK
Date: Thu, 29 Jan 2015 11:44:37 GMT
Status: 200 OK
Connection: close
Content-Type: text/html;charset=utf-8
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, PATCH
Access-Control-Allow-Headers: *, Content-Type, Accept, AUTHORIZATION, Cache-Control, X-Salemove-Visit-Session-Id
Access-Control-Allow-Credentials: true
Access-Control-Max-Age: 1728000
Access-Control-Expose-Headers: Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma
Content-Length: 0
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN

All timestamps use the ISO 8601 format.



Many API methods take optional parameters. For GET requests, any parameters not specified as part of the path can be passed as an HTTP query string parameter. For POST, PATCH, PUT, and DELETE requests, parameters not included in the URL should be encoded as JSON with a content-type of application/json.

Client Errors

If the request is malformed, then the server responds with an error. The response contains a description of the error. In general, the response includes two attributes: namely, error which contains a short description of the error encountered; and a debug_message which contains a more detailed explanation of the error.

HTTP/1.1 400 Bad Request
"error": "BadRequest",
"message": "Invalid api version used",
"debug_message": "Invalid api version used. Make sure you set the 'Accept' header with API version e.g. 'application/vnd.salemove.v1+json'"

HTTP Verbs

Where possible, the Glia APIs strive to use appropriate HTTP verbs for each action.




Can be issued against any resource to get just the HTTP header info.


Used for retrieving resources.


Used for creating resources.


Used for updating resources with partial JSON data. For instance, an Issue resource has title and body attributes. A PATCH request may accept one or more of the attributes to update the resource.


Used for replacing resources or collections. For PUT requests with no body attribute, be sure to set the Content-Length header to zero.


Used for deleting resources.


Along with the request, the following headers must be sent:




Specifies the response format and the API version. See Accept for more information.


API token for Operator or session ID for Visitor. See Authorization for more information.

curl --request GET \
--header "Authorization: Token $token" \
--header "Accept: application/vnd.salemove.v1+json" \

Operator Authentication

Operator access token can be aquired using Operator API token which is provided by the Site success manager.

curl --request POST \
--header "Accept: application/vnd.salemove.v1+json" \
--header "Content-Type: application/json" \
--data '{"api_token": "$api_token"}' \


{"token": "..."}

Access tokens can be used to send requests to Glia API. Access token must be specified in the Authorization header.

curl --request GET \
--header "Authorization: Bearer $token" \
--header "Accept: application/vnd.salemove.v1+json" \

Access tokens have expiration time of one hour after which they cannot be used any more. It is however possible to create a new access token using Operator API token as described above.

Visitor authentication

Visitors must specify their access token in the Authorization header. This header can be acquired using either JS API or REST API when creating a new Site Visitor.

curl --request GET \
--header "Authorization: Bearer $access_token" \
--header "Accept: application/vnd.salemove.v1+json" \


Unless otherwise specified, all endpoints require Accept: application/vnd.salemove.v1+json header.




Specifies the API version for JSON response. For the version 1 of the API the header value is application/vnd.salemove.v1+json


Specifies the returned content type. Possible values for $content_type are described under specific endpoints

Cross Origin Resource Sharing

The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. More information about CORS is available in the CORS W3C Recommendation and in the intro to the HTML 5 Security Guide.


GET /operators

Generates the output

"next_page": "",
"last_page": "",
"collection": [
"href": "",
"attribute": "value",
"...": "..."
"href": "",
"attribute": "value",
"...": "..."

Some requests that return a large collection of items are paginated. The following parameters are supported:






Requests a specific page.



Sets the quantity of items returned with each page.

  • Minimum value is 1

  • Maximum value is 100

  • Default value is 30



Supported values are asc or desc.

GET /operators?page=2

The responses for collections that are paginated include an attribute next_page that points to the next page of items for the collection. In addition, the response includes a last_page attribute that points to the last page of the collection.