> ## Documentation Index
> Fetch the complete documentation index at: https://docs.operata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a contact summary

> Fetch the full v1 summary for one contact, including contact flow, softphone events, the stored Contact Trace Record, and Jabra headset data.

Returns the full v1 summary for one contact. It holds everything [List contact summaries](https://docs.operata.com/docs/api-contact-summary.md) returns, plus contact flow modules, softphone events, and client details. It also includes the stored Contact Trace Record (CTR), and Jabra headset data when the agent used one. For the v2 data model, use [Get a contact summary (v2)](https://docs.operata.com/docs/api-v2-call-summary.md).

## Endpoint

```http theme={null}
GET https://api.operata.io/v1/data/calls/{contactId}
```

## Parameters

### Path

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | string | yes | Amazon Connect contact ID. |

## Response

`200 OK` with one JSON object.

```json theme={null}
{
  "contactFlowSummary": [
    {
      "contactFlowModuleType": "SetLoggingBehavior",
      "timestamp": "2020-06-16T01:15:35.167Z"
    },
    {
      "contactFlowModuleType": "SetQueue",
      "timestamp": "2020-06-16T01:15:35.168Z"
    },
    {
      "contactFlowModuleType": "Transfer",
      "timestamp": "2020-06-16T01:15:35.169Z"
    }
  ],
  "softphoneSummary": {
    "contactId": "56f36f8c-463e-44fe-aff7-54ea7533cec1",
    "agentUserName": "agent_42",
    "agentCity": "Melbourne",
    "agentRegion": "Victoria",
    "agentCountry": "Australia",
    "agentISP": "Vocus Communications",
    "agentExternalIPAddress": "203.0.113.24",
    "agentLocalIPAddress": "192.168.1.12",
    "networkType": "wlan",
    "protocol": "udp",
    "port": 61466,
    "browser": {
      "name": "Chrome",
      "version": "83.0.4103.97"
    },
    "operataClientInfo": {
      "operataClientId": "2df17903-3b5f-41d2-b3f9-5a0dae2383bb",
      "group": "ACME Limited"
    },
    "iceServers": [
      {
        "country": "Australia",
        "city": "Sydney",
        "region": "New South Wales",
        "protocol": "udp",
        "port": "3478",
        "turnIpAddress": "turnnlb-93f2de0c97c4316b.elb.ap-southeast-2.amazonaws.com."
      }
    ],
    "operataCustomAttributes": [
      {
        "key": "Operata_App_ID",
        "value": ""
      },
      {
        "key": "Location",
        "value": "Default"
      },
      {
        "key": "Provider",
        "value": ""
      }
    ],
    "system": {
      "memory": {
        "total": 32,
        "min": 6.72,
        "avg": 6.84,
        "max": 6.9
      },
      "cpu": {
        "model": "Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz",
        "min": 84.05,
        "avg": 89.45,
        "max": 93.98
      }
    },
    "networkPerformanceMetrics": {
      "jitter": {
        "min": 1,
        "avg": 2,
        "max": 4
      },
      "rtt": {
        "min": 20,
        "avg": 32,
        "max": 36
      },
      "packetLoss": {
        "min": 0,
        "avg": 0,
        "max": 0
      },
      "outboundPacketLossPercentage": {
        "min": 0,
        "avg": 0,
        "max": 0
      },
      "mos": {
        "min": 4.413940029014851,
        "avg": 4.417465251733805,
        "max": 4.424555795263176
      },
      "totals": {
        "bytesReceived": 53418,
        "bytesSent": 65818,
        "packetsLost": 0,
        "packetsSent": 0,
        "packetsReceived": 747
      }
    }
  },
  "jabraSummary": {
    "agent": "agent_42",
    "analytics": {
      "crossTalkTotal": "9.40",
      "crossTalkTotalPct": 10.08,
      "rxSpeechTotal": "73.48",
      "rxSpeechTotalPct": 78.82,
      "silenceTotal": "10.35",
      "silenceTotalPct": 11.1,
      "totalSeconds": "93.23",
      "txSpeechTotal": "0.00",
      "txSpeechTotalPct": 0
    },
    "contactId": "56f36f8c-463e-44fe-aff7-54ea7533cec1",
    "deviceInfo": {
      "deviceConnection": "USB",
      "deviceName": "Jabra Engage 50",
      "errStatus": 0,
      "firmwareVersion": "1.24.0",
      "serialNumber": "000012345678"
    },
    "status": {
      "audioExposure": {
        "avg": 55,
        "max": 66,
        "min": 41
      },
      "backgroundNoise": {
        "avg": 40,
        "max": 51,
        "min": 23
      },
      "boomArm": {},
      "muteCount": 0,
      "volUpDownCount": 4
    },
    "timestamp": "2020-08-10T06:55:25.378Z"
  },
  "contactTraceSummary": {
    "AWSAccountId": "123456789012",
    "AWSContactTraceRecordFormatVersion": "2017-03-10",
    "Agent": {
      "ARN": "arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0/agent/3bb313d7-4dff-4ae4-95a3-773dc05c8413",
      "AfterContactWorkDuration": 1,
      "AfterContactWorkEndTimestamp": "2020-06-16T01:15:54Z",
      "AfterContactWorkStartTimestamp": "2020-06-16T01:15:53Z",
      "AgentInteractionDuration": 15,
      "ConnectedToAgentTimestamp": "2020-06-16T01:15:38Z",
      "CustomerHoldDuration": 0,
      "HierarchyGroups": null,
      "LongestHoldDuration": 0,
      "NumberOfHolds": 0,
      "RoutingProfile": {
        "ARN": "arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0/routing-profile/3efbb667-b4b1-40dd-a6ea-23e64f813e40",
        "Name": "OP_Performance_Mgmt"
      },
      "Username": "agent_42"
    },
    "AgentConnectionAttempts": 1,
    "Attributes": {},
    "Channel": "VOICE",
    "ConnectedToSystemTimestamp": "2020-06-16T01:15:34Z",
    "ContactId": "56f36f8c-463e-44fe-aff7-54ea7533cec1",
    "CustomerEndpoint": {
      "Address": "+61255501234",
      "Type": "TELEPHONE_NUMBER"
    },
    "DisconnectTimestamp": "2020-06-16T01:15:53Z",
    "InitialContactId": null,
    "InitiationMethod": "INBOUND",
    "InitiationTimestamp": "2020-06-16T01:15:34Z",
    "InstanceARN": "arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0",
    "LastUpdateTimestamp": "2020-06-16T01:17:02Z",
    "MediaStreams": [
      {
        "Type": "AUDIO"
      }
    ],
    "NextContactId": null,
    "PreviousContactId": null,
    "Queue": {
      "ARN": "arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0/queue/agent/3bb313d7-4dff-4ae4-95a3-773dc05c8413",
      "DequeueTimestamp": "2020-06-16T01:15:38Z",
      "Duration": 2,
      "EnqueueTimestamp": "2020-06-16T01:15:36Z",
      "Name": null
    },
    "Recording": null,
    "Recordings": null,
    "SystemEndpoint": {
      "Address": "+61255500100",
      "Type": "TELEPHONE_NUMBER"
    },
    "TransferCompletedTimestamp": null,
    "TransferredToEndpoint": null
  },
  "softphoneEvents": {
    "initiated": "2020-06-16T01:15:34Z",
    "incoming": "2020-06-16T01:15:37.175Z",
    "connecting": "2020-06-16T01:15:37.178Z",
    "accepted": "2020-06-16T01:15:37.804Z",
    "connected": "2020-06-16T01:15:38.123Z",
    "disconnected": "2020-06-16T01:15:53Z"
  },
  "operataBillingSummary": {
    "agentInteractionDurationRoundedMin": 1,
    "agentInteractionDurationActualSec": 15,
    "operataStatsDurationRoundedMin": 1,
    "operataStatsDurationSec": 17
  },
  "contactDurationSummary": {
    "contactDurationRoundedMin": 1,
    "contactDurationActualSec": 19
  }
}
```

The response has every field described in [List contact summaries](https://docs.operata.com/docs/api-contact-summary.md#response), plus these:

| Field | Type | Description |
| - | - | - |
| `contactFlowSummary` | object\[] | Contact flow modules the contact passed through: `contactFlowModuleType` and `timestamp`. Omitted when none were logged. |
| `softphoneSummary.browser` | object | Agent's browser `name` and `version`. Omitted when not recorded. |
| `softphoneSummary.operataClientInfo` | object | `operataClientId` and the Operata Group name in `group`. Omitted when not recorded. |
| `softphoneSummary.iceServers` | object\[] | Up to two TURN servers the softphone used: `country`, `city`, `region`, `protocol`, `port`, and `turnIpAddress`. Omitted when not recorded. |
| `softphoneSummary.operataCustomAttributes` | object\[] | Operata custom attributes as `key` and `value` pairs. Omitted when there are none. |
| `jabraSummary` | object | Jabra headset analytics, returned as stored. See [Headset logs](https://docs.operata.com/docs/headset-logs.md). Omitted when the contact has no Jabra data. |
| `contactTraceSummary` | object | The Amazon Connect CTR, returned as stored. See [Contact Trace Records](https://docs.operata.com/docs/contact-trace-records.md). Omitted when not recorded. |
| `softphoneEvents` | object | Softphone event timestamps: `initiated`, `incoming`, `connecting`, `accepted`, `connected`, `disconnected`, and the lists `missed`, `muted`, `unmuted`, `onHold`, `resumed`, plus `ended` with the ending `party`. Each is omitted when it didn't happen. |

## Example

```bash curl theme={null}
curl -u "$OPERATA_GROUP_ID:$OPERATA_API_TOKEN" \
  "https://api.operata.io/v1/data/calls/56f36f8c-463e-44fe-aff7-54ea7533cec1"
```

```javascript Node.js theme={null}
const groupId = process.env.OPERATA_GROUP_ID;
const apiToken = process.env.OPERATA_API_TOKEN;
const auth = Buffer.from(`${groupId}:${apiToken}`).toString("base64");

const contactId = "56f36f8c-463e-44fe-aff7-54ea7533cec1";
const response = await fetch(`https://api.operata.io/v1/data/calls/${contactId}`, {
  headers: { Authorization: `Basic ${auth}` },
});
const summary = await response.json();
```

```python Python theme={null}
import os, requests

contact_id = "56f36f8c-463e-44fe-aff7-54ea7533cec1"
response = requests.get(
    f"https://api.operata.io/v1/data/calls/{contact_id}",
    auth=(os.environ["OPERATA_GROUP_ID"], os.environ["OPERATA_API_TOKEN"]),
)
response.raise_for_status()
summary = response.json()
```

## Errors

Error bodies are plain text.

| Status | Body | When | Recover |
| - | - | - | - |
| 401 | An HTML `401 Authorization Required` page | Credentials are missing or wrong. | See [Authentication](https://docs.operata.com/docs/api-authentication.md). |
| 404 | `Call Summary record could not be found` | Your Operata Group has no summary for this contact ID. | Check the ID with [List contact summaries](https://docs.operata.com/docs/api-contact-summary.md). |
| 422 | `An error occurred while retrieving call stats log` | OpenSearch rejected or failed the lookup. | Retry later. Contact support if it persists. |

See [Errors](https://docs.operata.com/docs/api-errors.md) for errors every endpoint can return.

## Related

* [List contact summaries](https://docs.operata.com/docs/api-contact-summary.md): find contact IDs in a time window.
* [Get detailed contact stats](https://docs.operata.com/docs/api-contact-stats.md): per-second metrics for the same contact.
* [Get a contact summary (v2)](https://docs.operata.com/docs/api-v2-call-summary.md): the same contact in the v2 data model.
* [Contact Trace Records](https://docs.operata.com/docs/contact-trace-records.md): field reference for `contactTraceSummary`.


## OpenAPI

````yaml GET /v1/data/calls/{contactId}
openapi: 3.0.3
info:
  title: operata-api
  version: '1'
servers:
  - url: https://api.operata.io/
security:
  - sec0: []
paths:
  /v1/data/calls/{contactId}:
    get:
      summary: Get Contact Summary
      description: >-
        Returns the full v1 summary for one contact, including contact flow,
        softphone events, and the stored contact trace record.
      operationId: call-summary-v1
      parameters:
        - name: contactId
          in: path
          required: true
          description: Amazon Connect contact ID.
          schema:
            type: string
      responses:
        '200':
          description: The contact summary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  contactFlowSummary:
                    type: array
                    items:
                      type: object
                      properties:
                        contactFlowModuleType:
                          type: string
                        timestamp:
                          type: string
                  softphoneSummary:
                    type: object
                    properties:
                      contactId:
                        type: string
                      agentUserName:
                        type: string
                      agentCity:
                        type: string
                      agentRegion:
                        type: string
                      agentCountry:
                        type: string
                      agentISP:
                        type: string
                      agentExternalIPAddress:
                        type: string
                      agentLocalIPAddress:
                        type: string
                      networkType:
                        type: string
                      protocol:
                        type: string
                      port:
                        type: number
                      browser:
                        type: object
                        properties:
                          name:
                            type: string
                          version:
                            type: string
                      operataClientInfo:
                        type: object
                        properties:
                          operataClientId:
                            type: string
                          group:
                            type: string
                      iceServers:
                        type: array
                        items:
                          type: object
                          properties:
                            country:
                              type: string
                            city:
                              type: string
                            region:
                              type: string
                            protocol:
                              type: string
                            port:
                              type: string
                            turnIpAddress:
                              type: string
                      operataCustomAttributes:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            value:
                              type: string
                      system:
                        type: object
                        properties:
                          memory:
                            type: object
                            properties:
                              total:
                                type: number
                              min:
                                type: number
                              avg:
                                type: number
                              max:
                                type: number
                          cpu:
                            type: object
                            properties:
                              model:
                                type: string
                              min:
                                type: number
                              avg:
                                type: number
                              max:
                                type: number
                      networkPerformanceMetrics:
                        type: object
                        properties:
                          jitter:
                            type: object
                            properties:
                              min:
                                type: integer
                              avg:
                                type: integer
                              max:
                                type: integer
                          rtt:
                            type: object
                            properties:
                              min:
                                type: integer
                              avg:
                                type: integer
                              max:
                                type: integer
                          packetLoss:
                            type: object
                            properties:
                              min:
                                type: integer
                              avg:
                                type: integer
                              max:
                                type: integer
                          outboundPacketLossPercentage:
                            type: object
                            properties:
                              min:
                                type: integer
                              avg:
                                type: integer
                              max:
                                type: integer
                          mos:
                            type: object
                            properties:
                              min:
                                type: number
                              avg:
                                type: number
                              max:
                                type: number
                          totals:
                            type: object
                            properties:
                              bytesReceived:
                                type: integer
                              bytesSent:
                                type: integer
                              packetsLost:
                                type: integer
                              packetsSent:
                                type: integer
                              packetsReceived:
                                type: integer
                  jabraSummary:
                    type: object
                    additionalProperties: true
                    description: Stored document returned unchanged.
                  contactTraceSummary:
                    type: object
                    additionalProperties: true
                    description: Stored document returned unchanged.
                  softphoneEvents:
                    type: object
                    properties:
                      initiated:
                        type: string
                      incoming:
                        type: string
                      connecting:
                        type: string
                      accepted:
                        type: string
                      connected:
                        type: string
                      disconnected:
                        type: string
                      missed:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      muted:
                        type: array
                        items:
                          type: string
                      unmuted:
                        type: array
                        items:
                          type: string
                      onHold:
                        type: array
                        items:
                          type: string
                      resumed:
                        type: array
                        items:
                          type: string
                      ended:
                        type: object
                        properties:
                          party:
                            type: string
                          timestamp:
                            type: string
                  operataBillingSummary:
                    type: object
                    properties:
                      agentInteractionDurationRoundedMin:
                        type: number
                      agentInteractionDurationActualSec:
                        type: number
                      operataStatsDurationRoundedMin:
                        type: number
                      operataStatsDurationSec:
                        type: number
                  contactDurationSummary:
                    type: object
                    properties:
                      contactDurationRoundedMin:
                        type: number
                      contactDurationActualSec:
                        type: number
                  tags:
                    type: array
                    items:
                      type: string
              example:
                contactFlowSummary:
                  - contactFlowModuleType: SetLoggingBehavior
                    timestamp: '2020-06-16T01:15:35.167Z'
                  - contactFlowModuleType: SetQueue
                    timestamp: '2020-06-16T01:15:35.168Z'
                  - contactFlowModuleType: Transfer
                    timestamp: '2020-06-16T01:15:35.169Z'
                softphoneSummary:
                  contactId: 56f36f8c-463e-44fe-aff7-54ea7533cec1
                  agentUserName: agent_42
                  agentCity: Melbourne
                  agentRegion: Victoria
                  agentCountry: Australia
                  agentISP: Vocus Communications
                  agentExternalIPAddress: 203.0.113.24
                  agentLocalIPAddress: 192.168.1.12
                  networkType: wlan
                  protocol: udp
                  port: 61466
                  browser:
                    name: Chrome
                    version: 83.0.4103.97
                  operataClientInfo:
                    operataClientId: 2df17903-3b5f-41d2-b3f9-5a0dae2383bb
                    group: ACME Limited
                  iceServers:
                    - country: Australia
                      city: Sydney
                      region: New South Wales
                      protocol: udp
                      port: '3478'
                      turnIpAddress: >-
                        turnnlb-93f2de0c97c4316b.elb.ap-southeast-2.amazonaws.com.
                  operataCustomAttributes:
                    - key: Operata_App_ID
                      value: ''
                    - key: Location
                      value: Default
                    - key: Provider
                      value: ''
                  system:
                    memory:
                      total: 32
                      min: 6.72
                      avg: 6.84
                      max: 6.9
                    cpu:
                      model: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
                      min: 84.05
                      avg: 89.45
                      max: 93.98
                  networkPerformanceMetrics:
                    jitter:
                      min: 1
                      avg: 2
                      max: 4
                    rtt:
                      min: 20
                      avg: 32
                      max: 36
                    packetLoss:
                      min: 0
                      avg: 0
                      max: 0
                    outboundPacketLossPercentage:
                      min: 0
                      avg: 0
                      max: 0
                    mos:
                      min: 4.413940029014851
                      avg: 4.417465251733805
                      max: 4.424555795263176
                    totals:
                      bytesReceived: 53418
                      bytesSent: 65818
                      packetsLost: 0
                      packetsSent: 0
                      packetsReceived: 747
                jabraSummary:
                  agent: agent_42
                  analytics:
                    crossTalkTotal: '9.40'
                    crossTalkTotalPct: 10.08
                    rxSpeechTotal: '73.48'
                    rxSpeechTotalPct: 78.82
                    silenceTotal: '10.35'
                    silenceTotalPct: 11.1
                    totalSeconds: '93.23'
                    txSpeechTotal: '0.00'
                    txSpeechTotalPct: 0
                  contactId: 56f36f8c-463e-44fe-aff7-54ea7533cec1
                  deviceInfo:
                    deviceConnection: USB
                    deviceName: Jabra Engage 50
                    errStatus: 0
                    firmwareVersion: 1.24.0
                    serialNumber: '000012345678'
                  status:
                    audioExposure:
                      avg: 55
                      max: 66
                      min: 41
                    backgroundNoise:
                      avg: 40
                      max: 51
                      min: 23
                    boomArm: {}
                    muteCount: 0
                    volUpDownCount: 4
                  timestamp: '2020-08-10T06:55:25.378Z'
                contactTraceSummary:
                  AWSAccountId: '123456789012'
                  AWSContactTraceRecordFormatVersion: '2017-03-10'
                  Agent:
                    ARN: >-
                      arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0/agent/3bb313d7-4dff-4ae4-95a3-773dc05c8413
                    AfterContactWorkDuration: 1
                    AfterContactWorkEndTimestamp: '2020-06-16T01:15:54Z'
                    AfterContactWorkStartTimestamp: '2020-06-16T01:15:53Z'
                    AgentInteractionDuration: 15
                    ConnectedToAgentTimestamp: '2020-06-16T01:15:38Z'
                    CustomerHoldDuration: 0
                    HierarchyGroups: null
                    LongestHoldDuration: 0
                    NumberOfHolds: 0
                    RoutingProfile:
                      ARN: >-
                        arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0/routing-profile/3efbb667-b4b1-40dd-a6ea-23e64f813e40
                      Name: OP_Performance_Mgmt
                    Username: agent_42
                  AgentConnectionAttempts: 1
                  Attributes: {}
                  Channel: VOICE
                  ConnectedToSystemTimestamp: '2020-06-16T01:15:34Z'
                  ContactId: 56f36f8c-463e-44fe-aff7-54ea7533cec1
                  CustomerEndpoint:
                    Address: '+61255501234'
                    Type: TELEPHONE_NUMBER
                  DisconnectTimestamp: '2020-06-16T01:15:53Z'
                  InitialContactId: null
                  InitiationMethod: INBOUND
                  InitiationTimestamp: '2020-06-16T01:15:34Z'
                  InstanceARN: >-
                    arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0
                  LastUpdateTimestamp: '2020-06-16T01:17:02Z'
                  MediaStreams:
                    - Type: AUDIO
                  NextContactId: null
                  PreviousContactId: null
                  Queue:
                    ARN: >-
                      arn:aws:connect:ap-southeast-2:123456789012:instance/ce9ff856-215b-4927-8953-c69f7b9193b0/queue/agent/3bb313d7-4dff-4ae4-95a3-773dc05c8413
                    DequeueTimestamp: '2020-06-16T01:15:38Z'
                    Duration: 2
                    EnqueueTimestamp: '2020-06-16T01:15:36Z'
                    Name: null
                  Recording: null
                  Recordings: null
                  SystemEndpoint:
                    Address: '+61255500100'
                    Type: TELEPHONE_NUMBER
                  TransferCompletedTimestamp: null
                  TransferredToEndpoint: null
                softphoneEvents:
                  initiated: '2020-06-16T01:15:34Z'
                  incoming: '2020-06-16T01:15:37.175Z'
                  connecting: '2020-06-16T01:15:37.178Z'
                  accepted: '2020-06-16T01:15:37.804Z'
                  connected: '2020-06-16T01:15:38.123Z'
                  disconnected: '2020-06-16T01:15:53Z'
                operataBillingSummary:
                  agentInteractionDurationRoundedMin: 1
                  agentInteractionDurationActualSec: 15
                  operataStatsDurationRoundedMin: 1
                  operataStatsDurationSec: 17
                contactDurationSummary:
                  contactDurationRoundedMin: 1
                  contactDurationActualSec: 19
        '401':
          description: >-
            Missing or invalid credentials. The gateway returns an HTML `401
            Authorization Required` page.
          content:
            text/html:
              schema:
                type: string
        '404':
          description: >-
            No summary exists for this contact ID: `Call Summary record could
            not be found`.
          content:
            text/plain:
              schema:
                type: string
        '422':
          description: OpenSearch rejected or failed the lookup.
          content:
            text/plain:
              schema:
                type: string
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````

## Related topics

- [List contact summaries](https://docs.operata.com/docs/api-contact-summary.md)
- [Get detailed contact stats](https://docs.operata.com/docs/api-contact-stats.md)
- [Contacts and interactions](https://docs.operata.com/docs/concepts-contacts-and-interactions.md)
