using RestSharp;
var options = new RestClientOptions("http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"Email\": {\n \"To\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Cc\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Bcc\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Subject\": \"<string>\",\n \"HTMLBody\": \"<string>\",\n \"From\": {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"Sent\": \"2023-11-07T05:31:56Z\",\n \"Size\": 123,\n \"MessageID\": \"<string>\",\n \"PlainBody\": \"<string>\",\n \"IsSent\": true,\n \"EMailSOInfo\": {\n \"DocumentId\": 123,\n \"AppointmentId\": 123,\n \"ProjectId\": 123,\n \"SaleId\": 123,\n \"Archived\": true,\n \"ArchivedAt\": \"2023-11-07T05:31:56Z\",\n \"ArchivedBy\": 123,\n \"ArchivedDisplayName\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"ServerId\": 123,\n \"ServerIdentifier\": \"<string>\",\n \"Attachments\": [\n {\n \"Description\": \"<string>\",\n \"Filename\": \"<string>\",\n \"Size\": 123,\n \"Type\": \"<string>\",\n \"Encoding\": \"<string>\",\n \"Id\": \"<string>\",\n \"Disposition\": \"<string>\",\n \"IsSafeFileExtension\": true,\n \"Stream\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"CustomHeaderList\": [\n {\n \"Name\": \"<string>\",\n \"Values\": [\n \"<string>\"\n ],\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"FolderName\": \"<string>\",\n \"EmailItemId\": 123,\n \"AccountId\": 123,\n \"ReceivedAt\": \"2023-11-07T05:31:56Z\",\n \"InReplyTo\": {\n \"ServerId\": 123,\n \"ServerIdentifier\": \"<string>\",\n \"MessageId\": \"<string>\",\n \"Subject\": \"<string>\",\n \"From\": {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"To\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Sent\": \"2023-11-07T05:31:56Z\",\n \"Size\": 123,\n \"EMailSOInfo\": {\n \"DocumentId\": 123,\n \"AppointmentId\": 123,\n \"ProjectId\": 123,\n \"SaleId\": 123,\n \"Archived\": true,\n \"ArchivedAt\": \"2023-11-07T05:31:56Z\",\n \"ArchivedBy\": 123,\n \"ArchivedDisplayName\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"RepliedAt\": \"2023-11-07T05:31:56Z\",\n \"HasCalendarData\": true,\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
Email: {
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Cc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Bcc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Subject: '<string>',
HTMLBody: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
Sent: '2023-11-07T05:31:56Z',
Size: 123,
MessageID: '<string>',
PlainBody: '<string>',
IsSent: true,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
ServerId: 123,
ServerIdentifier: '<string>',
Attachments: [
{
Description: '<string>',
Filename: '<string>',
Size: 123,
Type: '<string>',
Encoding: '<string>',
Id: '<string>',
Disposition: '<string>',
IsSafeFileExtension: true,
Stream: 'aSDinaTvuI8gbWludGxpZnk=',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
CustomHeaderList: [
{
Name: '<string>',
Values: ['<string>'],
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
FolderName: '<string>',
EmailItemId: 123,
AccountId: 123,
ReceivedAt: '2023-11-07T05:31:56Z',
InReplyTo: {
ServerId: 123,
ServerIdentifier: '<string>',
MessageId: '<string>',
Subject: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Sent: '2023-11-07T05:31:56Z',
Size: 123,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
RepliedAt: '2023-11-07T05:31:56Z',
HasCalendarData: true,
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
})
};
fetch('http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "56350",
CURLOPT_URL => "http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Email' => [
'To' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Cc' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Bcc' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Subject' => '<string>',
'HTMLBody' => '<string>',
'From' => [
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'Sent' => '2023-11-07T05:31:56Z',
'Size' => 123,
'MessageID' => '<string>',
'PlainBody' => '<string>',
'IsSent' => true,
'EMailSOInfo' => [
'DocumentId' => 123,
'AppointmentId' => 123,
'ProjectId' => 123,
'SaleId' => 123,
'Archived' => true,
'ArchivedAt' => '2023-11-07T05:31:56Z',
'ArchivedBy' => 123,
'ArchivedDisplayName' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'ServerId' => 123,
'ServerIdentifier' => '<string>',
'Attachments' => [
[
'Description' => '<string>',
'Filename' => '<string>',
'Size' => 123,
'Type' => '<string>',
'Encoding' => '<string>',
'Id' => '<string>',
'Disposition' => '<string>',
'IsSafeFileExtension' => true,
'Stream' => 'aSDinaTvuI8gbWludGxpZnk=',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'CustomHeaderList' => [
[
'Name' => '<string>',
'Values' => [
'<string>'
],
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'FolderName' => '<string>',
'EmailItemId' => 123,
'AccountId' => 123,
'ReceivedAt' => '2023-11-07T05:31:56Z',
'InReplyTo' => [
'ServerId' => 123,
'ServerIdentifier' => '<string>',
'MessageId' => '<string>',
'Subject' => '<string>',
'From' => [
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'To' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Sent' => '2023-11-07T05:31:56Z',
'Size' => 123,
'EMailSOInfo' => [
'DocumentId' => 123,
'AppointmentId' => 123,
'ProjectId' => 123,
'SaleId' => 123,
'Archived' => true,
'ArchivedAt' => '2023-11-07T05:31:56Z',
'ArchivedBy' => 123,
'ArchivedDisplayName' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'RepliedAt' => '2023-11-07T05:31:56Z',
'HasCalendarData' => true,
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer"
payload = { "Email": {
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Cc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Bcc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Subject": "<string>",
"HTMLBody": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"Sent": "2023-11-07T05:31:56Z",
"Size": 123,
"MessageID": "<string>",
"PlainBody": "<string>",
"IsSent": True,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": True,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"ServerId": 123,
"ServerIdentifier": "<string>",
"Attachments": [
{
"Description": "<string>",
"Filename": "<string>",
"Size": 123,
"Type": "<string>",
"Encoding": "<string>",
"Id": "<string>",
"Disposition": "<string>",
"IsSafeFileExtension": True,
"Stream": "aSDinaTvuI8gbWludGxpZnk=",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"CustomHeaderList": [
{
"Name": "<string>",
"Values": ["<string>"],
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"FolderName": "<string>",
"EmailItemId": 123,
"AccountId": 123,
"ReceivedAt": "2023-11-07T05:31:56Z",
"InReplyTo": {
"ServerId": 123,
"ServerIdentifier": "<string>",
"MessageId": "<string>",
"Subject": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Sent": "2023-11-07T05:31:56Z",
"Size": 123,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": True,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"RepliedAt": "2023-11-07T05:31:56Z",
"HasCalendarData": True,
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
Email: {
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Cc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Bcc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Subject: '<string>',
HTMLBody: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
Sent: '2023-11-07T05:31:56Z',
Size: 123,
MessageID: '<string>',
PlainBody: '<string>',
IsSent: true,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
ServerId: 123,
ServerIdentifier: '<string>',
Attachments: [
{
Description: '<string>',
Filename: '<string>',
Size: 123,
Type: '<string>',
Encoding: '<string>',
Id: '<string>',
Disposition: '<string>',
IsSafeFileExtension: true,
Stream: 'aSDinaTvuI8gbWludGxpZnk=',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
CustomHeaderList: [
{
Name: '<string>',
Values: ['<string>'],
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
FolderName: '<string>',
EmailItemId: 123,
AccountId: 123,
ReceivedAt: '2023-11-07T05:31:56Z',
InReplyTo: {
ServerId: 123,
ServerIdentifier: '<string>',
MessageId: '<string>',
Subject: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Sent: '2023-11-07T05:31:56Z',
Size: 123,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
RepliedAt: '2023-11-07T05:31:56Z',
HasCalendarData: true,
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
})
};
fetch('http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Cc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Bcc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Subject": "<string>",
"HTMLBody": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"Sent": "2023-11-07T05:31:56Z",
"Size": 123,
"Priority": "NoPriority",
"Flags": "None",
"MessageID": "<string>",
"PlainBody": "<string>",
"IsSent": true,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": true,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"ServerId": 123,
"ServerIdentifier": "<string>",
"Attachments": [
{
"Description": "<string>",
"Filename": "<string>",
"Size": 123,
"Type": "<string>",
"Encoding": "<string>",
"Id": "<string>",
"Disposition": "<string>",
"IsSafeFileExtension": true,
"Stream": "aSDinaTvuI8gbWludGxpZnk=",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"CustomHeaderList": [
{
"Name": "<string>",
"Values": [
"<string>"
],
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"FolderName": "<string>",
"EmailItemId": 123,
"AccountId": 123,
"ReceivedAt": "2023-11-07T05:31:56Z",
"InReplyTo": {
"ServerId": 123,
"ServerIdentifier": "<string>",
"MessageId": "<string>",
"Subject": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Sent": "2023-11-07T05:31:56Z",
"Priority": "NoPriority",
"Flags": "None",
"Size": 123,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": true,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"RepliedAt": "2023-11-07T05:31:56Z",
"HasCalendarData": true,
"CalMethod": "Unknown",
"CalReplyStatus": "Unknown",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}Save To Mail Server
Save the passed e-mail back to the mail server
NsApiSlow threshold: 5000 ms.
using RestSharp;
var options = new RestClientOptions("http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n \"Email\": {\n \"To\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Cc\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Bcc\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Subject\": \"<string>\",\n \"HTMLBody\": \"<string>\",\n \"From\": {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"Sent\": \"2023-11-07T05:31:56Z\",\n \"Size\": 123,\n \"MessageID\": \"<string>\",\n \"PlainBody\": \"<string>\",\n \"IsSent\": true,\n \"EMailSOInfo\": {\n \"DocumentId\": 123,\n \"AppointmentId\": 123,\n \"ProjectId\": 123,\n \"SaleId\": 123,\n \"Archived\": true,\n \"ArchivedAt\": \"2023-11-07T05:31:56Z\",\n \"ArchivedBy\": 123,\n \"ArchivedDisplayName\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"ServerId\": 123,\n \"ServerIdentifier\": \"<string>\",\n \"Attachments\": [\n {\n \"Description\": \"<string>\",\n \"Filename\": \"<string>\",\n \"Size\": 123,\n \"Type\": \"<string>\",\n \"Encoding\": \"<string>\",\n \"Id\": \"<string>\",\n \"Disposition\": \"<string>\",\n \"IsSafeFileExtension\": true,\n \"Stream\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"CustomHeaderList\": [\n {\n \"Name\": \"<string>\",\n \"Values\": [\n \"<string>\"\n ],\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"FolderName\": \"<string>\",\n \"EmailItemId\": 123,\n \"AccountId\": 123,\n \"ReceivedAt\": \"2023-11-07T05:31:56Z\",\n \"InReplyTo\": {\n \"ServerId\": 123,\n \"ServerIdentifier\": \"<string>\",\n \"MessageId\": \"<string>\",\n \"Subject\": \"<string>\",\n \"From\": {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"To\": [\n {\n \"ContactId\": 123,\n \"ContactName\": \"<string>\",\n \"PersonId\": 123,\n \"PersonName\": \"<string>\",\n \"AssociateId\": 123,\n \"Address\": \"<string>\",\n \"EmailId\": 123,\n \"DuplicatePersonIds\": [\n 123\n ],\n \"Name\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n ],\n \"Sent\": \"2023-11-07T05:31:56Z\",\n \"Size\": 123,\n \"EMailSOInfo\": {\n \"DocumentId\": 123,\n \"AppointmentId\": 123,\n \"ProjectId\": 123,\n \"SaleId\": 123,\n \"Archived\": true,\n \"ArchivedAt\": \"2023-11-07T05:31:56Z\",\n \"ArchivedBy\": 123,\n \"ArchivedDisplayName\": \"<string>\",\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n },\n \"RepliedAt\": \"2023-11-07T05:31:56Z\",\n \"HasCalendarData\": true,\n \"TableRight\": {\n \"Mask\": \"<string>\",\n \"Reason\": \"<string>\"\n },\n \"FieldProperties\": {}\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
Email: {
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Cc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Bcc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Subject: '<string>',
HTMLBody: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
Sent: '2023-11-07T05:31:56Z',
Size: 123,
MessageID: '<string>',
PlainBody: '<string>',
IsSent: true,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
ServerId: 123,
ServerIdentifier: '<string>',
Attachments: [
{
Description: '<string>',
Filename: '<string>',
Size: 123,
Type: '<string>',
Encoding: '<string>',
Id: '<string>',
Disposition: '<string>',
IsSafeFileExtension: true,
Stream: 'aSDinaTvuI8gbWludGxpZnk=',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
CustomHeaderList: [
{
Name: '<string>',
Values: ['<string>'],
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
FolderName: '<string>',
EmailItemId: 123,
AccountId: 123,
ReceivedAt: '2023-11-07T05:31:56Z',
InReplyTo: {
ServerId: 123,
ServerIdentifier: '<string>',
MessageId: '<string>',
Subject: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Sent: '2023-11-07T05:31:56Z',
Size: 123,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
RepliedAt: '2023-11-07T05:31:56Z',
HasCalendarData: true,
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
})
};
fetch('http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "56350",
CURLOPT_URL => "http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Email' => [
'To' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Cc' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Bcc' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Subject' => '<string>',
'HTMLBody' => '<string>',
'From' => [
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'Sent' => '2023-11-07T05:31:56Z',
'Size' => 123,
'MessageID' => '<string>',
'PlainBody' => '<string>',
'IsSent' => true,
'EMailSOInfo' => [
'DocumentId' => 123,
'AppointmentId' => 123,
'ProjectId' => 123,
'SaleId' => 123,
'Archived' => true,
'ArchivedAt' => '2023-11-07T05:31:56Z',
'ArchivedBy' => 123,
'ArchivedDisplayName' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'ServerId' => 123,
'ServerIdentifier' => '<string>',
'Attachments' => [
[
'Description' => '<string>',
'Filename' => '<string>',
'Size' => 123,
'Type' => '<string>',
'Encoding' => '<string>',
'Id' => '<string>',
'Disposition' => '<string>',
'IsSafeFileExtension' => true,
'Stream' => 'aSDinaTvuI8gbWludGxpZnk=',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'CustomHeaderList' => [
[
'Name' => '<string>',
'Values' => [
'<string>'
],
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'FolderName' => '<string>',
'EmailItemId' => 123,
'AccountId' => 123,
'ReceivedAt' => '2023-11-07T05:31:56Z',
'InReplyTo' => [
'ServerId' => 123,
'ServerIdentifier' => '<string>',
'MessageId' => '<string>',
'Subject' => '<string>',
'From' => [
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'To' => [
[
'ContactId' => 123,
'ContactName' => '<string>',
'PersonId' => 123,
'PersonName' => '<string>',
'AssociateId' => 123,
'Address' => '<string>',
'EmailId' => 123,
'DuplicatePersonIds' => [
123
],
'Name' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
],
'Sent' => '2023-11-07T05:31:56Z',
'Size' => 123,
'EMailSOInfo' => [
'DocumentId' => 123,
'AppointmentId' => 123,
'ProjectId' => 123,
'SaleId' => 123,
'Archived' => true,
'ArchivedAt' => '2023-11-07T05:31:56Z',
'ArchivedBy' => 123,
'ArchivedDisplayName' => '<string>',
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
],
'RepliedAt' => '2023-11-07T05:31:56Z',
'HasCalendarData' => true,
'TableRight' => [
'Mask' => '<string>',
'Reason' => '<string>'
],
'FieldProperties' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer"
payload = { "Email": {
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Cc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Bcc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Subject": "<string>",
"HTMLBody": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"Sent": "2023-11-07T05:31:56Z",
"Size": 123,
"MessageID": "<string>",
"PlainBody": "<string>",
"IsSent": True,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": True,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"ServerId": 123,
"ServerIdentifier": "<string>",
"Attachments": [
{
"Description": "<string>",
"Filename": "<string>",
"Size": 123,
"Type": "<string>",
"Encoding": "<string>",
"Id": "<string>",
"Disposition": "<string>",
"IsSafeFileExtension": True,
"Stream": "aSDinaTvuI8gbWludGxpZnk=",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"CustomHeaderList": [
{
"Name": "<string>",
"Values": ["<string>"],
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"FolderName": "<string>",
"EmailItemId": 123,
"AccountId": 123,
"ReceivedAt": "2023-11-07T05:31:56Z",
"InReplyTo": {
"ServerId": 123,
"ServerIdentifier": "<string>",
"MessageId": "<string>",
"Subject": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [123],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Sent": "2023-11-07T05:31:56Z",
"Size": 123,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": True,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"RepliedAt": "2023-11-07T05:31:56Z",
"HasCalendarData": True,
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
} }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
Email: {
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Cc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Bcc: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Subject: '<string>',
HTMLBody: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
Sent: '2023-11-07T05:31:56Z',
Size: 123,
MessageID: '<string>',
PlainBody: '<string>',
IsSent: true,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
ServerId: 123,
ServerIdentifier: '<string>',
Attachments: [
{
Description: '<string>',
Filename: '<string>',
Size: 123,
Type: '<string>',
Encoding: '<string>',
Id: '<string>',
Disposition: '<string>',
IsSafeFileExtension: true,
Stream: 'aSDinaTvuI8gbWludGxpZnk=',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
CustomHeaderList: [
{
Name: '<string>',
Values: ['<string>'],
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
FolderName: '<string>',
EmailItemId: 123,
AccountId: 123,
ReceivedAt: '2023-11-07T05:31:56Z',
InReplyTo: {
ServerId: 123,
ServerIdentifier: '<string>',
MessageId: '<string>',
Subject: '<string>',
From: {
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
To: [
{
ContactId: 123,
ContactName: '<string>',
PersonId: 123,
PersonName: '<string>',
AssociateId: 123,
Address: '<string>',
EmailId: 123,
DuplicatePersonIds: [123],
Name: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
],
Sent: '2023-11-07T05:31:56Z',
Size: 123,
EMailSOInfo: {
DocumentId: 123,
AppointmentId: 123,
ProjectId: 123,
SaleId: 123,
Archived: true,
ArchivedAt: '2023-11-07T05:31:56Z',
ArchivedBy: 123,
ArchivedDisplayName: '<string>',
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
},
RepliedAt: '2023-11-07T05:31:56Z',
HasCalendarData: true,
TableRight: {Mask: '<string>', Reason: '<string>'},
FieldProperties: {}
}
})
};
fetch('http://localhost:56350/api/v1/Agents/EMail/SaveToMailServer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Cc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Bcc": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Subject": "<string>",
"HTMLBody": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"Sent": "2023-11-07T05:31:56Z",
"Size": 123,
"Priority": "NoPriority",
"Flags": "None",
"MessageID": "<string>",
"PlainBody": "<string>",
"IsSent": true,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": true,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"ServerId": 123,
"ServerIdentifier": "<string>",
"Attachments": [
{
"Description": "<string>",
"Filename": "<string>",
"Size": 123,
"Type": "<string>",
"Encoding": "<string>",
"Id": "<string>",
"Disposition": "<string>",
"IsSafeFileExtension": true,
"Stream": "aSDinaTvuI8gbWludGxpZnk=",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"CustomHeaderList": [
{
"Name": "<string>",
"Values": [
"<string>"
],
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"FolderName": "<string>",
"EmailItemId": 123,
"AccountId": 123,
"ReceivedAt": "2023-11-07T05:31:56Z",
"InReplyTo": {
"ServerId": 123,
"ServerIdentifier": "<string>",
"MessageId": "<string>",
"Subject": "<string>",
"From": {
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"To": [
{
"ContactId": 123,
"ContactName": "<string>",
"PersonId": 123,
"PersonName": "<string>",
"AssociateId": 123,
"Address": "<string>",
"EmailId": 123,
"DuplicatePersonIds": [
123
],
"Name": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}
],
"Sent": "2023-11-07T05:31:56Z",
"Priority": "NoPriority",
"Flags": "None",
"Size": 123,
"EMailSOInfo": {
"DocumentId": 123,
"AppointmentId": 123,
"ProjectId": 123,
"SaleId": 123,
"Archived": true,
"ArchivedAt": "2023-11-07T05:31:56Z",
"ArchivedBy": 123,
"ArchivedDisplayName": "<string>",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
},
"RepliedAt": "2023-11-07T05:31:56Z",
"HasCalendarData": true,
"CalMethod": "Unknown",
"CalReplyStatus": "Unknown",
"TableRight": {
"Mask": "<string>",
"Reason": "<string>"
},
"FieldProperties": {}
}Headers
Convert string references and multi-language values into a specified language (iso2) code.
Convert string references and multi-language values into a specified language (iso2) code. Overrides Accept-Language value.
Number, date formatting in a specified culture (iso2 language) code. Partially overrides SO-Language/Accept-Language value. Ignored if no Language set.
Specify the timezone code that you would like date/time responses converted to.
The application token that identifies the partner app. Used when calling Online WebAPI from a server.
Query Parameters
Optional comma separated list of properties to include in the result. Other fields are then nulled out to reduce payload size: "Name,department,category". Default = show all fields.
Body
SaveToMailServer: Save the passed e-mail back to the mail server
All information about an e-mail Carrier object for EMailEntity. Services for the EMailEntity Carrier is available from the EMail Agent.
Show child attributes
Show child attributes
Response
OK
All information about an e-mail Carrier object for EMailEntity. Services for the EMailEntity Carrier is available from the EMail Agent.
To recipients of e-mail
Show child attributes
Show child attributes
Cc recipients of e-mail
Show child attributes
Show child attributes
Bcc recipient of e-mail
Show child attributes
Show child attributes
Subject of the e-mail
Body formatted in HTML
Carrier object for EMailAddress. Services for the EMailAddress Carrier is available from the EMail Agent.
Show child attributes
Show child attributes
When was the e-mail sent
Total size of the e-mail
Importance of the e-mail
NoPriority, Highest, High, Normal, Low, Lowest Flag status of this mail (unread, replied, deleted )
None, Seen, Deleted, Recent, Flagged, Draft, Answered Unique id of e-mails
Body formatted in plain text
Is this a sent e-mail (not new)
Glue between SuperOffice data and an e-mail. Carrier object for EMailSOInfo. Services for the EMailSOInfo Carrier is available from the EMail Agent.
Show child attributes
Show child attributes
Unique id for the e-mail on the server
Server identifier of this email item (GraphApi uses string Id's)
Show child attributes
Show child attributes
Non standard e-mail headers
Show child attributes
Show child attributes
Name of folder the e-mail belongs in
Primary key
Account Id
Received date time
Limited information about one e-mail. Carrier object for EMailEnvelope. Services for the EMailEnvelope Carrier is available from the EMail Agent.
Show child attributes
Show child attributes
When this email was replied at
If this email contains exactly one iCal appointment
Method stored in the associated iCal appointment. Indicates if the iCal data is a reply, counter proposal etc.
Unknown, Add, Cancel, Counter, DeclineCounter, Publish, Refresh, Reply, Request Reply status stored in calendar data for the ical method is REPLY
Unknown, Accepted, Declined, Tentative Wraps a table right together with an explanatory reason. Code can indicate why access is restricted.
Show child attributes
Show child attributes
Field property dictionary mapping field names to field access rights.
Show child attributes
Show child attributes