Download PDF
Download page Interactions API.
Interactions API
Introduction
The Interactions API provides access to a unified customer interaction history. This API provides methods to create, update, or read customer interaction records. Businesses can now consolidate communication data from multiple systems into one central platform, giving agents and managers a comprehensive view of all consumer interactions. It streamlines customer journey tracking by allowing companies to capture and store interactions from various communication channels outside SmartReach.
External interactions are visible on the Agent desktop through the customer relationship management (CRM) Contact Interaction History.
The SmartReach Interaction API provides methods that allow you to create, read, and update call, email, SMS, chat, and messaging interactions.
For a general overview of the SmartReach APIs, including security aspects, see the SmartReach API Overview.
Prerequisites
- You must have an active subscription to the Public API to obtain an Access Token. For more information, see Access Tokens.
- Log into the SmartReach platform to obtain a valid session ID, which must be used in subsequent API requests. For more information, see Generating a Session ID.
- All messages in this API are subject to rate limits and other restrictions.
User Roles
To use the methods listed that perform operations on SmartReach Agent objects, the API users must belong to either the Sysadmin, Superuser, or Manager role. If users belong to the Manager role, they must have the Access to Administer Agents optional power configured. These roles are defined in the SmartReach configuration manager and correspond to users who can administer Agents through the SmartReach user interfaces.
API Methods
Create Call Interaction
Description: Adds an external voice interaction into the Interaction table.
The value of the start and end time of the interaction must be on the day the interaction is inserted.
User Roles: Sysadmin, Superuser, or Manager
Method: POST /interactions/interaction/call
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
serviceId | Number | Yes | Service Identifier (ID) |
externalInteractionId | String | No | The client's interaction unique ID. It must be 50 characters or fewer. |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
startTime | Date | Yes | Time at which the interaction started (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must contain a valid SmartReach value for that client. |
transferStartTime | Date | No | Date and time of the start of the interaction transfer (UNIX timestamp format). |
transferConnectTime | Date | No | Date and time the interaction transfer connected (Unix timestamp format). |
transferBridgeTime | Date | No | Date and time of the start of the interaction bridging connection (UNIX timestamp format). |
transferHoldDuration | Number | No | Total time for which the call was on hold (in seconds). |
transferDuration | Number | No | Total time to transfer the call (in seconds). |
transferBridgeDuration | Number | No | Total time to bridge the call transfer (in seconds). |
transferFinishTime | Date | No | Date and time of the end of the interaction transfer (UNIX timestamp format). |
transferCallResult | String | No | Result code or status of the transfer. |
externalAgentId | String | No | The external ID of the agent. |
direction | String | Yes | The direction of the interaction. Allowed values are: INBOUND and OUTBOUND. |
externalUrl | String | No | Reference URL from the interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer's phone number, regardless of voice direction. |
businessPoc | String | No | Business's phone number regardless of voice direction. This is the number that a customer dialed for an Inbound voice, the DNIS (Dialed Number Identification Service), or caller ID used when dialing a customer. |
Response Code: 201 Created
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| id | UUID | Yes | Universally Unique ID (UUID) of the interaction. |
Create a Call Interaction
#Request (JSON)
POST /interactions/interaction/call
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"serviceId": 284132,
"startTime": "1736233550000",
"direction": "OUTBOUND"
}
#Response
201 Created
Content-Type: application/json
{
"id": "f856d1c8-0001-b693-0d31-0194406ee4d4"
}
Create Chat Interaction
Description: Adds an external chat interaction into the Interaction table.
The value of the start and end time of the interaction must be on the day the interaction is inserted.
User Roles: Sysadmin, Superuser, or Manager
Method: POST /interactions/interaction/chat
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
serviceId | Number | Yes | Service Identifier (ID) |
externalInteractionId | String | No | The client's interaction unique ID. It must be 50 characters or less. |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
startTime | Date | Yes | Time at which the interaction started (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must contain a valid SmartReach value for that client. |
text | String | No | The body of the message. |
externalAgentId | String | No | The external ID of the agent. |
direction | String | Yes | The direction of the interaction. Allowed values are: INBOUND and OUTBOUND. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes. |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer point of contact for chat interactions regardless of direction. This can be the customer's phone number or email address. |
businessPoc | String | No | Business point of contact for chat interactions regardless of direction. This can be the department or skill to which chat interactions are connected. |
Response Code: 201 Created
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| id | UUID | Yes | Universally Unique ID of the interaction |
Create a Chat Interaction
#Request (JSON)
POST /interactions/interaction/chat
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"serviceId": 284132,
"startTime": "1736233550000",
"direction": "OUTBOUND"
}
#Response
201 Created
Content-Type: application/json
{
"id": "d1a23563-0001-bfe5-639f-0194406ee4d4"
}
Create Email Interaction
Description: Adds an external email interaction into the Interaction table.
The value of the start and end time of the interaction must be on the day the interaction is inserted.
User Roles: Sysadmin, Superuser, or Manager
Method: POST /interactions/interaction/email
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
serviceId | Number | Yes | Service Identifier (ID) |
externalInteractionId | String | No | The client's interaction unique ID. It must be 50 characters or fewer. |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
startTime | Date | Yes | Time at which the interaction started (UNIIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
text | String | No | The body of the message. |
| emailSubject | String | No | The subject line of an email. |
externalAgentId | String | No | The external ID of the agent. |
direction | String | Yes | The direction of the interaction. Allowed values are: INBOUND and OUTBOUND. |
externalUrl | String | No | Reference URL from the interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer email address regardless of direction. |
businessPoc | String | No | Business email address regardless of direction. |
Response Code: 201 Created
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| id | UUID | Yes | Universally Unique ID of the interaction. |
Create an Email Interaction
#Request (JSON)
POST /interactions/interaction/email
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"serviceId": 284132,
"direction": "OUTBOUND",
"customerPoc": "test@test.com",
"businessPoc": "test2@test2.com",
"startTime": "1736247796948"
}
#Response
201 Created
Content-Type: application/json
{
"id": "d552bf6b-0001-ba96-ad09-0194406ee4d4"
}
Create Messaging Interaction
Description: Adds an external message interaction into the Interaction table.
The value of the start and end time of the interaction must be on the day the interaction is inserted.
User Roles: Sysadmin, Superuser, or Manager
Method: POST /interactions/interaction/message
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
serviceId | Number | Yes | Service Identifier (ID) |
externalInteractionId | String | No | The client's interaction unique ID. It must be 50 characters or fewer. |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
startTime | Date | Yes | Time at which the interaction started (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
text | String | No | The body of the message. |
| interactionSubType | String | No | |
externalAgentId | String | No | The external ID of the agent. |
direction | String | Yes | The direction of the interaction. Allowed values are: INBOUND and OUTBOUND. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer point of contact used for messaging channels regardless of direction. This can be a customer's phone number, email address, or customer endpoint. |
messagingbusinessPoc | String | No | Business point of contact used for messaging channels regardless of direction. This will either be the phone number or ID associated with the business. |
Response Code: 201 Created
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| id | UUID | Yes | Universally Unique ID of the interaction. |
Create a Message Interaction
#Request (JSON)
POST /interactions/interaction/message
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"serviceId": 284132,
"direction": "OUTBOUND",
"startTime": "1736247799000"
}
#Response
201 Created
Content-Type: application/json
{
"id": "85c96ece-0001-b52c-0773-0194406ee4d4"
}
Create SMS Interaction
Description: Adds an external SMS interaction into the Interaction table.
User Roles: Sysadmin, Superuser, or Manager
Method: POST /interactions/interaction/sms
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
serviceId | Number | Yes | Service Identifier (ID) |
externalInteractionId | String | No | The client's interaction unique ID. It must be 50 characters or fewer. |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (Unix timestamp format). |
startTime | Date | Yes | Time at which the interaction started (UNIX timestamp format). This field value must be on the day the interaction is inserted. |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). This field must be on the day the interaction is inserted. |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
text | String | No | The body of the message. |
externalAgentId | String | No | The external ID of the agent. |
direction | String | Yes | The direction of the interaction. Allowed values are: INBOUND and OUTBOUND. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer phone number regardless of SMS direction |
| messagingbusinessPoc | String | No | Business short or long code that is used to communicate with the customer. |
Response Code: 201 Created
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| id | UUID | Yes | Universally Unique Identifier of the interaction |
Create an SMS Interaction
#Request (JSON)
POST /interactions/interaction/sms
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"serviceId": 284132,
"direction": "OUTBOUND",
"startTime": "1736247797000"
}
#Response
201 Created
Content-Type: application/json
{
"id": "e65563b6-0001-ba57-0419-0194406ee4d4"
}
Read Interaction
Description: Retrieves the information about a specific interaction.
User Roles: Sysadmin, Superuser, or Manager
Method: GET /interactions/interaction/{serviceId}/{interactionId}
Parameters:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| interactionId | UUID | Yes | Interaction ID. |
| serviceId | Number | Yes | Interaction serviceId. |
Body:
None
Response Code: 200 OK
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| interactionId | UUID | Yes | Interaction ID |
serviceId | Number | Yes | Service Identifier (ID) |
externalInteractionId | String | No | The client's interaction unique ID. It must be 50 characters or fewer. |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
startTime | Date | Yes | Time at which the interaction started (UNIX timestamp format). This field value must be on the day the interaction is inserted. |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). This field value must be on the day the interaction is inserted. |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
interactionType | String | No | Client's value for the interaction type. It will generally be CALL, EMAIL, SMS, or IM (Internal Message). |
text | String | No | The body of the message. |
| emailSubject | String | No | The subject line of EMAIL, SMS, or IM. |
transferStartTime | Date | No | Date and time of the start of the interaction transfer (UNIX timestamp format). |
transferConnectTime | Date | No | Date and time the interaction transfer connected (UNIX timestamp format). |
transferBridgeTime | Date | No | Date and time of the start of the interaction bridging connection (UNIX timestamp format). |
transferHoldDuration | Number | No | Total time for which the call was on hold (in seconds). |
transferDuration | Number | No | Total time to transfer the call (in seconds). |
transferBridgeDuration | Number | No | Total time to bridge the call transfer (in seconds). |
transferFinishTime | Date | No | Date and time of the end of the interaction transfer (Unix timestamp format). |
transferCallResult | String | No | Result code or status of the transfer. |
externalAgentId | String | No | The external ID of the agent. |
| interactionSubtype | String | No | |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer's phone number, regardless of voice direction. |
businessPoc | String | No | Business's phone number regardless of voice direction. This is the number that a customer dialed for an Inbound voice, the Dialed Number Identification Service (DNIS), or caller ID used when dialing a customer. |
| messagingbusinessPoc | String | No |
Read a Call Interaction
#Request (JSON)
GET /interactions/interaction/284132/d1a23553-0001-bfe5-639f-019440693b7d
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
200 OK
Content-Type: application/json
{
"serviceId": 284132,
"interactionId": "d1a23553-0001-bfe5-639f-019440693b7d",
"startTime": "1736247425917",
"duration": 0,
"transferHoldDuration": 0,
"transferDuration": 0,
"transferBridgeDuration": 0,
"interactionType": "EXTERNAL_OUTBOUND_CALL"
}
Update Call Interaction
Description: Updates any existing third-party voice interaction in the Interaction table.
Updates can only be done on the day the interaction is created.
User Roles: Sysadmin, Superuser, or Manager
Method: PUT /interactions/interaction/call
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| interactionId | UUID | Yes | Interaction ID |
serviceId | Number | Yes | Service Identifier (ID) |
customerId | String | No | Client ID |
| operatorPhone | String | No | The operator's internal phone number or ID. |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). This field value must be on the day the interaction is being inserted. |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
transferStartTime | Date | No | Date and time of the start of the interaction transfer (UNIX timestamp format). |
transferConnectTime | Date | No | Date and time the interaction transfer connected (UNIX timestamp format). |
transferBridgeTime | Date | No | Date and time of the start of the interaction bridging connection (UNIX timestamp format). |
transferHoldDuration | Number | No | Total time for which the call was on hold (in seconds). |
transferDuration | Number | No | Total time to transfer the call (in seconds). |
transferBridgeDuration | Number | No | Total time to bridge the call transfer (in seconds). |
transferFinishTime | Date | No | Date and time of the end of the interaction transfer (UNIX timestamp format). |
transferCallResult | String | No | Result code or status of the transfer. |
externalAgentId | String | No | The external ID of the agent. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer's phone number, regardless of voice direction. |
businessPoc | String | No | Business's phone number regardless of voice direction. This is the number that a customer dialed for an Inbound voice, the Dialed Number Identification Service (DNIS), or caller ID used when dialing a customer. |
Response Code: 200 OK
Body:
None
Create a Call Interaction
#Request (JSON)
PUT /interactions/interaction/call
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"interactionId": "f856d1c8-0001-b693-0d31-0194406ee4d4",
"serviceId": "284132",
"duration": "5"
}
#Response
200 OK
Update Chat Interaction
Description: Updates any existing third-party chat interaction in the Interaction table.
Updates can only be done on the day the interaction is created.
User Roles: Sysadmin, Superuser, or Manager
Method: PUT /interactions/interaction/chat
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| interactionId | UUID | Yes | Interaction ID |
serviceId | Number | Yes | Service Identifier (ID) |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). This field value must be on the day the interaction is inserted. |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
text | String | No | The body of the message. |
transferStartTime | Date | No | Date and time of the start of the interaction transfer (Unix timestamp format). |
transferConnectTime | Date | No | Date and time the interaction transfer connected (UNIX timestamp format). |
transferBridgeTime | Date | No | Date and time of the start of the interaction bridging connection (UNIX timestamp format). |
transferHoldDuration | Number | No | Total time for which the call was on hold (in seconds). |
transferDuration | Number | No | Total time to transfer the call (in seconds). |
externalAgentId | String | No | The external ID of the agent. |
direction | String | Yes | The direction of the interaction. Allowed values are: INBOUND and OUTBOUND. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer point of contact for chat interactions regardless of direction. This can be customer's phone number or email address. |
businessPoc | String | No | Business point of contact for chat interactions regardless of direction. This can be the department or skill to which chat interactions are connected. |
Response Code: 200 OK
Body:
None
Create a Call Interaction
#Request (JSON)
PUT /interactions/interaction/chat
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"interactionId": "d1a23563-0001-bfe5-639f-0194406ee4d4",
"serviceId": 284132,
"text": "Text chat message"
}
#Response
200 OK
Update Email Interaction
Description: Updates any existing third-party email interaction in the Interaction table.
Updates can only be done on the day the interaction is created.
User Roles: Sysadmin, Superuser, or Manager
Method: PUT /interactions/interaction/email
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| interactionId | UUID | Yes | Interaction ID |
serviceId | Number | Yes | Service Identifier (ID) |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). This field value must be on the day the interaction is inserted. |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
text | String | No | The body of the message. |
| emailSubject | String | No | The subject line of an email. |
externalAgentId | String | No | The external ID of the agent. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer email address regardless of direction. |
businessPoc | String | No | Business email address regardless of direction. |
Response Code: 200 OK
Body:
None
Create a Call Interaction
#Request (JSON)
PUT /interactions/interaction/email
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"interactionId": "d552bf6b-0001-ba96-ad09-0194406ee4d4",
"serviceId": "284132",
"text": "This is a test email update"
}
#Response
200 OK
Update Messaging Interaction
Description: Updates any existing third-party message interaction in the Interaction table.
Updates can only be done on the day the interaction is created.
User Roles: Sysadmin, Superuser, or Manager
Method: PUT /interactions/interaction/message
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| interactionId | UUID | Yes | Interaction ID |
serviceId | Number | Yes | Service Identifier (ID) |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). This field value must be on the day the interaction is inserted. |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
text | String | No | The body of the message. |
externalAgentId | String | No | The external ID of the agent. |
direction | String | Yes | The direction of the interaction. Allowed values are: INBOUND and OUTBOUND. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer point of contact used for messaging channels regardless of direction. This can be a customer's phone number, email address, or customer endpoint. |
| messagingbusinessPoc | String | No | Business point of contact used for messaging channels regardless of direction. This is either the phone number or ID associated with the business. |
Response Code: 200 OK
Body:
None
Create a Call Interaction
#Request (JSON)
PUT /interactions/interaction/message
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"interactionId": "85c96ece-0001-b52c-0773-0194406ee4d4",
"serviceId": "284132",
"text": "Internal text message"
}
#Response
200 OK
Update SMS Interaction
Description: Updates any existing third-party SMS interaction in the Interaction table.
Updates can only be done on the day the interaction is created.
User Roles: Sysadmin, Superuser, or Manager
Method: PUT /interactions/interaction/sms
Parameters:
None
Body:
| Key or Attribute | Type | Mandatory? | Description |
|---|---|---|---|
| interactionId | UUID | Yes | Interaction ID |
serviceId | Number | Yes | Service Identifier (ID) |
customerId | String | No | Client ID |
connectTime | Date | No | Time at which the interaction connected (UNIX timestamp format). |
finishTime | Date | No | Time at which the interaction ended (UNIX timestamp format). This field value must be on the day the interaction is inserted. |
duration | Number | No | Total time of the interaction (in seconds). |
result | String | No | The result of the interaction. For the event to be included in the reporting data, this field must be a valid SmartReach value for that client. |
text | String | No | The body of the message. |
| emailSubject | String | No | The subject line of an SMS. |
externalAgentId | String | No | The external ID of the agent. |
externalUrl | String | No | Reference URL from interaction. |
notes | String | No | Interaction notes |
customCol1 | String | No | Custom interaction field. |
customCol2 | String | No | Custom interaction field. |
customCol3 | String | No | Custom interaction field. |
customCol4 | String | No | Custom interaction field. |
customCol5 | String | No | Custom interaction field. |
externalThreadId | String | No | External ID that is used to group interactions across channels. |
customerPoc | String | No | Customer phone number regardless of SMS direction |
| messagingbusinessPoc | String | No | Business short or long code that is used to communicate with customer |
Response Code: 200 OK
Body:
None
Create a Call Interaction
#Request (JSON)
PUT /interactions/interaction/sms
Host: localhost.com
Content-Type: application/json
Accept: application/json
{
"interactionId": "e65563b6-0001-ba57-0419-0194406ee4d4",
"serviceId": "284132",
"emailSubject": "Test SMS"
}
#Response
200 OK
Errors
For more information, see the Errors section on the REST APIs page.