POST api/Tickets/NewMessage

Creates a new message (comment or email reply) in the Ticket.

Request Information

URI Parameters

None.

Body Parameters

NewMessagePost
NameDescriptionTypeAdditional information
TicketREF

(Required) The reference ID of the ticket to which add a new message. You can use TicketId instead.

string

None.

TicketId

(Required) The unique ID of the ticket to which add a new message. You can use TicketREF instead.

integer

None.

Message

(Required) The message body

string

None.

Html

If true, sent message is in HTML format

boolean

None.

IsPrivate

If true, the message is marked as a private one. Private messages is visible only for Operators and can be send by Operators only.

boolean

None.

IsMobileDevice

If true, the message has been sent from a mobile device (phone, tablet)

boolean

None.

Attachments

The list of attachments

Collection of NewAttachment

None.

SendViaOutboundEmail

If true, the message will be sent as an email reply.

boolean

None.

SendViaOutboundEmailFrom

Existing mailbox account. If SendViaOutboundEmail is true, this is required.

string

None.

SendViaOutboundEmailCc

(Optional) CC (carbon copy) emails.

Collection of string

None.

SendViaOutboundEmailBcc

(Optional) BCC (blind carbon copy) emails.

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "TicketREF": "INC-000047",
  "TicketId": null,
  "Message": "Can I meet you afternoon?",
  "Html": false,
  "IsPrivate": false,
  "IsMobileDevice": false,
  "Attachments": null,
  "SendViaOutboundEmail": true,
  "SendViaOutboundEmailFrom": "company@domain.com",
  "SendViaOutboundEmailCc": [
    "jane.doe@domain.com",
    "jack.more@domain.com"
  ],
  "SendViaOutboundEmailBcc": null
}

application/xml, text/xml

Sample:
<NewMessagePost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <Attachments xmlns:d2p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures" i:nil="true" />
  <Html>false</Html>
  <IsMobileDevice>false</IsMobileDevice>
  <IsPrivate>false</IsPrivate>
  <Message>Can I meet you afternoon?</Message>
  <SendViaOutboundEmail>true</SendViaOutboundEmail>
  <SendViaOutboundEmailBcc xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <SendViaOutboundEmailCc xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>jane.doe@domain.com</d2p1:string>
    <d2p1:string>jack.more@domain.com</d2p1:string>
  </SendViaOutboundEmailCc>
  <SendViaOutboundEmailFrom>company@domain.com</SendViaOutboundEmailFrom>
  <TicketId i:nil="true" />
  <TicketREF>INC-000047</TicketREF>
</NewMessagePost>

Response Information

Resource Description

HttpStatusCode 200 OK or 400 BadRequest with Message. If the response code is 200, you can find ticket message id in body.

NewMessageResult
NameDescriptionTypeAdditional information
TicketMessageId

The unique identifier of the newly created ticket message

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "TicketMessageId": 123
}

application/xml, text/xml

Sample:
<NewMessageResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Results">
  <TicketMessageId>123</TicketMessageId>
</NewMessageResult>