Developer's Guide

Learn how to configure and use our open APIs,
to freely integrate Deskero with any other software solution!

Tickets

List

Get a paginated list of tickets

GET https://api.deskero.com/ticket/list

Headers

Header Value
Authorization Bearer {{bearer}}
Accept application/json
clientId {{clientId}}

URL parameters

Field name Value Required Default
page int value for page to show false 1

Example request

$ curl https://api.deskero.com/ticket/list \ 
	-v \
	-H "Accept: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef"

Example response

{
	"ticket": {
		"totalRecords": 50,
		"recordsPerPage": 25,
		"previousQuery": null,
		"nextQuery": "https://api.deskero.com/ticket/list?page=2",
		"records": [
			See ticket detail
		]
	}
}

Detail

Show a single ticket

GET https://api.deskero.com/ticket/{{ticketId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Accept application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticket/5277c21ce4b0d3bd74d43841 \ 
	-v \
	-H "Accept: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef"

Example response

{
	"id": "5277c21ce4b0d3bd74d43841",
	"number": "2015/2013",
	"subject": "Problem with on-line order!",
	"description": "Hello, I've just ordered from your on-line catalogue the complete hardback collection on Little Nemo in Slumberland, by Winsor McCay. Despite being available on your inventory, I keep getting an \"item not found\" error, and can't complete my order. Is there something you can do?",
	"insertDate": 1383580226312,
	"managedDate": 1383580226397,
	"closedDate": null,
	"priority": 0,
	"assignedTo": {
		See agent detail
	},
	"cc": [],
	"openedBy": {
		See customer detail
	},
	"numberOfReplies": 1,
	"replies": [
		See reply detail
	],
	"tags": [
		See tag detail
	],
	"attachedDocuments": [
		See attached document detail
	],
	"status": {
		See ticket status detail
	},
	"type": {
		See ticket type detail
	},
	"area": {
		See ticket area detail
	},
	"group": {
		See ticket group detail
	},
	"memo": null,
	"source": {
		See ticket source detail
	},
	"customFields": [
		See custom field detail
	],
	"ticketNotes": [
		See ticket note detail
	],
	"tweetId": null,
	"tweetType": null,
	"facebookId": null,
	"facebookType": null,
	"linkedinId": null,
	"linkedinType": null,
	"googlePlusId": null,
	"googlePlusType": null,
	"youtubeId": null,
	"youtubeType": null,
	"messageUniqueId": null,
	"customPortalId": null,
	"toReply": false,
	"toReplyCustomer": false
}

Reply

Add a reply to the current ticket

PUT https://api.deskero.com/ticket/reply/{{ticketId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticket/reply/5277c21ce4b0d3bd74d43841 \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X PUT \
	-d '{ 
		"text": "Problem solved!",
		"replyFromOperator": {
			"id": "52132fffe4b006e6048bd013"
		},
		"attachedDocuments": [ 
			{ 
				"documentName": "doc.txt",
				"documentType": "text/plain",
				"documentBlob":"70726F7661"
			}
		]
	}'

Example response

Reply id

{
	"id": "51e56642e4b0f36e576a8f74"
}

Create

Create a new ticket

POST https://api.deskero.com/ticket/insert

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticket/insert \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X POST \
	-d '{
		"subject": "Ticket from API",
		"description": "Ticket description",
		"openedBy": {
			"id": "5215e339e4b0d4899b61c7e6"
		},
		"type": {
			"id": "50913dd4c2e67797f82e5bb2"
		},
		"attachedDocuments": [
			{
				"documentName": "doc.txt",
				"documentType": "text/plain",
				"documentBlob":"70726F7661"
			}
		],
		"replies": [
			{
				"text": "Problem solved!",
				"replyDate" : "1382455565000",
				"replyFromOperator": {
					"id": "52132fffe4b006e6048bd013"
				},
				"attachedDocuments": [
					{
						"documentName": "doc.txt",
						"documentType": "text/plain",
						"documentBlob":"70726F7661"
					}
				]
			}
		]
	}'

Example response

Created ticket id

{
	"id": "5277c21ce4b0d3bd74d43841"
}

Update

Update a ticket

PUT https://api.deskero.com/ticket/update/{{ticketId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticket/update/5277c21ce4b0d3bd74d43841 \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X PUT \
	-d '{
		"subject": "Ticket from API",
		"description": "Ticket description",
		"openedBy": {
			"id": "5215e339e4b0d4899b61c7e6"
		},
		"type": {
			"id": "50913dd4c2e67797f82e5bb2"
		},
		"attachedDocuments": [
			{
				"documentName": "doc.txt",
				"documentType": "text/plain",
				"documentBlob":"70726F7661"
			}
		],
		"replies": [
			{
				"text": "Problem solved!",
				"replyDate" : "1382455565000",
				"replyFromOperator": {
					"id": "52132fffe4b006e6048bd013"
				},
				"attachedDocuments": [
					{
						"documentName": "doc.txt",
						"documentType": "text/plain",
						"documentBlob":"70726F7661"
					}
				]
			}
		]
	}'

Example response

Updated ticket id

{
	"id": "5277c21ce4b0d3bd74d43841"
}

Delete

Delete a ticket

DELETE https://api.deskero.com/ticket/delete/{{ticketId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticket/delete/5277c21ce4b0d3bd74d43841 \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X DELETE

Example response

Deleted ticket id

{
	"id": "5277c21ce4b0d3bd74d43841"
}

Add note

Add a note to the current ticket

PUT https://api.deskero.com/ticket/addNote/{{ticketId}}

Headers

Header Value
Authorization Bearer {{bearer}}
Content-Type application/json
clientId {{clientId}}

Example request

$ curl https://api.deskero.com/ticket/addNote/5277c21ce4b0d3bd74d43841 \ 
	-v \
	-H "Content-type: application/json" \
	-H "Authorization: Bearer 58cfg61g-1585-5c72-g35f-7fe76893ed2f" \
	-H "clientId: 51f01687e4b094c81d7b8bcdellef" \
	-X PUT \
	-d '{ 
		 "note": "Resolve this!",
		 "insertBy": "52132fffe4b006e6048bd013",
		 "assignedTo": "52132fffe4b006e6048bd013",
		 "date": 1388144315000,
		 "remindMe": 1388144315000
	}'

Example response

Note id

{
	"id": "52bd6d4803647785e90abb34"
}

Fields

Field name Description
id auto-generated ticket id
number auto-generated ticket number, number/year
subject subject
description complete text
insertDate insert date timestamp
managedDate last edit/reply/change status date timestamp
closedDate close date timestamp
priority int priority value, 0 or 1
assignedTo agent who ticket must be assigned, see agent detail
cc list of cc agent, see agent detail
openedBy customer who opened the ticket, see customer detail
numberOfReplies int replies number
replies list of replies, see reply detail
tags list of tags, see tag detail
attachedDocuments list of attached documents, see attached document detail
status ticket status (opened, closed, on hold, solved), see status detail
type ticket type, see ticket type detail
area ticket area, see ticket area detail
group ticket group, see ticket group detail
source ticket source, see source detail
memo text note
customFields list of custom fields, see custom field detail
tweetId tweet id, if reply comes from twitter
tweetType mention or direct message
facebookId post id, if reply comes from facebook
facebookType post or private message
linkedinId feed id, if reply comes from linkedin
linkedinType ?
googlePlusId activity id, if reply comes from google plus
googlePlusType ?
youtubeId video id, if reply comes from youtube
youtubeType ?
messageUniqueId mail unique id, if reply comes from email
customPortalId id of custom portal
toReply agent have to reply to this ticket
toReplyCustomer customer have to reply to this ticket