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.
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.
All API requests should be made to: https://my.clickdesk.com/rest/dev/api/
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 |
application/xml or application/json
Returns all past chats (complete chat history) of the visitor
- curl -u {username}:{api_key} https://my.clickdesk.com/rest/dev/api/getchats/{visitoremail}
- HTTP/1.1 200 OK
- Expires: Thu, 01 Jan 1970 00:00:00 GMT
- Set-Cookie: JSESSIONID=48YhlWIP3-XiiGziIzJJ_g;Path=/
- Content-Type: application/json
- Date: Thu, 06 Jun 2013 08:00:25 GMT
- Server: Google Frontend
- Cache-Control: private
- Transfer-Encoding: chunked
- {
- "session": [
- {
- "agent_id": "Jim",
- "bot_id": "skype",
- "chat_length": "5",
- "chat_type": "proactive",
- "closed_by": "visitor",
- "duration": "91826",
- "email": "jim@pbxplus.com",
- "end_time": "1368085501288",
- "initiated_chat_type": "broadcast",
- "last_messg_rcvd_time": "1368085495429",
- "name": "Jim Reyes",
- "start_time": "1368085409474",
- "status": "complete",
- "user_id": "jim@invox.com",
- "user_rate": null,
- "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\"}",
- "widget_id": "Default Department (All Agents)",
- "chat_history_url": "https://my.clickdesk.com/session.jsp?session_id=1MGUw",
- "user_message": "Hello"
- },
application/xml or application/json
Returns the visitor's helpdesk tickets list (history).
- curl -u {username}:{api_key} https://my.clickdesk.com/rest/dev/api/gettickets/{visitoremail}