v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-054102371.0 MB
Service Agent

List interactions

List CRM interactions for the service agent's customer. At most one filter may be provided: peer_type + peer_target (remote endpoint), contact_id, or address_id. If no filter is provided, the full customer interaction history is returned, scoped to the "since" lookback window (default "30d", maximum "180d").

The response is the raw, unmodified peer_events shape (design doc 2026-07-25-contact-interaction-retire-to-peer-events, §8.1/§9): rows may include internal-resource peer types (agent, ai, conference, sip legs) with no CRM eligibility filtering or field reshaping applied.

get/service_agents/contact_interactions

Query parameters

peer_typestring
Example:tel

Remote endpoint type (e.g. "tel", "email"). Required with peer_target.

peer_targetstring
Example:+155****4567

Remote endpoint target (e.g. "+155****4567"). Required with peer_type.

contact_idstring uuid
Example:550e8400-e29b-41d4-a716-446655440000

Filter by resolved contact ID.

address_idstring uuid
Example:7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d

Filter by contact address ID.

sincestring
Example:30d

Lookback window in days (e.g. "7d", "30d"), used only when no filter (peer_type+peer_target, contact_id, address_id) is provided. Default "30d", max "180d". Ignored when a filter is provided.

page_sizeinteger
Example:25

Number of results to return per page.

page_tokenstring

Cursor token for pagination. Use the next_page_token value from the previous response.

Response

Successful response.

next_page_tokenstring

Pagination token for the next page. Empty when no further pages exist.

Example response

{
  "result": [
    {
      "timestamp": "2026-01-15T10:30:00.123000Z",
      "customer_id": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d",
      "publisher": "call",
      "event_type": "call_hangup",
      "reference_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "direction": "incoming",
      "peer": {
        "type": "tel",
        "target": "+14155551234",
        "target_name": "John Smith",
        "name": "Main Office",
        "detail": "Primary contact number"
      },
      "local": {
        "type": "tel",
        "target": "+14155551234",
        "target_name": "John Smith",
        "name": "Main Office",
        "detail": "Primary contact number"
      },
      "data": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      }
    }
  ],
  "next_page_token": "2026-01-15T10:30:00.123000Z"
}