Skip to content

Interactions API

This API allows you to query and retrieve interaction data from uContact. Through its endpoints, you can get paginated summaries of interactions filtered by date range or client identifier, and retrieve the full detail of a specific interaction.

Get interactions

This endpoint returns a paginated summary list of interactions.

  • Method: GET
  • URL: https://<domain>.ucontactcloud.com/api/interactions

General description

Returns a paginated list of interaction summaries filtered by the provided parameters. Either a date range (initialdate and finaldate) or contactId must be provided. client, clientId, and clientName can be used as optional additional filters. If no permission filters are specified in the request body, the results are filtered based on the requesting user's permissions.

Query parameters

ParameterTypeDescriptionAvailable valuesExample
initialdateString (required*)Start of the date range to filter interactionsAny date in format yyyy-MM-dd HH:mm:ss, must be before or equal to finaldate2025-11-01 00:00:00
finaldateString (required*)End of the date range to filter interactionsAny date in format yyyy-MM-dd HH:mm:ss, must be before or equal to today and after or equal to initialdate2025-12-15 23:59:59
formatString (optional)Date format used to parse initialdate and finaldate when a custom format is sentAny valid date pattern. Default: yyyy-MM-dd HH:mm:ssyyyy-MM-dd
contactIdString (required*)Contact identifier used to filter interactions. Can be used instead of a date rangeAny stringtest
clientString (optional)Filters interactions where clientId or clientName starts with the provided valueAny stringtest
clientIdString (optional)Filters interactions where clientId starts with the provided valueAny string123
clientNameString (optional)Filters interactions where clientName starts with the provided value. In some interactions this field may be missing (for example, webchat)Any stringJohn
timezoneString (optional)Timezone used to interpret the date range. Defaults to UTC if not specifiedAny valid IANA timezoneAmerica/Montevideo
channelsString (optional)Filter by channel, separated by commasemail, telephony, sms, whatsapp, webchat, instagram, messengertelephony,sms,whatsapp,email
connectedInteractionString (optional)Filter interactions by whether they had an agent or notWITH_AGENT, WITHOUT_AGENTWITH_AGENT
subjectString (optional)Filter by subject of the interaction. Only works with email interactionsSupport request
interactionTypeString (optional)Filter by interaction directionINBOUND, OUTBOUND, OUTBOUND_HUBINBOUND
guidString (optional)Filter by the interaction's unique identifier (UUID)Any valid UUIDb9afae52-e3b4-4c96-a568-39e90e78a737
connectorIdString (optional)Filter by the connector identifier used in the interactionAny string or numeric value234324234
indexInteger (required)Page number for pagination>= 01
rowsInteger (required)Number of results per page> 025
ordersArray (optional)JSON array of sorting criteria objects with field and direction properties[{"field":"start_date","direction":"asc"}]

*Either initialdate and finaldate together, or contactId must be provided.

Request body

The optional request body can be used to further filter results by specific resources. If omitted, the API returns results filtered based on the requesting user's permissions. The users and automations filters are combined when both are present.

  • Content-Type: application/json
  • Body: A JSON object containing any of the following optional filters:
json
{
  "users": ["agent1", "agent2"],
  "campaigns": ["Campaign_1"],
  "dispositions": [1, 4, 6, 7],
  "outboundHubs": ["hub1"],
  "automations": ["automation1"]
}
PropertyTypeDescription
usersArray[String] (optional)List of agent usernames to filter by. Combined with automations when both are present
campaignsArray[String] (optional)List of campaign names to filter by
dispositionsArray[Integer] (optional)List of disposition ids. Filters interactions where at least one segment has one of these dispositions
outboundHubsArray[String] (optional)List of outbound hub names to filter by
automationsArray[String] (optional)List of automation names to filter by. Combined with users when both are present

Response

Returns a paginated result object.

Response body

FieldTypeDescription
resultArrayArray of interaction summary objects
indexIntegerCurrent page index
rowsIntegerNumber of rows per page
totalIntegerTotal number of interactions matching the query
serverDateStringServer date at the time of the response

Each object in result represents one interaction. It returns the general information of the interaction and includes a segments array where each segment specifies the agent and campaign involved in that segment.

FieldTypeDescription
guidStringUnique identifier of the interaction
channelStringCommunication channel used (e.g. telephony, email, whatsapp, sms)
segmentsArrayList of segments that make up the interaction
directionStringDirection of the interaction (inbound or outbound)
timingsObjectTiming information for the interaction
clientObjectInformation about the client involved
flagsObjectBoolean flags describing the state of the interaction
dispositionObject/nullDisposition set at the end of the interaction, null if not set
dialerObject/nullDialer information if the interaction was created by an outbound hub, null otherwise
connectorIdStringIdentifier of the connector used

segments objects:

FieldTypeDescription
campaignStringName of the campaign for this segment
agentStringUsername of the agent who handled this segment

timings object:

FieldTypeDescription
startDateStringDate and time the interaction started
endDateStringDate and time the interaction ended
durationIntegerTotal duration of the interaction in seconds

client object:

FieldTypeDescription
idStringClient identifier
nameStringClient name
contactIdStringCRM contact identifier linked to this client

flags object:

FieldTypeDescription
holidayBooleanWhether the interaction occurred on a holiday
outOfTimeBooleanWhether the interaction occurred outside business hours
finishedBooleanWhether the interaction has finished

disposition object (when not null):

FieldTypeDescription
idIntegerIdentifier of the disposition
commentStringComment left by the agent
levelsArray[String]The disposition levels selected

dialer object (when not null):

FieldTypeDescription
idIntegerIdentifier of the dialer
nameStringDialer name
listStringName of the dialer list used

Example response

json
{
  "result": [
    {
      "guid": "a3f1c2d4-7e89-4b56-9f01-2e3a4b5c6d7e",
      "channel": "telephony",
      "segments": [
        { "campaign": "inbound_support", "agent": "jsmith" },
        { "campaign": "inbound_support", "agent": "mjohnson" }
      ],
      "direction": "inbound",
      "timings": {
        "startDate": "2025-10-21 09:14:22",
        "endDate": "2025-10-21 09:23:15",
        "duration": 533
      },
      "client": { "id": "15551234567", "name": "Sarah Connor", "contactId": "crm_00483" },
      "flags": {
        "holiday": false,
        "outOfTime": false,
        "finished": true
      },
      "disposition": {
        "id": 12,
        "comment": "Customer requested a callback for next week.",
        "levels": ["Support", "Follow-up"]
      },
      "dialer": null,
      "connectorId": "support_trunk_01"
    }
  ],
  "index": 1,
  "rows": 5,
  "total": 348,
  "serverDate": "2025-10-21 09:30:00"
}

Status codes

CodeDescription
200Success
400Bad request – missing or invalid query parameters, or requesting a resource without permission
500Internal server error – e.g. malformed query

Get interaction detail

This endpoint returns the full detail of a specific interaction.

  • Method: GET
  • URL: https://<domain>.ucontactcloud.com/api/interactions/id/<guid>

General description

Returns all segments of a specific interaction identified by its GUID. Each segment represents a step in the interaction's lifecycle — including queuing, agent handling, and transfers — with detailed timing, client, event, disposition, and transfer information.

Path parameters

ParameterTypeDescription
guidStringThe unique identifier of the interaction

Response

Returns a result object containing an array of segment detail objects.

Response body

FieldTypeDescription
resultArrayArray of segment detail objects
indexIntegerAlways 0
rowsIntegerAlways 0
totalIntegerAlways 0
serverDateStringServer date at the time of the response

Each object in result represents a segment and contains:

FieldTypeDescription
segmentIdStringUnique identifier for the segment
campaignStringName of the campaign associated with this segment
channelStringCommunication channel (e.g. telephony, email, whatsapp, sms)
directionStringDirection of the interaction (inbound or outbound)
connectorIdStringIdentifier of the connector used
agentStringUsername of the agent who handled this segment
assignedAgentStringUsername of the agent the interaction was assigned to
originString/nullOrigin of the segment. Possible values: backToQueue, null, campaign, endBot, agent
subjectStringSubject of the interaction (Only applicable for email)
inIntegerNumber of inbound messages in this segment
outIntegerNumber of outbound messages in this segment
dataObjectExtra information about the interaction, such as channel-specific metadata and variables
eventsArrayList of events that occurred during the segment (e.g. Parked, Hold)
timingsObjectDetailed timing information for the segment
clientObjectInformation about the client involved
flagsObjectBoolean flags describing the state of the segment
dispositionObject/nullDisposition set at the end of the segment, null if not set
dialerObject/nullDialer information if the interaction was created by an outbound hub, null otherwise
transferObject/nullTransfer information if a transfer occurred, null otherwise
commentsArrayList of comments added to the segment

timings object:

FieldTypeDescription
startDateStringDate and time the segment started
endDateStringDate and time the segment ended
dateAttendedStringDate and time the interaction was first attended
dateAttendedAgentStringDate and time an agent first attended the interaction
dateFirstResponseStringDate and time of the first agent response
durationIntegerTotal duration of the segment in seconds
holdtimeIntegerTotal time the interaction was on hold in seconds
attentionTimeIntegerTime the agent spent actively attending the interaction in seconds
firstResponseTimeIntegerTime until the first response in seconds
artIntegerAverage response time in seconds

client object:

FieldTypeDescription
idStringClient identifier
nameStringClient display name
userNameStringClient username
contactIdStringCRM contact identifier linked to this client

flags object:

FieldTypeDescription
finishedBooleanWhether the segment has finished
abandonBooleanWhether the interaction was abandoned by the client
finishedByTimeoutBooleanWhether the interaction was finished due to a timeout
finishedByClientBooleanWhether the interaction was finished by the client
attendedByBotBooleanWhether the interaction was handled by a bot
holidayBooleanWhether the interaction occurred on a holiday
outOfTimeBooleanWhether the interaction occurred outside business hours

disposition object (when not null):

FieldTypeDescription
idStringIdentifier of the disposition
commentStringComment left by the agent
levelsArray[String]The disposition levels selected

transfer object (when not null):

FieldTypeDescription
typeStringType of transfer (attended or blind)
destinationTypeStringType of destination (campaign, agent, external, etc.)
destinationStringName of the destination campaign or agent
successfulBooleanWhether the transfer was completed successfully

dialer object (when not null):

FieldTypeDescription
idIntegerIdentifier of the dialer
nameStringDialer name

Each object in events:

FieldTypeDescription
eventStringType of event that occurred (e.g. hold)
startTimeStringDate and time the event started
endTimeStringDate and time the event ended

Example response

json
{
  "result": [
    {
      "segmentId": "10041",
      "campaign": "inbound_support",
      "channel": "telephony",
      "direction": "inbound",
      "connectorId": "234324234",
      "agent": "Agent1",
      "assignedAgent": "",
      "origin": "",
      "subject": "",
      "in": 0,
      "out": 0,
      "data": {},
      "events": [],
      "timings": {
        "startDate": "2025-10-21 09:14:22",
        "endDate": "2025-10-21 09:15:03",
        "dateAttended": "2025-10-21 09:14:22",
        "dateAttendedAgent": "",
        "dateFirstResponse": "",
        "duration": 41,
        "holdtime": 0,
        "attentionTime": 0,
        "firstResponseTime": 0,
        "art": 0
      },
      "client": {
        "id": "15551234567",
        "name": "Sarah Connor",
        "userName": "",
        "contactId": "crm_00483"
      },
      "flags": {
        "finished": false,
        "abandon": false,
        "finishedByTimeout": false,
        "finishedByClient": false,
        "attendedByBot": false,
        "holiday": false,
        "outOfTime": false
      },
      "disposition": null,
      "dialer": null,
      "transfer": null,
      "comments": []
    },
    {
      "segmentId": "10042",
      "campaign": "inbound_support",
      "channel": "telephony",
      "direction": "inbound",
      "connectorId": "234324234",
      "agent": "Agent1",
      "assignedAgent": "",
      "origin": "campaign",
      "subject": "",
      "in": 0,
      "out": 0,
      "data": {},
      "events": [
        { "event": "hold", "startTime": "2025-10-21 09:18:05", "endTime": "2025-10-21 09:19:12" }
      ],
      "timings": {
        "startDate": "2025-10-21 09:15:03",
        "endDate": "2025-10-21 09:23:15",
        "dateAttended": "2025-10-21 09:15:11",
        "dateAttendedAgent": "2025-10-21 09:15:11",
        "dateFirstResponse": "2025-10-21 09:15:14",
        "duration": 492,
        "holdtime": 67,
        "attentionTime": 425,
        "firstResponseTime": 3,
        "art": 28
      },
      "client": {
        "id": "15551234567",
        "name": "Sarah Connor",
        "userName": "",
        "contactId": "crm_00483"
      },
      "flags": {
        "finished": true,
        "abandon": false,
        "finishedByTimeout": false,
        "finishedByClient": false,
        "attendedByBot": false,
        "holiday": false,
        "outOfTime": false
      },
      "disposition": {
        "id": "12",
        "comment": "Customer requested a callback for next week.",
        "levels": ["Support", "Follow-up"]
      },
      "dialer": null,
      "transfer": {
        "type": "attended",
        "destinationType": "campaign",
        "destination": "billing_support",
        "successful": false
      },
      "comments": []
    }
  ],
  "index": 0,
  "rows": 0,
  "total": 0,
  "serverDate": "2026-03-10 16:38:00"
}

Status codes

CodeDescription
200Success
400Bad request – missing or invalid parameters, or requesting a resource without permission
404Interaction not found
500Internal server error – e.g. malformed query

uContact by net2phone