Skip to content

Get an e-mail

GET
https://api.getsitecontrol.com/v1/sites/{site_id}/emails/{email_id}
curl --request GET \
--url https://api.getsitecontrol.com/v1/sites/1/emails/1 \
--header 'Authorization: Bearer <token>'

The current content of one e-mail: subject, preview text, the sender, the header and footer, and the message as blocks top to bottom, each with its text in markdown and its links, images, coupon codes, timers and product feeds. It is the e-mail as it is now, not a copy of what each recipient got: merge tags stay unfilled, store products are filled in at sending, and the sender follows the site’s sending domains of today. Colours, sizes and spacing are not included; fields that do not apply to a block are left out. Automation e-mails are steps[].email_id of get_automation.

FieldDescription
site_id
required
Site Id
integer
email_id
required
Email Id

E-mail id from a broadcast or an automation

integer

E-mail id from a broadcast or an automation

Successful Response

Media typeapplication/json
Email
object
FieldDescription
id
required
Id
integer
name
Name

Internal name, not shown to recipients

string
nullable
subject
required
Subject
string
preview_text
Preview Text

The text inbox previews show next to the subject

string
nullable
sender
required
Sender
object
FieldDescription
name
Name

The From display name; null when the e-mail has none

string
nullable
address
Address

The From address the e-mail goes out with: the one set in the editor when its domain is verified for the site, the default Getsitecontrol address otherwise

string
nullable
reply_to
Reply To

Where replies go; null when replies go to address

string
nullable
domain
Domain

The site’s sending domain of the address set in the editor; null when that address is not on one of them

object
FieldDescription
id
required
Id

Id in list_email_domains

integer
domain
required
Domain
string
is_verified
required
Is Verified

True: e-mails go out from this domain; false: from the default address until it is verified

boolean
state
required

Where verification stands

string
Allowed values: verified not_started pending recheck_required
header
object
FieldDescription
logo
object
FieldDescription
src
Src
string
nullable
url
Url

Where a click on the logo leads

string
nullable
menu
required
Menu
Array<object>
EmailLink

Leaves out the fields that do not apply, also when nested in a response.

object
FieldDescription
text
required
Text
string
url
Url
string
nullable
blocks
required
Blocks

The message, top to bottom

Array<object>
EmailBlock

Leaves out the fields that do not apply, also when nested in a response.

object
FieldDescription
ref
required
Ref

Position in the e-mail: b3 is the third element of the message, b3.1 the first block inside the banner b3. Spacers are skipped, so numbers may have gaps

string
kind
required

The block type; it says which other fields the block has

string
Allowed values: heading paragraph quote list divider button image coupon countdown animated_text slideshow before_after products cart_items banner html other
text
Text

Markdown: bold, italic and links kept; merge tags like {{siteName}} stay as written and are filled per recipient

string
nullable
level
Level
integer
nullable
style
Style
string
nullable
is_ordered
Is Ordered
boolean
nullable
items
Items

List items or animated phrases in markdown; for manual products, links to the products

Array<string>
nullable
url
Url

Where a click leads

string
nullable
action
Action

What a button does: type (OpenUrl, ContinueCheckout, …) and its settings

object
src
Src
string
nullable
alt
Alt
string
nullable
code
Code

The coupon code; null for unique codes made per recipient

string
nullable
mode
Mode

Coupon: text, shopify-static or shopify-unique; countdown: delay or fixed; animated_text: scroll, slide or animate; products: dynamic or manual

string
nullable
prefix
Prefix

Prefix of unique codes

string
nullable
seconds
Seconds
integer
nullable
until
Until

Deadline, ISO 8601

string
nullable
timezone
Timezone

IANA time zone of until

string
nullable
feed
Feed

Store products filled in at sending: bestsellers, newest, on-sale, collection, recommendations

string
nullable
count
Count
integer
nullable
collection_id
Collection Id
string
nullable
intent
Intent

What recommendations pick: related, complementary, customer

string
nullable
button_text
Button Text
string
nullable
images
Images
Array<string>
nullable
before
Before

Image address

string
nullable
after
After

Image address

string
nullable
labels
Labels
object
FieldDescription
key
additional properties
string
blocks
Array<object> recursive
footer
object
FieldDescription
details
Details

Markdown: bold, italic and links kept; merge tags like {{siteName}} stay as written and are filled per recipient

string
nullable
menu
required
Menu
Array<object>
EmailLink

Leaves out the fields that do not apply, also when nested in a response.

object
FieldDescription
text
required
Text
string
url
Url
string
nullable
social
required
Social
Array<object>
EmailSocial

Leaves out the fields that do not apply, also when nested in a response.

object
FieldDescription
network
required
Network

Facebook, Instagram, X, …

string
url
Url
string
nullable
unsubscribe
Unsubscribe

Text of the unsubscribe link; its address is set at sending

string
nullable

Example

{
"sender": {
"domain": {
"state": "verified"
}
},
"blocks": [
{
"kind": "heading"
}
]
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Unsupported GSC-Version

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Missing or invalid API key or access token

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

WWW-Authenticate
string

Authentication scheme: Bearer

Access denied

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Media typeapplication/problem+json

site_not_found: no such site in your account; email_not_found: the site has no e-mail with this id, or it was deleted

Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Validation failed

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Rate limited

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Retry-After
integer

Seconds until the bucket refills

Temporarily unavailable; retry later

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds