A ticket represents a support or service request initiated by a user or customer, which requires resolution or assistance from a support team or service provider.
Here are the steps to generate your Contacts API key:
- Log in as an Administrator/Operator in Output Desk.
- Navigate to the Contacts menu
- Click the Edit button to add or view the API key for that contact.
- Click “Generate API Key“.
Url: /api/contact/postticket
Method: POST
Parameters:
Attribute | Type | Description |
---|---|---|
subject | string(Required) | Subject of the ticket |
content | string(Required) | Content of the ticket |
department | string(Optional) | Department name |
attachments | array of objects | Reply attachments. Ensuring that the total size of these attachments does not exceed 10MB |
To add a ticket as contact without attachments
curl -k -X POST -H “Accesskey-od:{contact accesskey}” ‘{your domain url}/api/contact/postticket’ -H “Content-Type: application/json” –data ‘{ “subject”: “Quotation Request”, “content”: “Good evening, Hope you are doing well !\n\nPlease send us a quotation for the following.\n\n1 Users – 100\n2 Server Configuration Detail\n\n\nThanks” }’
Response:
“result”:{
“ticket_id”:”64fbf2abf39abcc2f9f5633f“,
“ticketobjid”:”64fbf2abf39abcc2f9f5633f“,
“from”:{“id”:”62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”,”isOp”:false},
“postedon”:”2023-09-09T04:20:59.000Z“,
“_id”:”64fbf2abf39abcc2f9f56348“,
“att”:[],
“content”:”Good evening, Hope you are doing well !\n\nPlease send us a quotation for the following.\n\n1 Users – 100\n2 Server Configuration Detail\n\n\nThanks“,
“src”:”E“,
“seen”:[],
“is_firstreply”:true,
“__v”:0,
“txtcontent”:”Good evening, Hope you are doing well !\n\nPlease send us a quotation for the following.\n\n1 Users – 100\n2 Server Configuration Detail\n\n\nThanks“,
“cc”:[]
},
“ticket”:{
“postedon”:”2023-09-09T04:20:59.000Z“,
“priority”:1,
“reply_count”:0,
“to_email”:[],
“_id”:”64fbf2abf39abcc2f9f5633f“,
“app_details”:[],
“status”:”O“,
“from”:{“id”:”62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”,”isOp”:false},
“subject”:”Quotation Request“,
“name”:”Quotation Request“,
“src”:”E“,
“c_updatedon”:”2023-09-09T04:20:59.000Z“,
“updatedon”:”2023-09-09T04:20:59.000Z“,
“c_inti”:”M“,
“mailbox_id”:”613897cceee88b60b53b5a3b“,
“assignee”:””,
“ticket_code”:9783,
“__v”:0,
“content”:”Good evening, Hope you are doing well !\n\nPlease send us a quotation for the following.\n\n1 Users – 100\n2 Server Configuration Detail\n\n\nThanks“,
“cc”:[]
}
}
}
To add a ticket as contact with attachments
**Note: To make this API request, please set the ‘Content-Type’ header to ‘multipart/form-data’.
curl -k -X POST -H “Accesskey-od:{contact accesskey}” ‘{your domain url}/api/contact/postticket’ -H “Content-Type: multipart/form-data” -F “attachments[0]=@/home/administrator/Desktop/API/Server Details.PNG” -F ‘subject=O/P server Renewal Quoatation’ -F ‘content=Dear Sir,\n\nWe have been utilizing Output Messenger for the past several years. We are currently in need of a quotation for the server renewal. Attached, please find the server details for your reference.
Response:
“result”:{
“entity_id”:”58650156ddaed50a3cdb9e31“,
“ticket_id”:”64fec22b3fa4cfc350eeb9df“,
“ticketobjid”:”64fec22b3fa4cfc350eeb9df“,
“from”:{“id”:”62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”,”isOp”:false},
“postedon”:”2023-09-11T07:30:51.000Z“,
“content”:”Dear Sir,\n\nWe have been utilizing Output Messenger for the past several years. We are currently in need of a quotation for the server renewal. Attached, please find the server details for your reference“,
“src”:”E“,
“seen”:[],
“is_firstreply”:true,
“att”:[{
“filename”:”Server Details.PNG“,
“size”:14449,”file”:”M3RnbG1la2VoY2ktU2VydmVyIERldGFpbHMuUE5H.PNG“,
“isembed”:false,
“_id”:”64fec22b3fa4cfc350eeb9ed“,
“attachment_url”:”http://localhost:8234/ticket/attachment/58650156ddaed50a3cdb9e31/09-2023/M3RnbG1la2VoY2ktU2VydmVyIERldGFpbHMuUE5H.PNG“
}]
},
“ticket”:{
“postedon”:”2023-09-11T07:30:51.000Z“,
“priority”:1,
“reply_count”:0,
“to_email”:[],
“_id”:”64fec22b3fa4cfc350eeb9df“,
“app_details”:[],
“status”:”O“,
“from”:{“id”:”62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”,”isOp”:false},
“subject”:”Quotation Request“,
“name”:”Quotation Request“,
“src”:”E“,
“c_updatedon”:”2023-09-11T07:30:51.000Z“,
“updatedon”:”2023-09-11T07:30:51.000Z“,
“c_inti”:”M“,
“mailbox_id”:”613897cceee88b60b53b5a3b“,
“assignee”:””,
“ticket_code”:9788,
“content”:”Dear Sir,\n\nWe have been utilizing Output Messenger for the past several years. We are currently in need of a quotation for the server renewal. Attached, please find the server details for your reference.“,
“cc”:[]
}
}
}
Url: /api/contact/postreply/{ticketcode}
Method: POST
Parameters:
Attribute | Type | Description |
---|---|---|
message | string(Required) | Reply for the ticket |
attachments | array of objects | Reply attachments. Ensuring that the total size of these attachments does not exceed 10MB |
To post a reply as contact without attachments
curl -k -X POST -H “Accesskey-od:{contact accesskey}” ‘{your domain url}/api/contact/postreply/9783‘ -H “Content-Type: application/json” –data ‘{ “message”: “Hi,\n\nThanks for your reply.\n\nCould you please share the 200 users license quotation?” }’
Response:
“description”:”Reply Added“,
“result”: {
“ticket_id”:”64fbf2abf39abcc2f9f5633f“,
“ticketobjid”:”64fbf2abf39abcc2f9f5633f“,
“from”:{“id”:“62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”,”isOp”:false},
“postedon”:”2023-09-09T05:38:01.000Z“,
“_id”:”64fc04b9da17f76309f1a6af“,
“att”:[],
“content”:”Hi,\n\nThanks for your reply.\n\nCould you please share the 200 users license quotation?“,
“status”:{“after”:”O”,”before”:”O”},
“cc”:[],
“src”:”E“,
“resp”:{“id”:”62ba9af49fe2ad21dff999a1″,”rtime”:2281},
“__v”:0,
“assignee”:”62ba9af49fe2ad21dff999a1“,
“ticketcode”:9783
}
}
To post a reply as contact with attachments
To make this API request, please set the ‘Content-Type’ header to ‘multipart/form-data’.
curl -k -X POST -H “Accesskey-od:{contact accesskey}” ‘{your domain url}/api/contact/postreply/9783‘ -H “Content-Type: multipart/form-data” -F “attachments[0]=@/home/administrator/Desktop/API/attachment1.png” -F “attachments[1]=@/home/administrator/Desktop/API/attachment2.png” -F ‘message=Good morning, Our GST Details\n\n\nThanks’
Response:
“description”:”Reply Added“,
“result”: {
“entity_id”:”58650156ddaed50a3cdb9e31“,
“ticket_id”:”64fbf2abf39abcc2f9f5633f“,
“ticketobjid”:”64fbf2abf39abcc2f9f5633f“,
“from”:{“id”:“62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”,”isOp”:false},
“postedon”:”2023-09-11T06:00:11.000Z“,
“att”:[{,
“filename”:”attachment1.png“,
“size”:55472,
“file”:”NHAxbG1laDV2dGUtYXR0YWNobWVudDEucG5n.png“,
“isembed”:false,
“_id”:”64feaceba6174a2fcda47e28”
“attachment_url”:”http://localhost:8234/ticket/attachment/58650156ddaed50a3cdb9e31/09-2023/NHAxbG1laDV2dGUtYXR0YWNobWVudDEucG5n.png”
},{
“filename”:”attachment2.png“,
“size”:63007,
“file”:”MjQ1bG1laDV2dGctYXR0YWNobWVudDIucG5n.png“,
“isembed”:false,
“_id”:”64feaceba6174a2fcda47e29”
“attachment_url”:”http://localhost:8234/ticket/attachment/58650156ddaed50a3cdb9e31/09-2023/MjQ1bG1laDV2dGctYXR0YWNobWVudDIucG5n.png”
}],
“content”:”Good morning, Our GST Details\n\n\nThanks“,
“cc”:[],
“src”:”E“,
“resp”:{“id”:”62ba9af49fe2ad21dff999a1″,”rtime”:34212},
}
}
Url: /api/contact/listicket/{ticketstatus}/{pageno}/{pagesize}
Method: GET
Parameters:
Ticket Status | Description |
---|---|
O | Open |
C | Closed |
To get contacts ticket list
curl -k -X GET -H “Accesskey-od:{contact accesskey}” ‘{your domain url}/api/contact/listicket/O/1/20‘
Response:
“description”:”Reply Added“,
“result”: [{
“reply_count”:6,
“from”:{“id”:”62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”},
“subject”:”Quotation Request“,
“updatedon”:”2023-09-09T05:51:04.000Z“,
“ticket_code”:9783,
“last_replied”:{
“content”:”Hi,\n\nThanks for your reply.\n\nCould you please share the 200 users license quotation?“,
“date”:”2023-09-09T05:51:04.000Z“,
“src”:”E“,
“id”:”62ba9af49fe2ad21dff999a1“,
“seen”:[]
}
},..]
}
Url: /api/contact/loadreplies/{ticketcode}
Method: GET
To read tickets replies
curl -k -X GET -H “Accesskey-od:{contact accesskey}” ‘{your domain url}/api/contact/loadreplies/9783‘
Response:
“result”:[{
“entity_id”:”58650156ddaed50a3cdb9e31“,
“postedon”:”2023-09-09T04:20:59.000Z“,
“priority”:1,
“reply_count”:6,
“status”:”O“,
“from”:{“id”:”62ba9af49fe2ad21dff999a1″,”name”:”Hemamathi Nagarajan”,”email”:”hemsnila@gmail.com”},
“subject”:”Quotation Request“,
“src”:”E“,
“c_updatedon”:”2023-09-09T04:20:59.000Z“,
“updatedon”:”2023-09-09T05:51:04.000Z“,
“c_inti”:”M“,
“mailbox_id”:”613897cceee88b60b53b5a3b“,
“assignee”:”62ba9af49fe2ad21dff999a1“,
“ticket_code”:9783,
“cc”:[],
“last_replied”:{
“content”:“Hi,\n\nThanks for your reply.\n\nCould you please share the 200 users license quotation?”,
“date”:”2023-09-09T05:51:04.000Z“,
“src”:”E“,
“id”:”62ba9af49fe2ad21dff999a1“,
“seen”:[“62ba9af49fe2ad21dff999a1“]
},
“reply”:[{
“from”:{
“name”:”Hemamathi Nagarajan“,
“email”:”hemsnila@gmail.com“,
“isOp”:false
},
“postedon”:”2023-09-09T04:20:59.000Z“,
“att”:[],
“content”:“Good evening, Hope you are doing well !\n\nPlease send us a quotation for the following.\n\n1 Users – 100\n2 Server Configuration Detail\n\n\nThanks”,
“src”:”E”,
“seen”:[{“id”:“58650157ddaed50a3cdb9e3a”,”readon”:”2023-09-09T05:28:24Z”}]
}…],
“assigneename”:”Hemamathi Nagarajan”
}]
}