Get Email
Retrieve the status and details of a single email send.
GET /api/v1/emails/:id
Returns a single email record by ID. Authenticate with an X-API-Key header.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The email ID returned from Send Email |
Response
Returns 200 OK with an email object:
| Field | Type | Description |
|---|---|---|
id | string | Unique email ID |
status | string | "queued", "sent", or "failed" |
from | string | Sender address |
to | string | Primary recipient address |
subject | string | Subject line |
created_at | string | ISO 8601 timestamp |
{
"email": {
"id": "em_01hx...",
"status": "sent",
"from": "noreply@yourdomain.com",
"to": "user@example.com",
"subject": "Your order has shipped",
"created_at": "2024-01-15T10:30:00Z"
}
}Code examples
curl https://api.smail.dev/api/v1/emails/em_01hx... \
-H "X-API-Key: sk_live_..."const { email } = await smail.emails.get("em_01hx...");
console.log("Status:", email.status);email, err := client.Emails.Get(ctx, "em_01hx...")
fmt.Println("Status:", email.Status)Error responses
| Status | Error | Description |
|---|---|---|
401 | unauthorized | Missing or invalid API key |
404 | not found | Email ID does not exist or belongs to another account |