POST Agents/EMail/SaveDraft
Some tooltip text!
• 6 minutes to read
• 6 minutes to read
POST /api/v1/Agents/EMail/SaveDraft
Save the Email entity to the drafts folder
Online Restricted: ## The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.
Query String Parameters
Parameter Name | Type | Description |
---|---|---|
$select | string | 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. |
POST /api/v1/Agents/EMail/SaveDraft?$select=name,department,category/id
Request Headers
Parameter Name | Description |
---|---|
Authorization | Supports 'Basic', 'SoTicket' and 'Bearer' schemes, depending on installation type. |
X-XSRF-TOKEN | If not using Authorization header, you must provide XSRF value from cookie or hidden input field |
Content-Type | Content-type of the request body: application/json , text/json , application/xml , text/xml , application/x-www-form-urlencoded , application/json-patch+json , application/merge-patch+json |
Accept | Content-type(s) you would like the response in: application/json , text/json , application/xml , text/xml , application/json-patch+json , application/merge-patch+json |
Accept-Language | Convert string references and multi-language values into a specified language (iso2) code. |
SO-Language | Convert string references and multi-language values into a specified language (iso2) code. Overrides Accept-Language value. |
SO-Culture | Number, date formatting in a specified culture (iso2 language) code. Partially overrides SO-Language/Accept-Language value. Ignored if no Language set. |
SO-TimeZone | Specify the timezone code that you would like date/time responses converted to. |
SO-AppToken | The application token that identifies the partner app. Used when calling Online WebAPI from a server. |
Request Body: request
Entity
Property Name | Type | Description |
---|---|---|
Entity | EMailEntity | All information about an e-mail |
Response:
OK
Response | Description |
---|---|
200 | OK |
Response body: EMailEntity
Property Name | Type | Description |
---|---|---|
To | array | To recipients of e-mail |
Cc | array | Cc recipients of e-mail |
Bcc | array | Bcc recipient of e-mail |
Subject | string | Subject of the e-mail |
HTMLBody | string | Body formatted in HTML |
From | EMailAddress | Who did the e-mail originate from |
Sent | date-time | When was the e-mail sent |
Size | int32 | Total size of the e-mail |
Priority | string | Importance of the e-mail |
Flags | string | Flag status of this mail (unread, replied, deleted ) |
MessageID | string | Unique id of e-mails |
PlainBody | string | Body formatted in plain text |
IsSent | bool | Is this a sent e-mail (not new) |
EMailSOInfo | EMailSOInfo | Glue between SuperOffice data and an e-mail. |
ServerId | int32 | Unique id for the e-mail on the server |
Attachments | array | |
CustomHeaderList | array | Non standard e-mail headers |
FolderName | string | Name of folder the e-mail belongs in |
EmailItemId | int32 | Primary key |
AccountId | int32 | Account Id |
ReceivedAt | date-time | Received date time |
InReplyTo | EMailEnvelope | The envelope of the email this email is a reply to, if it exists |
RepliedAt | date-time | When this email was replied at |
HasCalendarData | bool | If this email contains exactly one iCal appointment |
CalMethod | string | Method stored in the associated iCal appointment. Indicates if the iCal data is a reply, counter proposal etc. |
CalReplyStatus | string | Reply status stored in calendar data for the ical method is REPLY |
TableRight | TableRight | The carrier's table right |
FieldProperties | object | Field property dictionary mapping field names to field access rights. |
Sample request
POST /api/v1/Agents/EMail/SaveDraft
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: en
Content-Type: application/json; charset=utf-8
{
"Entity": null
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"To": [
{
"ContactId": 111,
"ContactName": "O'Conner-Brekke",
"PersonId": 600,
"PersonName": "Hagenes Inc and Sons",
"AssociateId": 557,
"Address": "rerum",
"EmailId": 410,
"DuplicatePersonIds": [
819,
675
],
"Name": "Herzog-Stehr",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 302
}
}
}
],
"Cc": [
{
"ContactId": 894,
"ContactName": "Wilkinson LLC",
"PersonId": 122,
"PersonName": "Towne, Jast and Kuvalis",
"AssociateId": 943,
"Address": "similique",
"EmailId": 474,
"DuplicatePersonIds": [
440,
564
],
"Name": "Orn-Schmeler",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 501
}
}
}
],
"Bcc": [
{
"ContactId": 62,
"ContactName": "Ritchie, Ratke and Gulgowski",
"PersonId": 663,
"PersonName": "Kuhn LLC",
"AssociateId": 592,
"Address": "quis",
"EmailId": 450,
"DuplicatePersonIds": [
964,
131
],
"Name": "Shanahan, Lueilwitz and Flatley",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 628
}
}
}
],
"Subject": "maxime",
"HTMLBody": "sit",
"From": null,
"Sent": "2012-02-25T03:45:23.389207+01:00",
"Size": 5,
"Priority": "High",
"Flags": "Answered",
"MessageID": "unde",
"PlainBody": "voluptas",
"IsSent": true,
"EMailSOInfo": null,
"ServerId": 108,
"Attachments": [
{
"Description": "Fundamental exuding groupware",
"Filename": "asperiores",
"Size": 59,
"Type": "laborum",
"Encoding": "sapiente",
"Id": "facere",
"Disposition": "ab",
"IsSafeFileExtension": true,
"Stream": "GIF89....File contents as raw bytes...",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 354
}
}
}
],
"CustomHeaderList": [
{
"Name": "Haag, Sipes and Kris",
"Values": [
"harum",
"dolores"
],
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 42
}
}
},
{
"Name": "Haag, Sipes and Kris",
"Values": [
"harum",
"dolores"
],
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 42
}
}
}
],
"FolderName": "Lebsack Inc and Sons",
"EmailItemId": 566,
"AccountId": 114,
"ReceivedAt": "2017-07-22T03:45:23.389207+02:00",
"InReplyTo": null,
"RepliedAt": "2018-06-10T03:45:23.389207+02:00",
"HasCalendarData": true,
"CalMethod": "Add",
"CalReplyStatus": "Accepted",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 480
}
}
}