For the complete documentation index, see llms.txt. This page is also available as Markdown.

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: 1Required

Unique sandbox ID

Example: 4015
message_idinteger · int64 · min: 1Required

Unique message ID

Example: 427
attachment_idinteger · int64 · min: 1Required

Unique attachment ID

Example: 1591
Responses
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
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?