Analytics

List top contacts by message volume

Returns the contacts your organization exchanged the most messages with over the selected date range.

GET
/v1/analytics/top-contacts

Returns the contacts your organization exchanged the most messages with over the selected date range. sortBy chooses the traffic messageCount reports and ranks by: sent counts outbound messages addressed to the contact, received counts inbound messages the contact sent you, and total (the default) counts both. Contacts with no traffic in the range are omitted, and at most 100 are returned.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

after?string
before?string
limit?|null
sortBy?string
Value in"sent""received""total"

Response Body

Success

application/json
  1. response
[index: integer]?
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.analytics.getTopContacts({});
Example Response
[  {    "id": "string",    "name": "string",    "email": "string",    "phone": "string",    "messageCount": 0  }]

Related documentation