Jump to: navigation, search

AddAttachment

This operation is part of the Email API section of the Web Services API.

Overview

Adds an attachment to the specified email.

Request URL /api/v2/me/emails/{id}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
operationName AddAttachment
documentId documents identity (required)
size document size
name document name
mime document mime type

Sample

Request

POST api/v2/me/emails/0000Na9B26EF003M 
 
{
 "operationName": "AddAttachment", 
 "documentId": "0000Fa92G5HY0J6E"
}

Response

{
  "statusCode": 0
}

Notification

{
   "referenceId": 40,
   "notificationType": "AttachmentAdded",
   "messageType": "EmailStateChangeMessage",
   "email": {
       "body": "HelloSave",
       "from": "GWS@gplus-w2k3-gf80",
       "attachments": [
           {
               "size": 46,
               "mime": "application/octet-stream",
               "id": "0000Fa92G5HY0J6E",
               "uri": "http: //localhost: 8080/api/v2/email/01QG9WAK37H38027/attachments/0000Fa92G5HY0J6E",
               "name": "testfile.dat"
           }
       ],
       "uri": "http: //localhost: 8080/api/v2/email/01QG9WAK37H38027",
       "capabilities": [
           "Cancel",
           "Send",
           "AddComment",
           "AttachUserData",
           "UpdateUserData",
           "DeleteUserData",
           "SetDisposition",
           "SetInFocus",
           "Transfer"
       ],
       "to": [
           "qwerty@gplus-w2k3-gf80"
       ],
       "state": "Composing",
       "id": "01QG9WAK37H38027",
       "subject": "Thisisatest"
   }
}
This page was last edited on October 31, 2023, at 13:29.
Comments or questions about this documentation? Contact us for support!