Get contact engagement metrics
Returns aggregated engagement metrics for a contact, including message counts and active conversation totals.
GET
Returns aggregated engagement metrics for a contact, including message counts and active conversation totals.
apiKeyheader
x-api-key<token>id*stringMatch
^contact_[0-9a-hjkmnp-tv-z]{16,24}$Success
application/json- response
totalMessages*integerRange
0 <= value <= 9007199254740991messagesSent*integerRange
0 <= value <= 9007199254740991messagesReceived*integerRange
0 <= value <= 9007199254740991activeConversations*integerRange
0 <= value <= 9007199254740991lastActivityAt*string|nullchannelsUsed*import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.contacts.getEngagement({ "id": "example"});Example Response
{ "totalMessages": 0, "messagesSent": 0, "messagesReceived": 0, "activeConversations": 0, "lastActivityAt": "string", "channelsUsed": { "property1": 0, "property2": 0 }}Related documentation
Get contact activity timeline
Returns a contact's message activity, newest first, optionally filtered by channel.
List a contact's group memberships
Returns the contact groups a contact belongs to, most recently joined first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.