[POST] Reply to a Ticket

Description: Reply to a ticket based on id.

REST Method: POST

URL: /tickets.json/{id}/posts

Request

Name Type Required Default Options Notes
developer_api_key String Yes Developer api key
message String Yes Content of the reply
to String Yes (except live chat) Recipients (email, separated by a comma)
cc String No Cc recipients (email, separated by a comma)
bcc String No Bcc recipients (email, separated by a comma)
immediately_closed Boolean No false true/false Parameter for immediately close ticket after replying
file_ids Array No Array of ids file which want to be attached

Using curl

curl -X POST -d 'file_ids[]=4233-b39khp.jpg' 'https://api.bornevia.com/tickets.json/122515/posts?developer_api_key=[YOUR_DEVELOPER_API_KEY]&message=hello+world&to=tjiu.suryanto%40bornevia.com&immediately_closed=true'

Response

Response Name Type Notes
Header Status Int 200 - Success
404 - Ticket not found
400 - Message is null or empty string
400 - File attachment doesn't meet the requirements
500 - Authorization problem with twitter/facebook account
500 - You don't have privilege to reply to this ticket
500 - Server error
{
  "id": 583345,
  "ticket_id": 122515,
  "channel": "email",
  "subject": "hello world",
  "name": "Bornevia",
  "sender": 
    {
      "email": "contact@bornevia.com",
      "name":"Bornevia"
    },
  "receivers": [
    {
      "name":"Tjiu Suryanto",
      "email": "tjiu.suryanto@bornevia.com"
    }
  ],
  "message": "hello world",
  "message_html": "<html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /></head><body bgcolor=\"#FFFFFF\" text=\"#000000\">hello world<small><br></small> </body> </html>",
  "files": [
    {
      "size": "465518",
      "type": "image/jpeg",
      "file_name": "monopoly.jpg",
      "file_id": "4233-b39khp.jpgmonopoly.jpg"
    }
  ],
  "contact": {
    "id": 3,
    "name": "Bornevia",
    "created_at": "2015-03-02T09:28:00.000Z",
    "updated_at": "2015-03-02T09:28:00.000Z",
  },
  "replied": true,
  "created_at": "2015-10-26T07:14:37.000Z",
  "updated_at": "2015-10-26T07:14:37.000Z"
}
Last updated on 21st Jun 2016