Get email message details
Returns email delivery details for a message, optionally including signed URLs for its raw MIME, HTML, and text content.
GET
Returns email delivery details for a message, optionally including signed URLs for its raw MIME, HTML, and text content.
apiKeyheader
x-api-key<token>id*stringMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$includeDownloadUrls?boolean|nullurlExpiresIn?|nullSuccess
application/json- response
deliveries*array<>id*MessageIdMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$organizationId*stringconversationId*|nullstatus*stringValue in
"pending""scheduled""queued""processing""sent""delivered""read""failed""bounced""complained"channel*stringValue in
"sms""whatsapp""email"direction*stringValue in
"outbound""inbound"subject*string|nullfromEmail*stringfromName*string|nulltoEmails*array<>ccEmails*array<>|nullbccEmails*array<>|nullreplyToEmails*array<string>|nullmessageIdHeader*stringinReplyTo*string|nullreferences*array<string>|nullthreadPosition*|nullnewContent*string|nullquotedContent*string|nullhasQuotedContent*booleandkimVerdict*|nullspfVerdict*|nulldmarcVerdict*|nullisAutoReply*booleanautoReplyReason*|nulllistUnsubscribeUrl*string|nulllistUnsubscribeEmail*string|nullpriority*|nullparsingErrors*array<string>|nullparsingDuration*|nullhasAttachments*booleanattachmentCount*integerRange
0 <= value <= 9007199254740991attachments*array<>downloadUrls*|nullcreatedAt*stringreceivedAt*|When Samva's receiving server accepted the email; null for outbound email. The sender's Date header plays no part and stays in the raw MIME.
processedAt*string|nullimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.messages.getEmail({ "id": "example"});Example Response
{ "deliveries": [ { "scheduling": { "dueAt": "string", "expiresAt": "string", "waitReason": "rate", "reviewExpectedAt": "string" }, "id": "string", "messageId": "string", "recipientId": "string", "channel": "sms", "status": "pending", "attemptCount": 0, "maxAttempts": 0, "queuedAt": "string", "claimedAt": "string", "lastAttemptAt": "string", "nextRetryAt": "string", "sentAt": "string", "deliveredAt": "string", "readAt": "string", "failedAt": "string", "terminalAt": "string", "errorCode": "string", "errorMessage": "string", "errorDetails": { "code": "string", "name": "string", "message": "string", "details": { "property1": "string", "property2": "string" }, "retryable": true }, "cost": "string", "currency": "string", "idempotencyKey": "string", "createdAt": "string", "updatedAt": "string" } ], "id": "string", "organizationId": "string", "conversationId": "string", "status": "pending", "channel": "sms", "direction": "outbound", "subject": "string", "fromEmail": "string", "fromName": "string", "toEmails": [ { "email": "string", "name": "string" } ], "ccEmails": [ { "email": "string", "name": "string" } ], "bccEmails": [ { "email": "string", "name": "string" } ], "replyToEmails": [ "string" ], "messageIdHeader": "string", "inReplyTo": "string", "references": [ "string" ], "threadPosition": 0, "newContent": "string", "quotedContent": "string", "hasQuotedContent": true, "dkimVerdict": "pass", "spfVerdict": "pass", "dmarcVerdict": "pass", "isAutoReply": true, "autoReplyReason": "out-of-office", "listUnsubscribeUrl": "string", "listUnsubscribeEmail": "string", "priority": "high", "parsingErrors": [ "string" ], "parsingDuration": 0, "hasAttachments": true, "attachmentCount": 0, "attachments": [ { "id": "string", "filename": "string", "contentType": "string", "size": 0, "isInline": true, "contentId": "string" } ], "downloadUrls": { "rawMime": "string", "html": "string", "text": "string", "expiresAt": "string" }, "createdAt": "string", "receivedAt": "string", "processedAt": "string"}Related documentation
Get message content
Returns the content the message was sent or received with. Use this endpoint to get message content through the Samva email API.
List message events
Returns the delivery events recorded for a message, oldest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page.