POST {who}/messages/{messageId}/attachments?language={language}

Add an attachment to an existing message defined by the message id.

Request Information

Parameters

NameDescriptionAdditional information
who Identifies whose attachments to upload (who the user is acting as/on behalf of). Valid values are "my", or an organization number of an organization the user can represent, or "r"<Reportee.ReporteeId>, where the identified reportee may be a person or organization.

Define this parameter in the request URI.

messageId Id of the message for which the attachment should be added.

Define this parameter in the request URI.

attachment Information about and the content of the attachment being added.

Define this parameter in the request body.

language Language type

Define this parameter in the request URI.

Request body formats

application/hal+xml

Sample:
<resource rel="attachment">
    <FileName>string example 87</FileName>
    <AttachmentType>string example 89</AttachmentType>
    <Data>base64 encoded</Data>
</resource>
                

application/hal+json

Sample:
{
    "FileName": "string example 43",
    "AttachmentType": "string example 43",
    "Data": "base64 encoded"
}
                

Response body formats

application/hal+xml

No sample

application/hal+json

Sample:
{
    "Secret": "h43ofah43fuha43hfjlrkeahfa98743gh",
    "UserName": "enterpriseuser123",
    "Created": "2021-07-06T11:06:30.9786158+02:00",
    "OwnerOrgNo": "910494392"
}