Skip to main content
GET
/
account
/
message
/
{message_id}
Retrieve a specific message
curl --request GET \
  --url https://api.sendpost.io/api/v1/account/message/{message_id} \
  --header 'X-Account-ApiKey: <api-key>'
{
  "id": "4d9c5148-63fc-4999-99ea-fc997b0a24e2",
  "submittedAt": 1588760624008835300,
  "from": {
    "name": "PiedPipers",
    "email": "team@piedpiper.com"
  },
  "replyTo": {
    "name": "PiedPipers",
    "email": "team@piedpiper.com"
  },
  "to": [
    {
      "name": "Peter Gregory",
      "email": "peter@hooli.com",
      "customFields": "{\"Company\": \"Hooli\"}"
    }
  ],
  "headers": "{\"X-Campaign-Id\": \"User onboarding\"}",
  "subject": "Welcome to Pied Piper :) + 1 quick question",
  "preText": "Congrats and get some Pied Piper cred inside",
  "htmlBody": "Thanks for joining Pied Piper {{.FirstName}}.Pied Piper has changed many landscapes. Compression. Data. The Internet",
  "textBody": "Thanks for joining Pied Piper {{.FirstName}}.Pied Piper has changed many landscapes. Compression. Data. The Internet",
  "ippool": "transactional-piedpiper",
  "trackOpens": true,
  "trackClicks": true
}

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.

id
string

Unique ID for the message.

Example:

"4d9c5148-63fc-4999-99ea-fc997b0a24e2"

submittedAt
integer

UNIX epoch nano timestamp when message was submitted.

Example:

1588760624008835300

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[]

List of objects comprising name, email and customFields of the recipients

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 emai, recipient etc. in your internal system

Example:

"{\"X-Campaign-Id\": \"User onboarding\"}"

subject
string

Email subject line.

Example:

"Welcome to Pied Piper :) + 1 quick question"

preText
string

Text which appears on mobile right after email subject line.

Example:

"Congrats and get some Pied Piper cred inside"

htmlBody
string

HTML email content.

Example:

"Thanks for joining Pied Piper {{.FirstName}}.Pied Piper has changed many landscapes. Compression. Data. The Internet"

textBody
string

Text email content.

Example:

"Thanks for joining Pied Piper {{.FirstName}}.Pied Piper has changed many landscapes. Compression. Data. The Internet"

ippool
string

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

Example:

"transactional-piedpiper"

trackOpens
boolean

Indicates if email opens need to be tracked.

Example:

true

trackClicks
boolean

Indicates if email clicks need to be tracked.

Example:

true

I