Get single attachment
Get message single attachment by id.
get
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Path parameters
sandbox_idinteger · int64 · min: 1RequiredExample:
Unique sandbox ID
4015message_idinteger · int64 · min: 1RequiredExample:
Unique message ID
427attachment_idinteger · int64 · min: 1RequiredExample:
Unique attachment ID
1591Responses
200
Returns attachment details and download path.
application/json
idintegerOptional
message_idintegerOptional
filenamestringOptional
attachment_typestringOptional
content_typestringOptional
content_idstring · nullableOptional
transfer_encodingstring · nullableOptional
attachment_sizeintegerOptional
created_atstringOptional
updated_atstringOptional
attachment_human_sizestringOptional
download_pathstringOptional
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
404
Returns not found error message
application/json
get/api/sandboxes/{sandbox_id}/messages/{message_id}/attachments/{attachment_id}
curl -X GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/attachments/{attachment_id} \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"id": 70,
"message_id": 460,
"filename": "test.csv",
"attachment_type": "inline",
"content_type": "plain/text",
"content_id": null,
"transfer_encoding": null,
"attachment_size": 0,
"created_at": "2022-06-02T19:25:55.687Z",
"updated_at": "2022-06-02T19:25:55.687Z",
"attachment_human_size": "0 Bytes",
"download_path": "/api/accounts/3838/sandboxes/4401/messages/460/attachments/70/download"
}Last updated
Was this helpful?

