Email attachment copy from existing email

Hi, we're writing a browser-based solution to create a new email based on an existing email and it's attachments. After creating the new email we use an existing email via https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-conversations-emails--conversationId--messages-draft-attachments-copy:

Trying this and many body variants (which all return the same):
POST /api/v2/conversations/emails/2cf1d8f5-c1ce-44d5-9253-d9f171595bc2/messages/draft/attachments/copy HTTP/1.1
Host: api.mypurecloud.com
Authorization: Bearer *******************
Content-Type: application/json

{"attachments":[{"attachmentId":"444766c0-59b6-4d9b-8c18-c051fc549267","name":"example.txt"}],"sourceMessage":{"id":"377f7f33-f0db-4e43-9d2d-394a7e7cdd27"}}

Returns: 404. Message: Not Found

What is the proper way to use this API? We don't want to use uploads/postino-attachments or anything that requires a server-based application.

I think I've found the issue. The conversation id has to be for the existing conversation, not a new one.
The sourceMessage id is the entity id in
/api/v2/conversations/emails/{conversationId}/messages request. So this looks to be for adding old attachments to a reconnect or similar.
This unfortunately doesn't fix our problem. GC has a limitation of 30 days for reconnects and the customer needs a 90 day limit. We were hoping to create a new email and copy the old attachments across.

Goodday Cameron,

How are you doing?
I work for the company Cloudoe and we provide this functionality"out of the box" in our AMI - Advanced eMail Interface services. I show you the example in this video. Uploading

Let me know if you're interested in discussing this further -:slight_smile:

regards, Rogier - ami@cloudoe.nl

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.