[POST] Compose a New Email

Description: Compose a new email.

REST Method: POST

URL: /tickets.json/compose

Request

Name Type Required Default Options Notes
developer_api_key String Yes Developer api key
from String Yes Your company's email address
message String Yes (you can choose either message or message_html) Message of the new email
message_html String Yes (you can choose either message or message_html) Message of the new email in HTML format
to String Yes Your customer's email address
cc String No Your customer's email address
bcc String No Your customer's email address
subject String Yes Subject of the new email
user_id Integer Yes Id of the user
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/compose?developer_api_key=[YOUR_DEVELOPER_API_KEY]&from=contact@bornevia.com&to=tjiu.suryanto@bornevia.com&subject=helloworld&message=helloworld&user_id=1'

Response

Response Name Type Notes
Header Status Int 200 - Success
400 - To is null or empty string
400 - Subject is null or empty string
400 - To or cc or bcc is not a valid email format
400 - File attachment doesn't meet the requirements
404 - Company account email not found
404 - User not found
400 - Message and message_html is null or empty string
{
  "id": 279341,
  "subject": "helloworld",
  "status": "Open",
  "priority": "Medium",
  "assigned_user_id": 1,
  "deleted": false,
  "created_at": "2015-11-12T15:38:29.000Z",
  "updated_at": "2015-11-12T15:38:30.000Z",
  "assigned_at": "2015-11-12T15:38:29.000Z"
}
Last updated on 21st Jun 2016