Copy a message attachment
Copies one of a received message's attachments into the organization's media and returns it as a draft attachment (`mediaId`), so a draft can carry it.
POST
Copies one of a received message's attachments into the organization's media and returns it as a draft attachment (mediaId), so a draft can carry it. A draft that forwards a message saves each original attachment this way.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$messageId*stringMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$attachmentId*stringMatch
^att_[0-9a-hjkmnp-tv-z]{16,24}$MailboxCopiedAttachment
application/json- response
filename*stringcontent?string|nullmediaId?|nullcontentType*stringsize*integerRange
0 < value <= 26214400import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.mailboxes.copyMessageAttachment({
"id": "example",
"messageId": "example",
"attachmentId": "example"
});Example Response
{
"filename": "string",
"content": "string",
"mediaId": "string",
"contentType": "string",
"size": 1
}