Sinch Contact Center Restful Contact Management Interface (CMI) API documentation version v1
http://localhost:8080/RI/cmi
Description
This interface provides data of contacts and their content.
Request Header Data Requirements
To GET JSON response, the request must have "Accept = application/json" header.
To GET XML response, the request should have "Accept = application/xml" header.
To POST/PUT JSON data, the request must have "Content-Type = application/json" header.
To POST/PUT XML data, the request should have "Content-Type = application/xml" header.
POST should also have "Accept = text/html" header. It returns the ID of the created object. POST also returns Location header which contains the ID. POST returns code 201 (Created).
PUT and DELETE do not have any response, instead they return code 204 (No Content).
/emails
Collection of emails.
Get a list of emails.
get /emails
Get a list of emails.
Query Parameters
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
- case_id: (string)
Search emails filtered by "case id"
Example:
case_id=21180
- cid: (string)
Search emails filtered by "cid"
Example:
cid=CID44DB84A95D1A
- limit: (integer - default: <
>) Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: emails
- id: required(string - minLength: 32 - maxLength: 32)
- from_queue: required(object)
- id: required(string - minLength: 32 - maxLength: 32)
- name: required(string)
- channel_type: required(string)
- channel_sub_type: required(string)
- type: required(one of EmailIn, EmailOut)
- typeDetails: required(string)
Operative database has the following email types: ACTION, EMAIL, EMAILOUT, TASK, OII_EMAIL, XRI
- status: required(string)
- statusDetails: required(string)
Operative database has the following statuses: Deleted, Handled, Closed, Pending, Sent, Open, Forwarded
- case_id: (string)
- cid: (string)
- title: required(string)
Email subject.
- content: required(string)
Email body.
- remarks: (string)
Email remarks.
- attachments: (array of AttachmentInfo)
Items: AttachmentInfo
- id: required(string - minLength: 32 - maxLength: 32)
- filename: required(string)
- mime_type: required(string)
- size: required(number)
- originator: required(one of customer, agent)
- originator: required(string)
Source email address.
- destination: required(string)
Email address.
- from_address: required(object)
- name: required(string)
- address: required(string)
- to_address: required(array of EmailAddress)
Items: EmailAddress
- name: required(string)
- address: required(string)
- cc_address: (array of EmailAddress)
Items: EmailAddress
- name: required(string)
- address: required(string)
- bcc_address: (array of EmailAddress)
Items: EmailAddress
- name: required(string)
- address: required(string)
- agentId: (string - minLength: 32 - maxLength: 32)
The agent who is handling or who has handled this contact. Null value not returned - there is no agent.
- agentName: (string)
- date_created: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
Example:
[
{
"attachments": [
{
"size": 440721,
"filename": "Help.pdf",
"id": "064C7F3C69A64566A0D661ADB0DC0153",
"mime_type": "application/pdf"
},
{
"size": 440,
"filename": "Notes.txt",
"id": "68F94FB8567748869A7D873DAEF46B1B",
"mime_type": "text/plain"
},
{
"size": 88252,
"filename": "Picture_small.jpg",
"id": "5236C1E666554638A837CC3408A45614",
"mime_type": "image/jpeg"
}
],
"case_id": "68108",
"cc_address": [
{
"address": "Jack@bcmtr.bcm.corp",
"name": "Jonhnson, Jack"
}
],
"channel_sub_type": "inbound",
"channel_type": "email",
"cid": "CID0DCB56DFCC80",
"content": "<p>Hey,</p> <p>I would like to order excellent Sinch RI application for our system. </p> <p>Note: No matter how much it will cost!</p> <p>Br : Happy Customer / Mr. Boss</p> ",
"date_created": "2017-02-23T11:49:09.340Z",
"destination": "sales@bcmtr.bcm.corp",
"from_address": {
"address": "Mr.Boss@Big.Company.corp"
},
"from_queue": {
"id": "97C9F85A2F55484198FD908C6A97FA7D",
"name": "Direct Sales"
},
"id": "50753BBE49774211AC8286DBCBE17741",
"originator": "Mr.Boss@Big.Company.corp",
"status": "handled",
"title": "Sinch CCtr RI order",
"to_address": [
{
"address": "Mr.Boss@Big.Company.corp"
}
]
},
{
"attachments": [
{
"size": 440721,
"filename": "Offer.pdf",
"id": "AA4C7F3C69A64566A0D661ADB0DC0153",
"mime_type": "application/pdf"
},
{
"size": 99440,
"filename": "OfferDetails.xls",
"id": "AAF94FB8567748869A7D873DAEF46B1B",
"mime_type": "application/excel"
},
{
"size": 88252,
"filename": "Info.doc",
"id": "AA36C1E666554638A837CC3408A45614",
"mime_type": "application/msword"
}
],
"case_id": "10512",
"cc_address": [
{
"address": "Jack@bcmtr.bcm.corp",
"name": "Jonhnson, Jack"
}
],
"bcc_address": [
{
"address": "Mark.Smith@bcmtr.bcm.corp",
"name": "Smith, Mark"
}
],
"channel_sub_type": "outbound",
"channel_type": "email",
"cid": "CID3467C7DE37AC",
"content": "<p> </p> <p> </p> <p>Confirmation by outgoing email!</p> <p> </p> <p> </p> <p><br> </p> <p><b>----- Description -----</b></p> <p><b>From:</b> Joe.Abraham@bcmtr.bcm.corp</p> <p><b>Created On:</b> 27.05.2016 14:24:27</p> <p><b>To:</b> reg_hunt@bcmtr.bcm.corp</p> <p><b>Cc:</b> Jack@bcmtr.bcm.corp</p> <p><b>Subject:</b> RE: attachments 1</p> <p><b>ID:</b> 10512</p><br><br><br> <p><b>----- Description -----</b></p> <p><b>From:</b> Joe.Abraham@bcmtr.bcm.corp</p> <p><b>Created On:</b> 27.05.2016 14:24:27</p> <p><b>To:</b> reg_hunt@bcmtr.bcm.corp</p> <p><b>Cc:</b> Jack@bcmtr.bcm.corp</p> <p><b>Subject:</b> attachments 1</p> <p><b>ID:</b> 10512</p><br><br> <meta content=\"MSHTML 11.00.9600.18315\" name=\"GENERATOR\"> <style>P { MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px } P {margin:0;} BODY {font-family:arial;}</style> <div style=\"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; COLOR: #000000; DIRECTION: ltr\">1111</div>",
"date_created": "2016-05-27T11:37:42.060Z",
"destination": "Joe.Abraham@bcmtr.bcm.corp",
"from_address": {
"address": "reg_hunt@bcmtr.bcm.corp",
"name": "REG_Email_Hunt"
},
"from_queue": {
"id": "EE9FB1FEA36A4919A7275DC67DCEF13E",
"name": "REG_Email_Hunt"
},
"id": "B9D3E2C14DAE42AC9EB467A4F6515EE5",
"originator": "reg_hunt@bcmtr.bcm.corp",
"status": "handled",
"title": "Attachments for Offer",
"to_address": [
{
"address": "Joe.Abraham@bcmtr.bcm.corp"
}
]
}
]
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
Entity representing a email.
Get the email with emailId = {emailId}.
get /emails/{emailId}
Get the email with emailId = {emailId}.
URI Parameters
- emailId: required(string)
Query Parameters
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
- from_queue: required(object)
- id: required(string - minLength: 32 - maxLength: 32)
- name: required(string)
- channel_type: required(string)
- channel_sub_type: required(string)
- type: required(one of EmailIn, EmailOut)
- typeDetails: required(string)
Operative database has the following email types: ACTION, EMAIL, EMAILOUT, TASK, OII_EMAIL, XRI
- status: required(string)
- statusDetails: required(string)
Operative database has the following statuses: Deleted, Handled, Closed, Pending, Sent, Open, Forwarded
- case_id: (string)
- cid: (string)
- title: required(string)
Email subject.
- content: required(string)
Email body.
- remarks: (string)
Email remarks.
- attachments: (array of AttachmentInfo)
Items: AttachmentInfo
- id: required(string - minLength: 32 - maxLength: 32)
- filename: required(string)
- mime_type: required(string)
- size: required(number)
- originator: required(one of customer, agent)
- originator: required(string)
Source email address.
- destination: required(string)
Email address.
- from_address: required(object)
- name: required(string)
- address: required(string)
- to_address: required(array of EmailAddress)
Items: EmailAddress
- name: required(string)
- address: required(string)
- cc_address: (array of EmailAddress)
Items: EmailAddress
- name: required(string)
- address: required(string)
- bcc_address: (array of EmailAddress)
Items: EmailAddress
- name: required(string)
- address: required(string)
- agentId: (string - minLength: 32 - maxLength: 32)
The agent who is handling or who has handled this contact. Null value not returned - there is no agent.
- agentName: (string)
- date_created: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
Example:
{
"attachments": [
{
"size": 440721,
"filename": "Offer.pdf",
"id": "AA4C7F3C69A64566A0D661ADB0DC0153",
"mime_type": "application/pdf"
},
{
"size": 99440,
"filename": "OfferDetails.xls",
"id": "AAF94FB8567748869A7D873DAEF46B1B",
"mime_type": "application/excel"
},
{
"size": 88252,
"filename": "Info.doc",
"id": "AA36C1E666554638A837CC3408A45614",
"mime_type": "application/msword"
}
],
"case_id": "10512",
"cc_address": [
{
"address": "Jack@bcmtr.bcm.corp",
"name": "Jonhnson, Jack"
}
],
"bcc_address": [
{
"address": "Mark.Smith@bcmtr.bcm.corp",
"name": "Smith, Mark"
}
],
"channel_sub_type": "outbound",
"channel_type": "email",
"cid": "CID3467C7DE37AC",
"content": "<p> </p> <p> </p> <p>Confirmation by outgoing email!</p> <p> </p> <p> </p> <p><br> </p> <p><b>----- Description -----</b></p> <p><b>From:</b> Joe.Abraham@bcmtr.bcm.corp</p> <p><b>Created On:</b> 27.05.2016 14:24:27</p> <p><b>To:</b> reg_hunt@bcmtr.bcm.corp</p> <p><b>Cc:</b> Jack@bcmtr.bcm.corp</p> <p><b>Subject:</b> RE: attachments 1</p> <p><b>ID:</b> 10512</p><br><br><br> <p><b>----- Description -----</b></p> <p><b>From:</b> Joe.Abraham@bcmtr.bcm.corp</p> <p><b>Created On:</b> 27.05.2016 14:24:27</p> <p><b>To:</b> reg_hunt@bcmtr.bcm.corp</p> <p><b>Cc:</b> Jack@bcmtr.bcm.corp</p> <p><b>Subject:</b> attachments 1</p> <p><b>ID:</b> 10512</p><br><br> <meta content=\"MSHTML 11.00.9600.18315\" name=\"GENERATOR\"> <style>P { MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px } P {margin:0;} BODY {font-family:arial;}</style> <div style=\"FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; COLOR: #000000; DIRECTION: ltr\">1111</div>",
"date_created": "2016-05-27T11:37:42.060Z",
"destination": "Joe.Abraham@bcmtr.bcm.corp",
"from_address": {
"address": "reg_hunt@bcmtr.bcm.corp",
"name": "REG_Email_Hunt"
},
"from_queue": {
"id": "EE9FB1FEA36A4919A7275DC67DCEF13E",
"name": "REG_Email_Hunt"
},
"id": "B9D3E2C14DAE42AC9EB467A4F6515EE5",
"originator": "reg_hunt@bcmtr.bcm.corp",
"status": "handled",
"title": "Attachments for Offer",
"to_address": [
{
"address": "Joe.Abraham@bcmtr.bcm.corp"
}
]
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
Example:
HTTP 404 Not Found
/scriptResults
Collection of scriptResults.
Get a list of scriptResults.
get /scriptResults
Get a list of scriptResults.
Query Parameters
- contact_id: (string)
Search filtered by "contact id"
Example:
contact_id=599BD2A32FF7364FB2D1B53A31615C7F
- originalcontact_id: (string)
Search filtered by "original contact id"
Example:
originalcontact_id=EB5827A767884A4B91BC4BF66F224903
- limit: (integer - default: <
>) Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: scriptResults
- id: required(string - minLength: 32 - maxLength: 32)
- script_id: required(string - minLength: 32 - maxLength: 32)
- name: required(string)
- contact_id: required(string - minLength: 32 - maxLength: 32)
- originalcontact_id: required(string - minLength: 32 - maxLength: 32)
- modificationtime: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- scriptquestions: required(array of ScriptResultQuestion)
Items: ScriptResultQuestion
- id: required(string - minLength: 32 - maxLength: 32)
- data: required(string)
- controltype: required(string)
- datatype: required(string)
- ordinal: required(number)
- scriptanswers: required(array of ScriptResultAnswer)
Items: ScriptResultAnswer
- id: required(string - minLength: 32 - maxLength: 32)
- answerdata: required(string)
- ordinal: required(number)
Example:
[
{
"originalcontact_id": "599BD2A32FF7364FB2D1B53A31615C7F",
"contact_id": "599BD2A32FF7364FB2D1B53A31615C7F",
"id": "2B7FB50EF97F416A82AAF48463BA2B5A",
"modificationtime": "2017-03-01T10:00:42.470Z",
"name": "Simple car selector",
"scriptquestions": [
{
"scriptanswers": [
{
"answerdata": "Kia",
"id": "730FBF56981A4657B9285D3B52E7D239",
"ordinal": 0
},
{
"answerdata": "Volvo",
"id": "E34CA4525ABF42CEB7B4A5CCE1AE03E4",
"ordinal": 1
}
],
"controltype": "multicombobox",
"data": "Current Car",
"datatype": "text",
"id": "E6AF572FE79B4550B5CBF621EFB590B7",
"ordinal": 0
},
{
"scriptanswers": [
{
"answerdata": "Hyndai",
"id": "9FCD51FC65334C25851469348E41ADF4",
"ordinal": 2
}
],
"controltype": "multicombobox",
"data": "Next Car",
"datatype": "text",
"id": "B50D16A1D4834047AEFE52325B95377F",
"ordinal": 2
}
],
"script_id": "DCA8D3301BC74B9C8AFCB28026E7761B"
},
{
"originalcontact_id": "AAC3ABD95D26E61180D5005056AD40A2",
"contact_id": "4B713E555D26E61180D5005056AD40A2",
"id": "4F62A6B5A0DD470B84AF3157DB1E23B5",
"modificationtime": "2017-03-01T10:01:21.370Z",
"name": "Simple car selector",
"scriptquestions": [
{
"scriptanswers": [
{
"answerdata": "BMW",
"id": "1881415282E7E61180E3005056AD40A2",
"ordinal": 0
}
],
"controltype": "multicombobox",
"data": "Current Car",
"datatype": "text",
"id": "E6AF572FE79B4550B5CBF621EFB590B7",
"ordinal": 0
},
{
"scriptanswers": [
{
"answerdata": "Mercedes-Benz",
"id": "7186929781E7E61180E3005056AD40A2",
"ordinal": 1
}
],
"controltype": "multicombobox",
"data": "Next Car",
"datatype": "text",
"id": "B50D16A1D4834047AEFE52325B95377F",
"ordinal": 1
}
],
"script_id": "DCA8D3301BC74B9C8AFCB28026E7761B"
}
]
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
Entity representing a scriptResult.
Get the scriptResult with scriptResultId = {scriptResultId}.
get /scriptResults/{scriptResultId}
Get the scriptResult with scriptResultId = {scriptResultId}.
URI Parameters
- scriptResultId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
- script_id: required(string - minLength: 32 - maxLength: 32)
- name: required(string)
- contact_id: required(string - minLength: 32 - maxLength: 32)
- originalcontact_id: required(string - minLength: 32 - maxLength: 32)
- modificationtime: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- scriptquestions: required(array of ScriptResultQuestion)
Items: ScriptResultQuestion
- id: required(string - minLength: 32 - maxLength: 32)
- data: required(string)
- controltype: required(string)
- datatype: required(string)
- ordinal: required(number)
- scriptanswers: required(array of ScriptResultAnswer)
Items: ScriptResultAnswer
- id: required(string - minLength: 32 - maxLength: 32)
- answerdata: required(string)
- ordinal: required(number)
Example:
{
"originalcontact_id": "599BD2A32FF7364FB2D1B53A31615C7F",
"contact_id": "599BD2A32FF7364FB2D1B53A31615C7F",
"id": "2B7FB50EF97F416A82AAF48463BA2B5A",
"modificationtime": "2017-03-01T10:00:42.470Z",
"name": "Simple car selector",
"scriptquestions": [
{
"scriptanswers": [
{
"answerdata": "Kia",
"id": "730FBF56981A4657B9285D3B52E7D239",
"ordinal": 0
},
{
"answerdata": "Volvo",
"id": "E34CA4525ABF42CEB7B4A5CCE1AE03E4",
"ordinal": 1
}
],
"controltype": "multicombobox",
"data": "Current Car",
"datatype": "text",
"id": "E6AF572FE79B4550B5CBF621EFB590B7",
"ordinal": 0
},
{
"scriptanswers": [
{
"answerdata": "Hyndai",
"id": "9FCD51FC65334C25851469348E41ADF4",
"ordinal": 2
}
],
"controltype": "multicombobox",
"data": "Next Car",
"datatype": "text",
"id": "B50D16A1D4834047AEFE52325B95377F",
"ordinal": 2
}
],
"script_id": "DCA8D3301BC74B9C8AFCB28026E7761B"
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
Example:
HTTP 404 Not Found
/chats
Collection of chats.
Get a list of chats.
get /chats
Get a list of chats.
Query Parameters
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
- originator: (string)
Search filtered by originating address of the chat.
Example:
originator=john.doe@acme.com
- channel_sub_type: (string)
Search filtered by channel sub type text, video or sms
Example:
channel_sub_type=sms
- destination: (string)
Search filtered by destination address of the chat.
Example:
destination=123456Support@Test.com
- limit: (integer - default: <
>) Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: chats
- id: required(string - minLength: 32 - maxLength: 32)
- channel_type: required(string)
- channel_sub_type: required(string)
- type: required(one of ChatIn, ChatOut)
- typeDetails: required(string)
Operative database has the following types: Chat, ChatOut
- status: required(one of InQueue, InProcess, Handled, Abandoned)
- statusDetails: required(string)
Operative database has the following statuses: Deleted, Handled, Closed, Pending, Sent, Open, Forwarded
- originator: required(string)
Source address. Phone number or e-mail address.
- destination: required(string)
Phone number or e-mail address.
- date_created: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- from_queue: required(object)
- id: required(string - minLength: 32 - maxLength: 32)
- name: required(string)
- participants: (array of ChatParticipant)
Included only when only one chat is fetched.
Items: ChatParticipant
- alias: required(string)
- uniquekey: required(string)
- transcript: (object)
Included only when only one chat is fetched.
- messages: required(array of ChatTranscript)
Items: ChatTranscript
- message: required(string)
- originator: required(string)
- timestamp: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- system_message: required(boolean)
- type: required(one of text, attachment)
- messages: required(array of ChatTranscript)
- agentId: (string - minLength: 32 - maxLength: 32)
The agent who is handling or who has handled this contact. Null value not returned - there is no agent.
- agentName: (string)
Example:
[
{
"id": "9964A286A4E711E680F7005056AD5BC6",
"originator": "sam.i.am@greeneggs.ham",
"destination": " 123456Support@Test.com",
"from_queue": {
"id": "999102030405060708090A0B0C0D0E0F",
"name": "My support chat"
},
"title": "",
"date_created": "2016-11-07T12:42:12.670Z",
"channel_type": "chat",
"channel_sub_type": "text"
},
{
"id": "2558A56EAFF511E680F7005056AD5BC6",
"originator": "jill@customer.com",
"destination": " 987654Sales@Test.com",
"from_queue": {
"id": "999102030405060708090A0B0C0D0E0F",
"name": "My sales chat"
},
"date_created": "2016-11-21T14:16:57.477Z",
"title": "",
"channel_type": "chat",
"channel_sub_type": "text"
}
]
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
Entity representing a chat.
Get the chat with chatId = {chatId}.
get /chats/{chatId}
Get the chat with chatId = {chatId}.
URI Parameters
- chatId: required(string)
Query Parameters
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
- channel_type: required(string)
- channel_sub_type: required(string)
- type: required(one of ChatIn, ChatOut)
- typeDetails: required(string)
Operative database has the following types: Chat, ChatOut
- status: required(one of InQueue, InProcess, Handled, Abandoned)
- statusDetails: required(string)
Operative database has the following statuses: Deleted, Handled, Closed, Pending, Sent, Open, Forwarded
- originator: required(string)
Source address. Phone number or e-mail address.
- destination: required(string)
Phone number or e-mail address.
- date_created: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- from_queue: required(object)
- id: required(string - minLength: 32 - maxLength: 32)
- name: required(string)
- participants: (array of ChatParticipant)
Included only when only one chat is fetched.
Items: ChatParticipant
- alias: required(string)
- uniquekey: required(string)
- transcript: (object)
Included only when only one chat is fetched.
- messages: required(array of ChatTranscript)
Items: ChatTranscript
- message: required(string)
- originator: required(string)
- timestamp: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- system_message: required(boolean)
- type: required(one of text, attachment)
- messages: required(array of ChatTranscript)
- agentId: (string - minLength: 32 - maxLength: 32)
The agent who is handling or who has handled this contact. Null value not returned - there is no agent.
- agentName: (string)
Example:
{
"id": "9964A286A4E711E680F7005056AD5BC6",
"originator": "sam.i.am@greeneggs.ham",
"destination": " 123456Support@Test.com",
"from_queue": {
"id": "999102030405060708090A0B0C0D0E0F",
"name": "My support chat"
},
"title": "",
"date_created": "2016-11-07T12:42:12.670Z",
"channel_type": "chat",
"channel_sub_type": "text",
"participants": [
{
"alias": "Mark",
"uniquekey": "Mark.Smith@SinchCCtr.com"
},
{
"alias": "Sam",
"uniquekey": "sam.i.am@greeneggs.ham"
},
{
"alias": "John",
"uniquekey": "John.Doe@SinchCCtr.com"
},
{
"alias": "",
"uniquekey": "Sinch Contact Center"
}
],
"transcript": {
"messages": [
{
"message": "Bye",
"originator": "Mark.Smith@SinchCCtr.com",
"timeStamp": "2016-11-07T12:44:27.667Z",
"type": "text",
"system_message": false
},
{
"message": "No, many thanks. Bye",
"originator": "sam.i.am@greeneggs.ham",
"timeStamp": "2016-11-07T12:44:25.220Z",
"type": "text",
"system_message": false
},
{
"message": "Is there anything else I can help with ?",
"originator": "Mark.Smith@SinchCCtr.com",
"timeStamp": "2016-11-07T12:44:19.453Z",
"type": "text",
"system_message": false
},
{
"message": "I will send this to you at your provided address",
"originator": "Mark.Smith@SinchCCtr.com",
"timeStamp": "2016-11-07T12:44:12.657Z",
"type": "text",
"system_message": false
},
{
"message": "I am happy to help you with your catalogue request",
"originator": "Mark.Smith@SinchCCtr.com",
"timeStamp": "2016-11-07T12:44:01.997Z",
"type": "text",
"system_message": false
},
{
"message": "This is Mark",
"originator": "Mark.Smith@SinchCCtr.com",
"timestamp": "2016-11-07T12:43:47.087Z",
"type": "text",
"system_message": false
},
{
"message": "Hello.",
"originator": "Mark.Smith@SinchCCtr.com",
"timestamp": "2016-11-07T12:43:44.763Z",
"type": "text",
"system_message": false
},
{
"message": "One moment please",
"originator": "John.Doe@SinchCCtr.com",
"timestamp": "2016-11-07T12:43:08.927Z",
"type": "text",
"system_message": false
},
{
"message": "Sure, let me transfer you to the colleague in that department",
"originator": "John.Doe@SinchCCtr.com",
"timestamp": "2016-11-07T12:43:02.877Z",
"type": "text",
"system_message": false
},
{
"message": "Hi, Could you help me with purchases of bikes? I would like the latest catalogue?",
"originator": "sam.i.am@greeneggs.ham",
"timestamp": "2016-11-07T12:42:50.850Z",
"type": "text",
"system_message": false
},
{
"message": "Hello. How may I help you?",
"originator": "John.Doe@SinchCCtr.com",
"timestamp": "2016-11-07T12:42:27.867Z",
"type": "text",
"system_message": false
},
{
"message": "Position in queue: 1 - \nNumber of agents: 4",
"originator": "Sinch Contact Center",
"timestamp": "2016-11-07T12:42:10.953Z",
"type": "text",
"system_message": true
}
]
}
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
Example:
HTTP 404 Not Found
/callRecordings
Collection of callRecordings.
Get a list of callRecordings.
get /callRecordings
Get a list of callRecordings.
Query Parameters
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
- call_id: (string)
Search filtered by "call id"
Example:
call_id=475CD7FA939747CD9885379F5C4DEE08
- contact_id: (string)
Search filtered by "contact id"
Example:
contact_id=76155631FB5BE711810B005056AD5BC6
- start_time: (string)
Search recordings after of given UTC time
Example:
start_time=2017-06-28T06:00:00.000Z
- end_time: (string)
Search recordings before of given UTC time
Example:
end_time=2017-06-28T12:00:00.000Z
- limit: (integer - default: <
>) Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: callRecordings
- id: required(string - minLength: 32 - maxLength: 32)
- call_id: required(string - minLength: 32 - maxLength: 32)
- contact_id: required(string - minLength: 32 - maxLength: 32)
- owner_id: required(string - minLength: 32 - maxLength: 32)
- owner_type: required(one of user, queue, outbound campaign)
- owner_name: required(string)
- file_name: required(string)
- file_path: required(string)
- creation_time: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- listen_log: required(array of CallRecordingListenLog)
Included only when only one call recording is fetched.
Items: CallRecordingListenLog
- id: (string - minLength: 32 - maxLength: 32)
- user_guid: (string - minLength: 32 - maxLength: 32)
The currently logged in user is used when posting new.
- user_id: (string)
Login name. The currently logged in user is used when posting new.
- user_name: (string)
The currently logged in user is used when posting new.
- description: required(string)
Required when posting new.
- userSessionId: required(string)
Required when posting new.
- time_stamp: (datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z The current server time is used in posting if not given.
Example:
[
{
"call_id": "D8296FEDDB374F4EABAF6F9A555F3853",
"contact_id": "B4C00F7C6061E711810B005056AD5BC6",
"creation_time": "2017-07-05T09:01:25.597Z",
"file_name": "100\\2017_07_00\\05_12_01_14_SSR_100_D8296FEDDB374F4EABAF6F9A555F3853.wav",
"file_path": "",
"id": "0530B4826061E711810B005056AD5BC6",
"owner_id": "C04DEC26C5EF4D44BAE5CEE3F2EF67F7",
"owner_name": "Jonhnson, Jack",
"owner_type": "user"
},
{
"call_id": "6E4F2AE072134F23A281F8B74B472C27",
"contact_id": "ED453D546061E711810B005056AD5BC6",
"creation_time": "2017-07-05T09:00:22.473Z",
"file_name": "100\\2017_07_00\\05_12_00_11_SSR_100_6E4F2AE072134F23A281F8B74B472C27.wav",
"file_path": "",
"id": "A7DFE85A6061E711810B005056AD5BC6",
"owner_id": "C04DEC26C5EF4D44BAE5CEE3F2EF67F7",
"owner_name": "Jonhnson, Jack",
"owner_type": "user"
},
{
"call_id": "475CD7FA939747CD9885379F5C4DEE08",
"contact_id": "76155631FB5BE711810B005056AD5BC6",
"creation_time": "2017-06-28T12:14:11.517Z",
"file_name": "Cr\\2017_06_04\\28_15_13_39_SSR_Cr_475CD7FA939747CD9885379F5C4DEE08.wav",
"file_path": "",
"id": "8734EC49FB5BE711810B005056AD5BC6",
"owner_id": "58215C79F02345EF8E32CF7356F78065",
"owner_name": "Direct Sales",
"owner_type": "queue"
},
{
"call_id": "475CD7FA939747CD9885379F5C4DEE08",
"contact_id": "76155631FB5BE711810B005056AD5BC6",
"creation_time": "2017-06-28T12:13:47.260Z",
"file_name": "12888\\2017_06_04\\28_15_13_39_SSR_12888_475CD7FA939747CD9885379F5C4DEE08.wav",
"file_path": "",
"id": "B4A74B3AFB5BE711810B005056AD5BC6",
"owner_id": "D0248B3AE770490EA9A7BE954BE7BA63",
"owner_name": "Smith, Mark",
"owner_type": "user"
}
]
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
Entity representing a callRecording.
Get the callRecording with callRecordingId = {callRecordingId}.
get /callRecordings/{callRecordingId}
Get the callRecording with callRecordingId = {callRecordingId}.
URI Parameters
- callRecordingId: required(string)
Query Parameters
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
- call_id: required(string - minLength: 32 - maxLength: 32)
- contact_id: required(string - minLength: 32 - maxLength: 32)
- owner_id: required(string - minLength: 32 - maxLength: 32)
- owner_type: required(one of user, queue, outbound campaign)
- owner_name: required(string)
- file_name: required(string)
- file_path: required(string)
- creation_time: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- listen_log: required(array of CallRecordingListenLog)
Included only when only one call recording is fetched.
Items: CallRecordingListenLog
- id: (string - minLength: 32 - maxLength: 32)
- user_guid: (string - minLength: 32 - maxLength: 32)
The currently logged in user is used when posting new.
- user_id: (string)
Login name. The currently logged in user is used when posting new.
- user_name: (string)
The currently logged in user is used when posting new.
- description: required(string)
Required when posting new.
- userSessionId: required(string)
Required when posting new.
- time_stamp: (datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z The current server time is used in posting if not given.
Example:
{
"call_id": "475CD7FA939747CD9885379F5C4DEE08",
"contact_id": "08355C40FB5BE711810B005056AD5BC6",
"creation_time": "2017-06-28T12:14:11.517Z",
"file_name": "12888\\2017_06_04\\28_15_14_08_SSR_12888_475CD7FA939747CD9885379F5C4DEE08.wav",
"file_path": "",
"id": "8534EC49FB5BE711810B005056AD5BC6",
"listen_log": [
{
"description": "xxx",
"time_stamp": "2017-06-28T12:16:23.517Z",
"user_guid": "D0248B3AE770490EA9A7BE954BE7BA63",
"user_id": "mark.smith",
"user_name": "Smith, Mark"
}
],
"owner_id": "D0248B3AE770490EA9A7BE954BE7BA63",
"owner_name": "Smith, Mark",
"owner_type": "user"
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
Example:
HTTP 404 Not Found
Collection of listenLog.
Get a list of listenLog.
Add a new listenLog.
get /callRecordings/{callRecordingId}/listenLog
Get a list of listenLog.
URI Parameters
- callRecordingId: required(string)
Query Parameters
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: listenLogs
- id: (string - minLength: 32 - maxLength: 32)
- user_guid: (string - minLength: 32 - maxLength: 32)
The currently logged in user is used when posting new.
- user_id: (string)
Login name. The currently logged in user is used when posting new.
- user_name: (string)
The currently logged in user is used when posting new.
- description: required(string)
Required when posting new.
- userSessionId: required(string)
Required when posting new.
- time_stamp: (datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z The current server time is used in posting if not given.
Example:
[
{
"id": "F0DA314476984627B84BE99AB98C6AA6",
"description": "listened because",
"userSessionId": "6936084DBA3C4941C80F2CB2E3EC00E3",
"user_guid": "B2C178ABC2E84BA4A7E5B091E3FC5451",
"user_id": "Agent Login",
"user_name": "Agent, Name",
"time_stamp": "2016-04-15T05:58:53.650Z"
},
{
"id": "4933E5ECB9784F1C96A5F6E047995432",
"description": "listened again",
"userSessionId": "userSessionId",
"user_guid": "30BAC5C8C39A4CA5A5B1C5509EE4F12B",
"user_id": "Agent2 Login",
"user_name": "Agent2, Name",
"time_stamp": "2016-04-15T05:58:53.650Z"
}
]
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
post /callRecordings/{callRecordingId}/listenLog
Add a new listenLog.
URI Parameters
- callRecordingId: required(string)
Body
Media type: application/json
Type: object
Properties- id: (string - minLength: 32 - maxLength: 32)
- user_guid: (string - minLength: 32 - maxLength: 32)
The currently logged in user is used when posting new.
- user_id: (string)
Login name. The currently logged in user is used when posting new.
- user_name: (string)
The currently logged in user is used when posting new.
- description: required(string)
Required when posting new.
- userSessionId: required(string)
Required when posting new.
- time_stamp: (datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z The current server time is used in posting if not given.
Example:
{
"description": "listened because",
"userSessionId": "6936084DBA3C4941C80F2CB2E3EC00E3"
}
HTTP status code 201
Returns the created id.
Body
Media type: text/html
Type: any
Example:
F5168FBDD6914C8DB1C6D0BD64563A39
/callbacks
Collection of callbacks.
Get a list of callbacks.
Add a new callback.
get /callbacks
Get a list of callbacks.
Query Parameters
- any fields: (string)
&field1=value1&field2=value2...
Values may contain patterns * and ?
Valid searchable fields: customerNumberExample:
customerNumber=*987654
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: callbacks
- id: required(string - minLength: 32 - maxLength: 32)
- callbackQueueNumber: required(string)
- creationTime: required(datetime)
- creatorId: (string - minLength: 32 - maxLength: 32)
- creatorName: (string)
- customerNumber: required(string)
- extraData: (string)
- gwPrefix: (string)
- failures: required(number)
- lastCallTime: (datetime)
- lastResult: (string)
- maxCalls: required(number)
- nextCallTime: (datetime)
- notes: (string)
- originalQueueNumber: required(string)
- originalQueueName: (string)
Example:
[
{
"callbackQueueNumber": "153",
"creationTime": "2019-09-13T11:51:17.670Z",
"customerNumber": "+35854852156",
"extraData": "<XML><Skills>ENGLISH=4</Skills></XML>",
"gwPrefix": "FIN",
"failures": 1,
"id": "C42C6D5CF4004CC3B75E104654D9C5BE",
"lastCallTime": "2019-09-16T14:25:02.840Z",
"lastResult": "NO_ANSWER",
"maxCalls": 99,
"nextCallTime": "2019-09-13T11:52:21.480Z",
"notes": "Comments",
"originalQueueNumber": "152",
"originalQueueName": "Sales"
},
{
"callbackQueueNumber": "153",
"creationTime": "2019-09-13T11:51:16.433Z",
"creatorId": "8EE34E893B224131AACF44677F60CF54",
"creatorName": "Smith, John",
"customerNumber": "124",
"failures": 0,
"id": "806822AF40244A29A3374C3EF98C53DA",
"lastResult": "ADDED",
"maxCalls": 99,
"nextCallTime": "2019-09-13T11:52:21.480Z",
"originalQueueNumber": "152",
"originalQueueName": "Sales"
}
]
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
post /callbacks
Add a new callback.
Body
Media type: application/json
Type: object
Properties- callbackQueueNumber: required(string)
- customerNumber: required(string)
- extraData: (string)
- gwPrefix: (string)
- nextCallTime: (datetime)
- notes: (string)
Example:
{
"nextCallTime": "2019-10-04T12:36:02.440Z",
"customerNumber": "85412369512",
"callbackQueueNumber": "505"
}
HTTP status code 201
Returns the created id.
Body
Media type: text/html
Type: any
Example:
F5168FBDD6914C8DB1C6D0BD64563A39
Entity representing a callback.
Update the callback with callbackId = {callbackId}
Only fields customerNumber, notes, lastResult and nextCallTime are updated. Others are ignored.
nextCallTime is only allowed when lastResult is either CUSTOM_TIME or RESCHEDULE.
Get the callback with callbackId = {callbackId}.
put /callbacks/{callbackId}
Update the callback with callbackId = {callbackId}
Only fields customerNumber, notes, lastResult and nextCallTime are updated. Others are ignored.
nextCallTime is only allowed when lastResult is either CUSTOM_TIME or RESCHEDULE.
URI Parameters
- callbackId: required(string)
Body
Media type: application/json
Type: object
Properties- id: (string - minLength: 32 - maxLength: 32)
- creationTime: (datetime)
- customerNumber: required(string)
- extraData: (string)
- gwPrefix: (string)
- failures: (number)
- lastCallTime: (datetime)
- lastResult: required(one of SUCCESSFUL, BUSY, NO_ANSWER, VOICEMAIL, CUSTOM_TIME, OTHER, HANDLED, RESCHEDULE)
- maxCalls: (number)
- nextCallTime: (datetime)
- notes: required(string)
- originalQueueNumber: (string)
- originalQueueName: (string)
- callbackQueueNumber: (string)
Example:
{
"callbackQueueNumber": "153",
"creationTime": "2019-09-13T11:51:17.670Z",
"customerNumber": "+35854852156",
"id": "C42C6D5CF4004CC3B75E104654D9C5BE",
"lastCallTime": "2019-09-16T14:25:02.840Z",
"lastResult": "HANDLED",
"notes": "Comments",
"originalQueueNumber": "152",
"originalQueueName": "Sales"
}
HTTP status code 204
No content - The server has successfully fulfilled the request and there is no additional content to send in the response payload body.
get /callbacks/{callbackId}
Get the callback with callbackId = {callbackId}.
URI Parameters
- callbackId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
- callbackQueueNumber: required(string)
- creationTime: required(datetime)
- creatorId: (string - minLength: 32 - maxLength: 32)
- creatorName: (string)
- customerNumber: required(string)
- extraData: (string)
- gwPrefix: (string)
- failures: required(number)
- lastCallTime: (datetime)
- lastResult: (string)
- maxCalls: required(number)
- nextCallTime: (datetime)
- notes: (string)
- originalQueueNumber: required(string)
- originalQueueName: (string)
Example:
{
"callbackQueueNumber": "153",
"creationTime": "2019-09-13T11:51:17.670Z",
"creatorId": "8EE34E893B224131AACF44677F60CF54",
"creatorName": "Smith, John",
"customerNumber": "+35854852156",
"extraData": "<XML><Skills>ENGLISH=4</Skills></XML>",
"gwPrefix": "FIN",
"failures": 1,
"id": "C42C6D5CF4004CC3B75E104654D9C5BE",
"lastCallTime": "2019-09-16T14:25:02.840Z",
"lastResult": "NO_ANSWER",
"maxCalls": 99,
"nextCallTime": "2019-09-13T11:52:21.480Z",
"notes": "Comments",
"originalQueueNumber": "152",
"originalQueueName": "Sales"
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
Example:
HTTP 404 Not Found
/contacts
Collection of contacts (phone calls, chats, emails). By default the contacts are returned from monitoring/reporting databases, but if search criteria contains subject, body or remarks, then the search is done from operative database.
Get a list of contacts.
get /contacts
Get a list of contacts.
Query Parameters
- search: (string)
Searches by source or destination. Can have multiple values separated by comma.
Example:
search=*987654, search=email@host.com, search=*987654,email@host.com
- startTime: (string)
arrivalTime or disconnectTime >= value
Example:
startTime=2019-10-17T16:25:59Z
- endTime: (string)
arrivalTime or disconnectTime <= value
Example:
endTime=2019-10-17T16:25:59Z
- subject: (string)
Search email or chat subject using full-text search. If value contains " characters, then it is assumed to be in full text format already.
Example:
subject=text
- body: (string)
Search email body or chat message. Email body is searched by using full-text search. Chat message must contain the value somewhere.
Example:
body=text
- remarks: (string)
Search email remarks using using full-text search.
Example:
remarks=text
- caseId: (string)
Search email caseId.
Example:
caseId=12345
- agentId: (string)
Search by agentId. Allows comma separated list.
Example:
agentId=E936C474B22311D38FBE0090279A922E,A206C474B22311D38FBE0090279A922E
- queueId: (string)
Search by queueId. Allows comma separated list.
Example:
queueId=F8C2697F37D044DB929B10F75381C624,990556DC18244B4AB5BF35D75A89CDEF
- pickable: (boolean)
Can be filtered to return only pickable contacts. Contact is pickable if agent has STATISTICS_DETAILS right to see the contact (queue/agent), and if agent has SERVE right to the queue. Currently phone calls can't be picked. Contact status must be one of:
- status=InQueue (chat, email)
- status=InProcess (inbound email, or outbound email which was created by the same agent)
Example:
pickable=true
- any fields: (string)
&field1=value1&field2=value2...
Values may contain patterns * and ?
Valid searchable fields: id,contactGroupId,source,destination,...Example:
?source=*987654&destination=email@host.com
- language: (string)
Define with a two-character code (ISO 639) the language to which the translatable values are translated. By default, logged-on user’s language is used.
Example:
language=FI
- sort: (string)
Can be sorted by any field. Default sort is -arrivalTime. "-" in front of field name will sort descending. With the postfix ",LOCALE-xx" where xx can be for example en,en-US,de,fi, the user may sort with given locale that are based on standard "IETF BCP 47".
Example:
sort=-arrivalTime,LOCALE-en
- limit: (integer - default: <
>) Limit number of elements by specifying a limit value for the query
Example:
limit=20
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: contacts
- id: required(string - minLength: 32 - maxLength: 32)
- contactGroupId: required(string - minLength: 32 - maxLength: 32)
When contact is transferred, then it gets the new id but contactGroupId stays the same.
- channel: required(one of PHONE, CHAT, EMAIL)
- type: required(one of CallIn, CallOut, ChatIn, ChatOut, EmailIn, EmailOut)
- typeDetails: required(string)
Original type from Monitoring/Reporting/Operative database. Operative database has the following types: ACTION, Chat, ChatOut, EMAIL, EMAILOUT, TASK, OII_EMAIL, XRI
- subtype: (one of text, video, sms, facebook, wechat, whatsapp)
Currently used for chat channel only.
- status: required(one of Pending, InQueue, InProcess, Handled, Abandoned)
- statusDetails: required(string)
Original status from Monitoring/Reporting/Operative database. Operative database has the following statuses: Deleted, Handled, Closed, Pending, Sent, Open, Forwarded
- source: required(string)
Phone number or email address.
- destination: required(string)
Phone number or email address.
- agentId: (string - minLength: 32 - maxLength: 32)
The agent who is handling or who has handled this contact. Null value not returned - there is no agent.
- agentName: (string)
- queueId: (string - minLength: 32 - maxLength: 32)
The queue in which this contact was created. Null value not returned - there is no queue.
- queueName: (string)
- arrivalTime: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- disconnectTime: (datetime)
Null if contact is not ended yet.
- totalDuration: required(number)
Milliseconds from arrivalTime to disconnectTime or to current time.
- record: (boolean)
True if contact is phone call and has recording, null otherwise.
- script: (boolean)
True if contact has script, null otherwise.
- subject: (string)
Example:
{
{
"id": "DBEC8B07E3F0E9119E1D0050568C5E24",
"contactGroupId": "73CED646FA0947E0AA4E0367FB1B9BCC",
"channel": "PHONE",
"type": "CallIn",
"typeDetails": "IVR",
"status": "Handled",
"statusDetails": "Handled_AOT",
"source": "0505551234",
"destination": "0505550000",
"queueId": "1EFC92416F0A46DC9BBC08A842B89D93",
"queueName": "Phone Queue",
"arrivalTime": "2019-10-17T13:35:49.773Z",
"disconnectTime": "2019-10-17T13:35:49.780Z",
"totalDuration": 7,
"record": true,
"script": true
},
{
"id": "336FFFD5C6FF11E68ACA005056A75D9A",
"contactGroupId": "336FFFD4C6FF11E68ACA005056A75D9A",
"channel": "CHAT",
"type": "ChatIn",
"typeDetails": "ChatIn Text",
"subtype": "text",
"status": "InProcess",
"statusDetails": "InProcess",
"source": "customer@host.com",
"destination": "chat1@wicom.com",
"agentId": "21A144F1824E4C768868D10201608E2E",
"agentName": "Agent, Name",
"queueId": "1EFC92416F0A46DC9BBC08A842B89D92",
"queueName": "Chat1 (FI)",
"arrivalTime": "2016-12-20T21:56:47.347Z",
"totalDuration": 89048513266,
"subject": "Request for support"
},
{
"id": "D469DD256214473E93C3C1C1E8DF3A74",
"contactGroupId": "D469DD256214473E93C3C1C1E8DF3A74",
"channel": "EMAIL",
"type": "EmailIn",
"typeDetails": "EMAILIN",
"status": "InQueue",
"statusDetails": "InProcess",
"source": "from@host.com",
"destination": "email@queue.com",
"queueId": "E09EC850E87F424293B435D22E99BD70",
"queueName": "E-mail Support",
"arrivalTime": "2019-09-08T11:09:14Z",
"totalDuration": 3378644877,
"subject": "Information of the offer"
}
}
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
Entity representing a contact.
Get the contact with contactId = {contactId}.
get /contacts/{contactId}
Get the contact with contactId = {contactId}.
URI Parameters
- contactId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
- contactGroupId: required(string - minLength: 32 - maxLength: 32)
When contact is transferred, then it gets the new id but contactGroupId stays the same.
- channel: required(one of PHONE, CHAT, EMAIL)
- type: required(one of CallIn, CallOut, ChatIn, ChatOut, EmailIn, EmailOut)
- typeDetails: required(string)
Original type from Monitoring/Reporting/Operative database. Operative database has the following types: ACTION, Chat, ChatOut, EMAIL, EMAILOUT, TASK, OII_EMAIL, XRI
- subtype: (one of text, video, sms, facebook, wechat, whatsapp)
Currently used for chat channel only.
- status: required(one of Pending, InQueue, InProcess, Handled, Abandoned)
- statusDetails: required(string)
Original status from Monitoring/Reporting/Operative database. Operative database has the following statuses: Deleted, Handled, Closed, Pending, Sent, Open, Forwarded
- source: required(string)
Phone number or email address.
- destination: required(string)
Phone number or email address.
- agentId: (string - minLength: 32 - maxLength: 32)
The agent who is handling or who has handled this contact. Null value not returned - there is no agent.
- agentName: (string)
- queueId: (string - minLength: 32 - maxLength: 32)
The queue in which this contact was created. Null value not returned - there is no queue.
- queueName: (string)
- arrivalTime: required(datetime)
ISO-8601 UTC timestamp in format 2011-12-31T13:15:30.123Z
- disconnectTime: (datetime)
Null if contact is not ended yet.
- totalDuration: required(number)
Milliseconds from arrivalTime to disconnectTime or to current time.
- record: (boolean)
True if contact is phone call and has recording, null otherwise.
- script: (boolean)
True if contact has script, null otherwise.
- subject: (string)
Example:
{
"id": "DBEC8B07E3F0E9119E1D0050568C5E24",
"contactGroupId": "73CED646FA0947E0AA4E0367FB1B9BCC",
"channel": "PHONE",
"type": "CallIn",
"typeDetails": "IVR",
"status": "Handled",
"statusDetails": "Handled_AOT",
"source": "0505551234",
"destination": "0505550000",
"queueId": "1EFC92416F0A46DC9BBC08A842B89D93",
"queueName": "Phone Queue",
"arrivalTime": "2019-10-17T13:35:49.773Z",
"disconnectTime": "2019-10-17T13:35:49.780Z",
"totalDuration": 7,
"record": true,
"script": true
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
Example:
HTTP 404 Not Found
Get the remarks for the contact. Remarks is stored in operative database. contactId must be contactGroupId.
Add remarks for the contact. Works only for phone calls, which don't yet have remarks in operative database. Agent needs to be the responsible user for the contact.
Update remarks for the contact. Contact must exist in operative database. Agent needs to be the responsible user for the contact.
post /contacts/{contactId}/remarks
Add remarks for the contact. Works only for phone calls, which don't yet have remarks in operative database. Agent needs to be the responsible user for the contact.
URI Parameters
- contactId: required(string)
Body
Media type: text/plain
Type: any
Example:
New remarks.
HTTP status code 204
No content - The server has successfully fulfilled the request and there is no additional content to send in the response payload body.
put /contacts/{contactId}/remarks
Update remarks for the contact. Contact must exist in operative database. Agent needs to be the responsible user for the contact.
URI Parameters
- contactId: required(string)
Body
Media type: text/plain
Type: any
Example:
New remarks.
HTTP status code 204
No content - The server has successfully fulfilled the request and there is no additional content to send in the response payload body.
/messages
Collection of messages.
Get a list of messages.
Add a new message.
get /messages
Get a list of messages.
Query Parameters
- any fields: (string)
&field1=value1&field2=value2...
Values may contain patterns * and ?
Valid searchable fields: source, subTypeExample:
source=987654*
- sendTime: (string)
Search for messages that have the sendTime value after the given UTC time
Example:
sendTime=2020-06-29T12:00:00.000Z
- sendTimeEnd: (string)
Search for messages that have the sendTime value before the given UTC time
Example:
sendTimeEnd=2020-07-29T12:00:00.000Z
- creationTime: (string)
Search messages created after the given UTC time
Example:
creationTime=2020-04-29T12:00:00.000Z
- creationTimeEnd: (string)
Search messages created before the given UTC time
Example:
creationTimeEnd=2020-07-29T12:00:00.000Z
HTTP status code 200
Body
Media type: application/json
Type: array of object
Items: messages
- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- message: required(string - minLength: 1 - maxLength: 2000)
- source: required(string)
This must be an existing chat queue address
- subType: required(string)
For example sms, whatsapp, telegram.
- sendTime: (datetime)
ISO-8601 UTC timestamp in format 2020-06-31T13:15:30.123Z.
- creationDate: (datetime)
Added by the system
- maxRetryCount: (integer - default: 5 - maximum: 10)
- retryDelay: (integer - default: 300 - minimum: 60 - maximum: 3600)
Retry delay in seconds
- destinations: required(array of object)
Items: items
- address: required(string - minLength: 1 - maxLength: 256)
Phone number of the message recipient
- status: (one of ADDED, PROCESSING, FAILED, HANDLED)
- address: required(string - minLength: 1 - maxLength: 256)
Example:
[
{
"destinations": {
"destination": [
{
"address": "9874572",
"status": "ADDED"
},
{
"address": "9874574",
"status": "ADDED"
} ]
},
"message": "It's time do yearly maintenance for your Mercedes. You can call you us or check free time from web.",
"id": "7709311E00144664847200192C96BFA9",
"creationTime": "2020-06-12T12:36:01.320Z",
"source": "12345678@sms.social365.com",
"subType": "sms",
"sendTime": "2020-06-14T12:36:01.320Z",
"maxRetryCount": 2,
"retryDelay": 3600
},
{
"destinations": {
"destination": [
{
"address": "9874572",
"status": "PROCESSING"
}
]
},
"message": "It's time do yearly maintenance for your Mercedes. You can call you us or check free time from web.",
"id": "7709311E00144664847200192C96BFA9",
"creationTime": "2020-06-12T12:36:01.320Z",
"source": "12345678@whatsapp.social365.com",
"subType": "whatsapp",
"sendTime": "2020-06-14T12:36:01.320Z",
"maxRetryCount": 5,
"retryDelay": 3600
}
]
HTTP status code 400
Bad Request
Body
Media type: text/plain
Type: any
Example:
Invalid GUID: '2B8ED95B0EC911E79675005056A75D9'
post /messages
Add a new message.
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- message: required(string - minLength: 1 - maxLength: 2000)
- source: required(string)
This must be an existing chat queue address
- subType: required(string)
For example sms, whatsapp, telegram.
- sendTime: (datetime)
ISO-8601 UTC timestamp in format 2020-06-31T13:15:30.123Z.
- creationDate: (datetime)
Added by the system
- maxRetryCount: (integer - default: 5 - maximum: 10)
- retryDelay: (integer - default: 300 - minimum: 60 - maximum: 3600)
Retry delay in seconds
- destinations: required(array of object)
Items: items
- address: required(string - minLength: 1 - maxLength: 256)
Phone number of the message recipient
- status: (one of ADDED, PROCESSING, FAILED, HANDLED)
- address: required(string - minLength: 1 - maxLength: 256)
Example:
{
"destinations": {
"destination": [
{
"address": +36584215"
},
{
"address": "854125477"
}
]
},
"message": "It's time do yearly maintenance for your Mercedes. You can call you us or check free time from web www.sinch.com",
"source": "12345678@sms.social365.com",
"subType": "sms",
"sendTime": "2020-03-12T12:36:01.320Z",
"maxRetryCount": 2,
"retryDelay": 300
}
HTTP status code 201
Returns the created id.
Body
Media type: text/html
Type: any
Example:
F5168FBDD6914C8DB1C6D0BD64563A39
Entity representing a message.
Get the message with messageId = {messageId}.
Update the message with messageId = {messageId}.
Note: Provide all properties since all fields are updated.
Delete the message.
get /messages/{messageId}
Get the message with messageId = {messageId}.
URI Parameters
- messageId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- message: required(string - minLength: 1 - maxLength: 2000)
- source: required(string)
This must be an existing chat queue address
- subType: required(string)
For example sms, whatsapp, telegram.
- sendTime: (datetime)
ISO-8601 UTC timestamp in format 2020-06-31T13:15:30.123Z.
- creationDate: (datetime)
Added by the system
- maxRetryCount: (integer - default: 5 - maximum: 10)
- retryDelay: (integer - default: 300 - minimum: 60 - maximum: 3600)
Retry delay in seconds
- destinations: required(array of object)
Items: items
- address: required(string - minLength: 1 - maxLength: 256)
Phone number of the message recipient
- status: (one of ADDED, PROCESSING, FAILED, HANDLED)
- address: required(string - minLength: 1 - maxLength: 256)
Example:
{
"destinations": {
"destination": [
{
"address": "9874572",
"status": "ADDED"
},
{
"address": "9874574",
"status": "ADDED"
} ]
},
"message": "It's time do yearly maintenance for your Mercedes. You can call you us or check free time from web.",
"id": "7709311E00144664847200192C96BFA9",
"creationTime": "2020-06-12T12:36:01.320Z",
"source": "12345678@sms.social365.com",
"subType": "sms",
"sendTime": "2020-06-14T12:36:01.320Z",
"maxRetryCount": 2,
"retryDelay": 3600
}
HTTP status code 404
Not Found
Body
Media type: text/plain
Type: any
Example:
HTTP 404 Not Found
put /messages/{messageId}
Update the message with messageId = {messageId}.
Note: Provide all properties since all fields are updated.
URI Parameters
- messageId: required(string)
Body
Media type: application/json
Type: object
Properties- id: required(string - minLength: 32 - maxLength: 32)
Added by the system
- message: required(string - minLength: 1 - maxLength: 2000)
- source: required(string)
This must be an existing chat queue address
- subType: required(string)
For example sms, whatsapp, telegram.
- sendTime: (datetime)
ISO-8601 UTC timestamp in format 2020-06-31T13:15:30.123Z.
- creationDate: (datetime)
Added by the system
- maxRetryCount: (integer - default: 5 - maximum: 10)
- retryDelay: (integer - default: 300 - minimum: 60 - maximum: 3600)
Retry delay in seconds
- destinations: required(array of object)
Items: items
- address: required(string - minLength: 1 - maxLength: 256)
Phone number of the message recipient
- status: (one of ADDED, PROCESSING, FAILED, HANDLED)
- address: required(string - minLength: 1 - maxLength: 256)
Example:
{
"destinations": {
"destination": [
{
"address": "9874572"
},
{
"address": "9874574"
}
]
},
"message": "It's time do yearly maintenance for your Mercedes. You can call you us or check free time from web.",
"id": "7709311E00144664847200192C96BFA9",
"creationTime": "2020-06-12T12:36:01.320Z",
"source": "12345678@sms.social365.com",
"subType": "sms",
"sendTime": "2020-06-14T12:36:01.320Z",
"maxRetryCount": 2,
"retryDelay": 3600
}
HTTP status code 204
No content - The server has successfully fulfilled the request and there is no additional content to send in the response payload body.
delete /messages/{messageId}
Delete the message.