Skip to main content
GET
/
account
/
message
/
{message_id}
Get Message
curl --request GET \
  --url https://api.sendpost.io/api/v1/account/message/{message_id} \
  --header 'X-Account-ApiKey: <api-key>'
{
  "messageID": "c486c7e5-4b0b-4ce5-b392-6ac2a453dcb6",
  "accountID": 1837,
  "subAccountID": 46499,
  "ipID": 46,
  "accountIPPoolID": 0,
  "publicIP": "34.196.37.102",
  "localIP": "10.1.0.195",
  "emailType": "googleworkspace",
  "submittedAt": 1766396394503841300,
  "from": {
    "name": "PiedPipers",
    "email": "[email protected]"
  },
  "replyTo": {
    "name": "PiedPipers",
    "email": "[email protected]"
  },
  "to": {
    "name": "Test Recipient",
    "email": "[email protected]",
    "cc": [],
    "bcc": [],
    "customFields": {}
  },
  "headerTo": {
    "name": "Test Recipient",
    "email": "[email protected]",
    "cc": [],
    "bcc": [],
    "customFields": {}
  },
  "headerCc": [],
  "headerBcc": null,
  "attachments": [],
  "groups": [],
  "ipPool": "",
  "headers": {
    "X-SendPost-Mock-Email": "",
    "X-SendPost-Mock-Time-Shift": ""
  },
  "customFields": {},
  "subject": "Test Email from SendPost Java SDK",
  "preText": "",
  "htmlBody": "<h1>Hello from SendPost!</h1><p>This is a test email sent using the SendPost Java SDK from Maven Central.</p>",
  "textBody": "Hello from SendPost! This is a test email sent using the SendPost Java SDK from Maven Central.",
  "ampBody": "",
  "trackOpens": true,
  "trackClicks": true,
  "attempt": 0,
  "webhookEndpoint": "",
  "mxRecords": [
    "alt3.aspmx.l.google.com",
    "alt4.aspmx.l.google.com",
    "alt1.aspmx.l.google.com",
    "alt2.aspmx.l.google.com",
    "aspmx.l.google.com"
  ]
}

Authorizations

X-Account-ApiKey
string
header
required

This api key can be used for all account level operations

Path Parameters

message_id
string
required

The ID of the message to retrieve.

Response

Successful retrieval of the message.

messageID
string

Unique ID for the message.

Example:

"c486c7e5-4b0b-4ce5-b392-6ac2a453dcb6"

accountID
integer

Account ID associated with the message.

Example:

1837

subAccountID
integer

Sub-account ID associated with the message.

Example:

46499

ipID
integer

IP ID used for sending the message.

Example:

46

accountIPPoolID
integer

Account IP Pool ID associated with the message.

Example:

0

publicIP
string

Public IP address used for sending the message.

Example:

"34.196.37.102"

localIP
string

Local IP address used for sending the message.

Example:

"10.1.0.195"

emailType
string

Type of email service used.

Example:

"googleworkspace"

submittedAt
integer

UNIX epoch nano timestamp when message was submitted.

Example:

1766396394503841300

from
object

Object comprising name and email address of the sender

replyTo
object

Object comprising name and email addresses to which email replies will go to

to
object

Recipient object comprising name, email, cc, bcc and customFields

headerTo
object

Header To recipient object comprising name, email, cc, bcc and customFields

headerCc
string[]

List of CC recipients from email headers

Example:
[]
headerBcc
string[] | null

List of BCC recipients from email headers

Example:

null

attachments
string[]

List of attachments

Example:
[]
groups
string[]

List of groups associated with the message

Example:
[]
ipPool
string

IP Pool from which emails will go out. Relevant only for customers on dedicated IP plans.

Example:

""

headers
object

Key-Value pair which are added to every email message being sent and also with webhooks triggered on events such as email delivered, open, click etc. They are useful to identify email, recipient etc. in your internal system

Example:
{
"X-SendPost-Mock-Email": "",
"X-SendPost-Mock-Time-Shift": ""
}
customFields
object

Key-Value pair of custom fields at message level

Example:
{}
subject
string

Email subject line.

Example:

"Test Email from SendPost Java SDK"

preText
string

Text which appears on mobile right after email subject line.

Example:

""

htmlBody
string

HTML email content.

Example:

"<h1>Hello from SendPost!</h1><p>This is a test email sent using the SendPost Java SDK from Maven Central.</p>"

textBody
string

Text email content.

Example:

"Hello from SendPost! This is a test email sent using the SendPost Java SDK from Maven Central."

ampBody
string

AMP email content.

Example:

""

trackOpens
boolean

Indicates if email opens need to be tracked.

Example:

true

trackClicks
boolean

Indicates if email clicks need to be tracked.

Example:

true

attempt
integer

Number of delivery attempts made for the message.

Example:

0

webhookEndpoint
string

Webhook endpoint URL for the message.

Example:

""

mxRecords
string[]

List of MX records for the recipient domain

Example:
[
"alt3.aspmx.l.google.com",
"alt4.aspmx.l.google.com",
"alt1.aspmx.l.google.com",
"alt2.aspmx.l.google.com",
"aspmx.l.google.com"
]