Skip to main content
GET
/
emails
/
attachments
/
{attachment_id}
Get attachment metadata
curl --request GET \
  --url https://smtp.sendmux.ai/api/v1/emails/attachments/{attachment_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://smtp.sendmux.ai/api/v1/emails/attachments/{attachment_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://smtp.sendmux.ai/api/v1/emails/attachments/{attachment_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://smtp.sendmux.ai/api/v1/emails/attachments/{attachment_id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
{
  "ok": true,
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "data": {
    "attachment_id": "att_tz4a98xxat96iws9zmbrgj3a",
    "filename": "analysis.pdf",
    "content_type": "application/pdf",
    "size_bytes": 20480,
    "expires_at": "2026-07-07T08:15:00.000Z"
  }
}
{
  "ok": false,
  "error": {
    "code": "validation_error",
    "message": "<string>",
    "retryable": true,
    "param": "<string>",
    "doc_url": "<string>",
    "errors": [
      {
        "field": "to.email",
        "code": "invalid_string",
        "message": "<string>"
      }
    ]
  },
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}
{
  "ok": false,
  "error": {
    "code": "validation_error",
    "message": "<string>",
    "retryable": true,
    "param": "<string>",
    "doc_url": "<string>",
    "errors": [
      {
        "field": "to.email",
        "code": "invalid_string",
        "message": "<string>"
      }
    ]
  },
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}
{
  "ok": false,
  "error": {
    "code": "validation_error",
    "message": "<string>",
    "retryable": true,
    "param": "<string>",
    "doc_url": "<string>",
    "errors": [
      {
        "field": "to.email",
        "code": "invalid_string",
        "message": "<string>"
      }
    ]
  },
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}
{
  "ok": false,
  "error": {
    "code": "validation_error",
    "message": "<string>",
    "retryable": true,
    "param": "<string>",
    "doc_url": "<string>",
    "errors": [
      {
        "field": "to.email",
        "code": "invalid_string",
        "message": "<string>"
      }
    ]
  },
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}
{
  "ok": false,
  "error": {
    "code": "validation_error",
    "message": "<string>",
    "retryable": true,
    "param": "<string>",
    "doc_url": "<string>",
    "errors": [
      {
        "field": "to.email",
        "code": "invalid_string",
        "message": "<string>"
      }
    ]
  },
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Authorizations

Authorization
string
header
required

Sendmux API key (smx_...)

Path Parameters

attachment_id
string
required

Temporary attachment ID returned by an upload endpoint.

Pattern: ^att_[a-z0-9]{24}$

Response

Attachment metadata

ok
enum<boolean>
required
Available options:
true
meta
object
required
data
object
required