API Key

Signup & Login to ClickDesk. Go to 'Admin Settings' from the top right drop-down menu, click on the API block and copy the API key obtained.

Authentication

This is an HTTPS-only API. Authentication will be performed based on the username (email address) of the user and its API Key.

Email and API key should be passed via HTTP Basic Authentication. Email address as username and their respective API Key as password.

End Points

All API requests should be made to: https://my.clickdesk.com/rest/dev/api/

Status Codes

Code Description
200 Request succeeded
201 The request to POST or PUT a record was successful
400 The request was not formatted correctly
401 Invalid API Key
404 Resource not found
405 Invalid method type
415 Unsupported Media type
500 Server error

Get chats list by email id

REST Method : GET
URL : https://my.clickdesk.com/rest/dev/api/getchats/{visitoremail}
Accept : application/xml or application/json

Returns all past chats (complete chat history) of the visitor

Using curl :

  1. curl -u {username}:{api_key} https://my.clickdesk.com/rest/dev/api/getchats/{visitoremail}

Example Response :

  1. HTTP/1.1 200 OK
  2. Expires: Thu, 01 Jan 1970 00:00:00 GMT
  3. Set-Cookie: JSESSIONID=48YhlWIP3-XiiGziIzJJ_g;Path=/
  4. Content-Type: application/json
  5. Date: Thu, 06 Jun 2013 08:00:25 GMT
  6. Server: Google Frontend
  7. Cache-Control: private
  8. Transfer-Encoding: chunked
  9.  
  10. {
  11. "session": [
  12. {
  13. "agent_id": "Jim",
  14. "bot_id": "skype",
  15. "chat_length": "5",
  16. "chat_type": "proactive",
  17. "closed_by": "visitor",
  18. "duration": "91826",
  19. "email": "jim@pbxplus.com",
  20. "end_time": "1368085501288",
  21. "initiated_chat_type": "broadcast",
  22. "last_messg_rcvd_time": "1368085495429",
  23. "name": "Jim Reyes",
  24. "start_time": "1368085409474",
  25. "status": "complete",
  26. "user_id": "jim@invox.com",
  27. "user_rate": null,
  28. "visitor_info": "{\"region\":\"unknown\",\"os\":\"Windows\",\"plugins\":{},\"flash_installed\":true,\"country_code\":\"IN\",\"url\":\"http://zoipa.com/wp/\",\"city\":\"hyderabad\",\"country\":\"IN\",\"browser_version\":\"Chrome\",\"flash_version\":\"Shockwave Flash 11.6 r602\",\"referrer\":\"\",\"browser\":\"Chrome\",\"longitude\":\"17.385044\",\"latitude\":\"78.486671\"}",
  29. "widget_id": "Default Department (All Agents)",
  30. "chat_history_url": "https://my.clickdesk.com/session.jsp?session_id=1MGUw",
  31. "user_message": "Hello"
  32. },

Get tickets list by email id

REST Method : GET
URL : https://my.clickdesk.com/rest/dev/api/gettickets/{visitoremail}
Accept : application/xml or application/json

Returns the visitor's helpdesk tickets list (history).

Using curl :

  1. curl -u {username}:{api_key} https://my.clickdesk.com/rest/dev/api/gettickets/{visitoremail}


chat icon

Convert visitors to happy customers

Awesome combo of live-chat, voice and video