Skip to main content
POST
/
api
/
email
/
messages
/
attachments
/
rehydrate
Rehydrate email message attachments from provider
curl --request POST \
  --url https://your-instance.example.com/api/email/messages/attachments/rehydrate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messageId
string
required

Tether Message _id whose attachments should be re-downloaded from the provider.

Response

Attachments rehydrated

Returned after POST /api/email/messages/attachments/rehydrate re-uploads provider-side attachments into R2. Includes the updated message and the count of re-uploaded attachments.

message
object
required

Updated email message document with refreshed attachment URLs.

rehydrated
integer
required

Number of attachments re-uploaded.