POST restapi/personal/messages/send/v1
Sends a MessageToSend to recipients.
The client should use the search endpoint to get personIds in order to fill the To and Bcc fields of a message.
ReplyToMessageId is optional and should be used when replying to another message.
Request Information
URI Parameters
None.
Body Parameters
The messagecontainer
Itslearning.RestApi.Entities.MessageToSendName | Description | Type | Additional information |
---|---|---|---|
ToPersonIds |
PersonIds in the To field |
Collection of integer |
None. |
BccPersonIds |
PersonIds in the Bcc field |
Collection of integer |
None. |
ReplyToMessageId |
If set, the message is a reply to this MessageId |
integer |
None. |
ForwardToMessageId |
If set, the message is a forward of this MessageId |
integer |
None. |
Subject |
The subject of the message |
string |
None. |
Text |
The text of the message |
string |
None. |
Request Formats
application/json, text/json
Sample:
{ "ToPersonIds": [ 1, 2 ], "BccPersonIds": [ 1, 2 ], "ReplyToMessageId": 1, "ForwardToMessageId": 1, "Subject": "sample string 1", "Text": "sample string 2" }
application/xml, text/xml
Sample:
<MessageToSend xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities"> <BccPersonIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:int>1</d2p1:int> <d2p1:int>2</d2p1:int> </BccPersonIds> <ForwardToMessageId>1</ForwardToMessageId> <ReplyToMessageId>1</ReplyToMessageId> <Subject>sample string 1</Subject> <Text>sample string 2</Text> <ToPersonIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:int>1</d2p1:int> <d2p1:int>2</d2p1:int> </ToPersonIds> </MessageToSend>
application/x-www-form-urlencoded
Sample:
No sample available
Response Information
Resource Description
If ok, will return created, and a locationheader in response pointing to the sent message
System.Net.Http.HttpResponseMessageName | Description | Type | Additional information |
---|---|---|---|
Version | System.Version |
None. |
|
Content | System.Net.Http.HttpContent |
None. |
|
StatusCode | System.Net.HttpStatusCode |
None. |
|
ReasonPhrase | string |
None. |
|
Headers | Collection of Object |
None. |
|
RequestMessage | System.Net.Http.HttpRequestMessage |
None. |
|
IsSuccessStatusCode | boolean |
None. |