Rehydrate email message attachments from provider
Re-downloads attachment bytes for an email message from the provider and re-uploads them to R2 storage. Used when the stored signed URL expired or the attachment was never persisted locally.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/email/messages/attachments/rehydrate" \ -H "Content-Type: application/json" \ -d '{ "messageId": "665f1a0c0e0a4b001a2c9f60" }'{ "message": { "_id": "665f1a0c0e0a4b001a2c9f60", "conversationId": "665f1a0c0e0a4b001a2c9f70", "channelType": "email", "body": "Attached the signed lease for review.", "attachments": [ { "url": "https://r2.tetherai.ca/org-64a1b/email/lease.pdf?signature=...", "contentType": "application/pdf", "size": 184320, "filename": "lease.pdf" } ] }, "rehydrated": 1}