Knowledge Base

Table of Contents

What is the Real-Time Metrics API?

The Real-time Metrics API gives you direct access to your Real-time Dashboard metrics in the Sparkcentral platform via a convenient and secure RESTful API.

The API provides Sparkcentral customers a means to integrate with to power internal contact center dashboards in conjunction with other traditional and/or digital communication channels such as phone, email, live chat etc.

What can you do with the Real-Time Metrics API?

If you are building software, you can use the API to engage your customers by:

  • Displaying current wait time to customers in mobile application or website to set expectations on when an agent is likely to respond to enquiry.

 

If you’re a business, you can use the API to streamline internal business processes by:

  • Displaying current backlog and key metrics on digital channels alongside other contact center mediums on real-time dashboards maintained internally.
  • Keeping internal stakeholders in the loop by reporting on hourly trends in Volume & Backlog statistics across digital channels in order to efficiently route agents to another channel if volume suddenly spikes.

What Sparkcentral mediums are supported?

Sparkcentral is committed to supporting the most messaging mediums on the market with the richest set of functionality. Today, you can use Sparkcentral to converse on the following mediums:

  • Facebook
  • Twitter
  • Instagram
  • MessageBird
  • In App Messaging
  • WhatsApp
  • Twilio
  • WeChat
  • Mailgun
  • Telegram
  • Viber

Getting started

Access to the Sparkcentral Proactive-messaging endpoints requires access keys. Users with admin level access can generate keys by navigating to Settings,Integration & APIs,Rest API Keys.

Authentication

The Real-Time Metrics API uses the Client Credential Grant flow of the Oauth 2.0 specification for client authentication and authorization. Clients will be provided a client_id and client_secret to authenticate with Sparkcentral’s authorization server and will receive an access_token to use for API request authorization. The access_token should be used in an authorization header, but optionally can be passed as a query string parameter (see request/response details below). When the access_token expires the API will return a 401 unauthorized. The client can automate this by generating a new access token and replaying the failed request with the fresh access token as documented in the following section.

Client Credential Grant

Retrieve an access_token to make authorized API requests. When the access_token expires, use this endpoint to generate a new token.

Request

US Plaform:
$ curl -X POST https://public-api.sparkcentral.com/oauth2/token -H 'content-type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=YOUR_CLIENT_ID_HERE& client_secret=YOUR_CLIENT_SECRET_HERE&scope=client-read'
EU Platform:
$ curl -X POST https://public-api-eu.sparkcentral.com/oauth2/token -H 'content-type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=YOUR_CLIENT_ID_HERE& client_secret=YOUR_CLIENT_SECRET_HERE&scope=client-read' 
ParameterStatusDescription
grant_typerequiredMust be set to client_credentials
client_idrequiredSparkcentral provided client identifier
client_secretrequiredSparkcentral provided client secret
scoperequiredMust be set to client-read

Response

{ “token_type”: “bearer”, “access_token”: “a1b2c3d4e5f6”, “expires_in”: 43200 } 
ParameterDescription
token_typeThe token type to be used in the authorization header. This will always be bearer for client credentials grant.
access_tokenThe token used to authorize requests. This should be added to requests as an authorization header: Authorization: Bearer a1b2c3d4e5f6. The API will also accept access_token as a query string parameter, however using the authorization header is the preferred method.
expires_inThe number of seconds until the token expires (12 hours)

Data APIs

Inbound Message Volume

A count of inbound messages based on applied filters.

Example URI

GET /reporting-metrics/inbound-message-volume
 
URI Parameters
from
string  (required)
An ISO-8601 date time marking the inclusive start of the result. Must be URL encoded. The from filter can be a maximum of 14 days in the past.
to
string  (optional)
An ISO-8601 date time marking the exclusive end of the result.Must be URL encoded. If no to filter is provided the messages that were sent up until now will be included.
mediumId
string  (optional)
Filter by medium identifier. If no mediumId  filter is provided the messages sent from all connected mediums will be included.
Choices:fb twit instagram messagebird rtm whatsapp twilio wechat 
mailgun telegram viber
channelId
string (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
groupByInterval
string  (optional)
An interval to group results by. If no groupByInterval is provided the total count for messages matching given filters will be returned. No more than 60 intervals can be requested per request e.g. when selecting minute, the requested time range cannot be longer than 1 hour.
Choices: minute hour day
timezone
string  (optional)
The timezone name to be used in conjunction with groupByInterval, e.g. America/Los_Angeles. Must be URL encoded. If no timezone is provided the default ‘UTC’ timezone is used.
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
   or
   `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00&timezone=a'`
   or
   `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00&timezone=a'`
Headers
Content-Type: application/json
 
Body
{
  "errors": [
    "Bad request parameters. java.lang.IllegalArgumentException: The datetime zone id 'a' is not recognised"
  ],
  "errorType": null
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from='`

or

`$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from='`
Headers
Content-Type: application/json
 
Body
{
  "errors": [
    "Bad request parameters. java.lang.IllegalArgumentException: Invalid format: \"\""
  ],
  "errorType": null
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'groupByInterval=tree'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'groupByInterval=tree'`
Headers
Content-Type: application/json
 
Body
{
  "errors": [
    "Bad request parameters. java.lang.IllegalArgumentException: No enum constant com.sparkcentral.models.http.GroupByInterval.TREE"
  ],
  "errorType": null
}
Body
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'mediumId='`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'mediumId='`
Headers
Content-Type: application/json
 
Body
{
    “errors”: [
      “Bad request parameters. java.lang.IllegalArgumentException: Not a valid mediumId.”
    ],
    “errorType”: null
  }

Outbound Message Volume

A count of outbound messages based on applied filters.

Example URI

GET /reporting-metrics/outbound-message-volume

 

URI Parameters

from
string  (required)
An ISO-8601 date time marking the inclusive start of the result. Must be URL encoded. The from filter can be a maximum of 14 days in the past.
to
string  (optional)
An ISO-8601 date time marking the exclusive end of the result. If no to filter is provided the messages that were sent up until now will be included.
mediumId
string  (optional)
Filter by medium identifier. If no mediumId filter is provided the messages sent to all connected mediums will be included.
Choices:fb twit instagram messagebird rtm whatsapp twilio wechat 
mailgun telegram viber
channelId
string  (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
groupByInterval
string  (optional)
An interval to group results by. If no groupByInterval is provided the total count for messages matching given filters will be returned. No more than 60 intervals can be requested per request e.g. when selecting minute, the requested time range cannot be longer than 1 hour.
Choices:  minute hour day
timezone
string  (optional)
The timezone name to be used in conjunction with groupByInterval. Must be URL encoded. If no timezone is provided the default ‘UTC’ timezone is used.
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00&timezone=a'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00&timezone=a'`
Headers
Content-Type: application/json
 
Body
{
  "errors": [
    "Bad request parameters. java.lang.IllegalArgumentException: The datetime zone id 'a' is not recognised"
  ],
  "errorType": null
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer a1b2c3d4e5f6' --data 'from='`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer a1b2c3d4e5f6' --data 'from='`
Headers
Content-Type: application/json
 
Body
{
  "errors": [
    "Bad request parameters. java.lang.IllegalArgumentException: Invalid format: \"\""
  ],
  "errorType": null
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer a1b2c3d4e5f6' --data 'groupByInterval=tree'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer a1b2c3d4e5f6' --data 'groupByInterval=tree'`
Headers
Content-Type: application/json
 
Body
{
  "errors": [
    "Bad request parameters. java.lang.IllegalArgumentException: No enum constant com.sparkcentral.models.http.GroupByInterval.TREE"
  ],
  "errorType": null
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer a1b2c3d4e5f6' --data 'mediumId='`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/outbound-message-volume --header 'Authorization: Bearer a1b2c3d4e5f6' --data 'mediumId='`
Headers
Content-Type: application/json
 
Body
{
    “errors”: [
      “Bad request parameters. java.lang.IllegalArgumentException: Not a valid mediumId.”
    ],
    “errorType”: null
  }

Average First Response Time

The average time in seconds to the first response to an inbound message.

Example URI

GET /reporting-metrics/first-response-time
 
URI Parameters
from
string  (required)
An ISO-8601 date time marking the inclusive start of the result. Must be URL encoded. The from filter can be a maximum of 14 days in the past.
to
string  (optional)
An ISO-8601 date time marking the end of the result.Must be URL encoded. Only inbound messages and responses sent before to date time will be included in average first response time calculation. If no to filter is provided the messages that were sent up until now will be included.
mediumId
string  (optional)
Filter by medium identifier. If no mediumId  filter is provided the messages sent in any connected mediums will be included.
Choices:fb twit instagram messagebird rtm whatsapp twilio wechat 
mailgun telegram viber
channelId
string  (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'mediumId='`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'mediumId='`
Headers
Content-Type: application/json
 
Body
{
    “errors”: [
      “Bad request parameters. java.lang.IllegalArgumentException: Not a valid mediumId.”
    ],
    “errorType”: null
  }
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'from='`
   or
   `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'from='`
Headers
Content-Type: application/json
 
Body
{
  "errors": [
    "Bad request parameters. java.lang.IllegalArgumentException: Invalid format: \"\""
  ],
  "errorType": null
}

Resolved With Reply

The number of messages that have been resolved with at least one reply.

Example URI

GET /reporting-metrics/resolved-with-one-reply
 
URI Parameters
from
string  (optional)
An ISO-8601 date time marking the inclusive start of the result.Must be URL encoded. Only inbound messages and responses sent after from date time will be included in Resolved with Reply calculation. If no from filter is provided the messages sent since 5 days ago will be included.
to
string  (optional)
An ISO-8601 date time marking the exclusive end of the result.Must be URL encoded. Only inbound messages and responses sent before to date time will be included in Resolved with Reply calculation. If no to filter is provided the messages that were sent up until now will be included.
mediumId
string  (optional)
Filter by medium identifier. If no mediumId filter is provided the messages sent in any connected mediums will be included.
Choices:fb twit instagram messagebird rtm whatsapp twilio wechat 
mailgun telegram viber
channelId
string  (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
 
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/resolved-with-one-reply --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/resolved-with-one-reply --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/resolved-with-one-reply --header 'Authorization: Bearer <token>' --data 'mediumId='`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/resolved-with-one-reply --header 'Authorization: Bearer <token>' --data 'mediumId='`
Headers
Content-Type: application/json
 
Body
{
    “errors”: [
      “Bad request parameters. java.lang.IllegalArgumentException: Not a valid mediumId.”
    ],
    “errorType”: null
  }

Average Handle Time

The average time in seconds that a conversation is handled by an agent, specifically the difference between timestamps of conversation open and conversation pend/resolve. For Average Handle Time to be calculated, there must be an outbound between open and pend/resolve event.

Example URI

GET /reporting-metrics/handle-time
 
URI Parameters
from
string  (required)
An ISO-8601 date time marking the inclusive start of the result. Must be URL encoded. The from filter can be a maximum of 14 days in the past.
to

string  (optional)

An ISO-8601 date time marking the exclusive end of the result

mediumId
string (optional)
Filter by medium identifier. If no mediumId filter is provided the messages sent in any connected mediums will be included.
Choices:fb twit instagram messagebird rtm whatsapp twilio wechat 
mailgun telegram viber
channelId
string  (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/handle-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/handle-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/handle-time --header 'Authorization: Bearer <token>' --data 'mediumId='`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/handle-time --header 'Authorization: Bearer <token>' --data 'mediumId='`
Headers
Content-Type: application/json
 
Body
{
    “errors”: [
      “Bad request parameters. java.lang.IllegalArgumentException: Not a valid mediumId.”
    ],
    “errorType”: null
  }

Agent Availability

The number of agents available or away.

Example URI

GET /reporting-metrics/agent-availability
 
URI Parameters
userPresenceStatus
string  (optional)
Agent status to filter on. It is recommended to always provide userPresenceStatus, the result will always be 0 otherwise.
Choices: away available
channelId
string  (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/agent-availability --header 'Authorization: Bearer <token>' --data 'userPresenceStatus=away'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/agent-availability --header 'Authorization: Bearer <token>' --data 'userPresenceStatus=away'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}

Contacts Waiting in Queue

The number of contacts waiting in the queue for a response.

Example URI

GET /queue-metrics/contacts-waiting
 
URI Parameters
status

string  (required)

Queue status to filter on.
Choices: new pending

mediumId
string  (optional)
Filter by medium identifier. If no mediumId filter is provided the messages sent in any connected mediums will be included.
Choices:fb twit instagram messagebird rtm whatsapp twilio wechat 
mailgun telegram viber
channelId
string  (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
`$ curl -X GET -G https://public-api.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'status=new'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'status=new'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}
`$ curl -X GET -G https://public-api.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'mediumId='`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'mediumId='`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": null
  }
}
`$ curl -X GET -G https://public-api.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'mediumId=facebook'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'mediumId=facebook'`
Headers
Content-Type: application/json
 
Body
{
  "timestamp": 1505325885724,
  "status": 400,
  "error": "Bad Request",
  "exception": "org.springframework.web.bind.MissingServletRequestParameterException",
  "message": "Required String parameter 'status' is not present",
  "path": "/contacts-waiting"
}

Longest Wait Time in Queue

The current longest time in seconds that a contact is waiting for a response. If no mediumId filter is provided the messages sent in any connected mediums will be included.

Example URI

GET /queue-metrics/longest-wait-time
 
URI Parameters
status

string  (required)

Queue status to filter on
Choices: new pending

mediumId
string  (optional)
Filter by medium identifier
Choices:fb twit instagram messagebird rtm whatsapp twilio wechat 
mailgun telegram viber
channelId
string  (optional)
Filter by channel identifier (to obtain a list of your channel ids please contact a Sparkcentral representative). If no channelId filter is provided the messages sent from all connected channels will be included.
`$ curl -X GET -G https://public-api.sparkcentral.com/queue-metrics/longest-wait-time --header 'Authorization: Bearer <token>' --data 'status=new'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/queue-metrics/longest-wait-time --header 'Authorization: Bearer <token>' --data 'status=new'`
Headers
Content-Type: application/json
 
Body
{
  "dataPoint": {
    "value": 2127
  }
}

Examples

1. Show me hourly incoming message volume for all mediums 

Example URI

GET/reporting-metrics/inbound-message-volume

Body

`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00&groupByInterval=hour'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/inbound-message-volume --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T14%3A00%3A00&groupByInterval=hour'`

2. Show me current average response time for one channel over a rolling 30 minute interval 

If current time is : 2017-06-22T14:00:00+01:00; channelId is : ‘efe3ca3a-9872-4ef2-9895-c948cadced29’

Example URI

GET/reporting-metrics/first-response-time

Body

`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T13%3A30%3A00%2B01%3A00&channelId=efe3ca3a-9872-4ef2-9895-c948cadced29'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/first-response-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T13%3A30%3A00%2B01%3A00&channelId=efe3ca3a-9872-4ef2-9895-c948cadced29'`

3. Show me total number of contacts resolved with at least one reply for yesterday on Twitter 

Example URI

GET/reporting-metrics/resolved-with-one-reply

Body

`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/resolved-with-one-reply --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T00%3A00%3A00%2B01%3A00&to=2017-06-23T00%3A00%3A00%2B01%3A00&mediumId=twitter'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/resolved-with-one-reply --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T00%3A00%3A00%2B01%3A00&to=2017-06-23T00%3A00%3A00%2B01%3A00&mediumId=twitter'`

4. Show me average handle time for the last hour for one Twitter channel in PST timezone 

If current time is : 2017-06-22T14:00:00-07:00; channelId is : ‘efe3ca3a-9872-4ef2-9895-c948cadced29’

Example URI

GET/reporting-metrics/handle-time

Body

`$ curl -X GET -G https://public-api.sparkcentral.com/reporting-metrics/handle-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T13%3A00%3A00-07%3A00&mediumId=twitter&channelId=efe3ca3a-9872-4ef2-9895-c948cadced29'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/reporting-metrics/handle-time --header 'Authorization: Bearer <token>' --data 'from=2017-06-22T13%3A00%3A00-07%3A00&mediumId=twitter&channelId=efe3ca3a-9872-4ef2-9895-c948cadced29'`

5. Show me total number of contacts currently waiting in the new queue for all channels 

Example URI

GET/queue-metrics/contacts-waiting

Body

`$ curl -X GET -G https://public-api.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'status=new'`
 or
 `$ curl -X GET -G https://public-api-eu.sparkcentral.com/queue-metrics/contacts-waiting --header 'Authorization: Bearer <token>' --data 'status=new'`

Was this article helpful?

You already voted!

We're always happy to help you ❤️!

Did you know you could help us too?

We love feedback from our users. It’s incredibly important for our business. That’s why a positive recommendation from your company could really make a difference!