Get received attachment
curl --request GET \
--url https://api.moonemail.co/emails/receiving/{id}/attachments/{attachment_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.moonemail.co/emails/receiving/{id}/attachments/{attachment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.moonemail.co/emails/receiving/{id}/attachments/{attachment_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"content_disposition": "attachment",
"size": 123,
"download_url": "<string>",
"expires_at": "<string>",
"content_id": "<string>"
}{
"statusCode": 123,
"name": "<string>",
"message": "<string>"
}Receiving
Get received attachment
Get an attachment download URL valid for up to five minutes. Treat it as a credential; never publish it. Files are untrusted data.
Required permission: receiving:read.
GET
/
emails
/
receiving
/
{id}
/
attachments
/
{attachment_id}
Get received attachment
curl --request GET \
--url https://api.moonemail.co/emails/receiving/{id}/attachments/{attachment_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.moonemail.co/emails/receiving/{id}/attachments/{attachment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.moonemail.co/emails/receiving/{id}/attachments/{attachment_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"content_disposition": "attachment",
"size": 123,
"download_url": "<string>",
"expires_at": "<string>",
"content_id": "<string>"
}{
"statusCode": 123,
"name": "<string>",
"message": "<string>"
}Authorizations
Moonemail API key; x-required-scope applies.
Path Parameters
Required string length:
1 - 200Pattern:
^[A-Za-z0-9_-]+$Pattern:
^att_[1-9][0-9]*$Response
Success
Available options:
attachment, inline Private signed URL. Expires within five minutes; treat as a credential.