---
title: "Get an e-mail"
method: GET
path: "/v1/sites/{site_id}/emails/{email_id}"
tags: ["Emails"]
---

# Get an e-mail

`GET /v1/sites/{site_id}/emails/{email_id}`

## Request

- Base URL: `https://api.getsitecontrol.com`
- URL: `https://api.getsitecontrol.com/v1/sites/{site_id}/emails/{email_id}`
- Auth: HTTP bearer

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`.

## Path parameters

- `site_id` integer, required
- `email_id` integer, required: E-mail id from a broadcast or an automation

## Response `200`

Successful Response

- Email
  - `id` integer, required
  - `name` string, nullable: Internal name, not shown to recipients
  - `subject` string, required
  - `preview_text` string, nullable: The text inbox previews show next to the subject
  - `sender` Sender, required
    - `name` string, nullable: The From display name; null when the e-mail has none
    - `address` string, nullable: 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
    - `reply_to` string, nullable: Where replies go; null when replies go to `address`
    - `domain` SenderDomain
      - `id` integer, required: Id in `list_email_domains`
      - `domain` string, required
      - `is_verified` boolean, required: true: e-mails go out from this domain; false: from the default address until it is verified
      - `state` 'verified' | 'not_started' | 'pending' | 'recheck_required', required: Where verification of the domain stands. `verified`: the records were found and emails go out from the domain. `not_started`: the domain has no records to publish yet, verification was never started. `pending`: the records are known but not found yet, either not published or not seen yet, and are checked again automatically. `recheck_required`: automatic checks gave up, two weeks after the domain was added.
  - `header` EmailHeader: Leaves out the fields that do not apply, also when nested in a response.
    - `logo` EmailLogo: Leaves out the fields that do not apply, also when nested in a response.
      - `src` string, nullable
      - `url` string, nullable: Where a click on the logo leads
    - `menu` EmailLink[], required
      - `text` string, required
      - `url` string, nullable
  - `blocks` EmailBlock[], required: The message, top to bottom
    - `ref` string, required: 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
    - `kind` 'heading' | 'paragraph' | 'quote' | 'list' | 'divider' | 'button' | 'image' | 'coupon' | 'countdown' | 'animated_text' | 'slideshow' | 'before_after' | 'products' | 'cart_items' | 'banner' | 'html' | 'other', required: heading: `level` 1-3, `text`. paragraph: `text`, `style` normal or note (small print). quote: `text`. list: `is_ordered`, `items`. divider: a line. button: `text`, `url`, `action`. image: `src`, `alt`, `url`. coupon: `code`, `mode`, `prefix`. countdown: `mode` delay (`seconds` from opening) or fixed (`until` in `timezone`). animated_text: `items`, `mode`. slideshow: fixed `images` or a store `feed` of `count`. before_after: `before`, `after`, `labels`. products: product cards, `mode` dynamic (a `feed` of `count`) or manual (`items`). cart_items: the recipient's cart. banner: nested `blocks` on a background. html: a whole e-mail of custom HTML, its `text`. other: a block this API does not describe yet.
    - `text` string, nullable: Markdown: bold, italic and links kept; merge tags like {{siteName}} stay as written and are filled per recipient
    - `level` integer, nullable
    - `style` string, nullable
    - `is_ordered` boolean, nullable
    - `items` string[], nullable: List items or animated phrases in markdown; for manual products, links to the products
    - `url` string, nullable: Where a click leads
    - `action` object, nullable: What a button does: `type` (OpenUrl, ContinueCheckout, ...) and its settings
    - `src` string, nullable
    - `alt` string, nullable
    - `code` string, nullable: The coupon code; null for unique codes made per recipient
    - `mode` string, nullable: coupon: text, shopify-static or shopify-unique; countdown: delay or fixed; animated_text: scroll, slide or animate; products: dynamic or manual
    - `prefix` string, nullable: Prefix of unique codes
    - `seconds` integer, nullable
    - `until` string, nullable: Deadline, ISO 8601
    - `timezone` string, nullable: IANA time zone of `until`
    - `feed` string, nullable: Store products filled in at sending: bestsellers, newest, on-sale, collection, recommendations
    - `count` integer, nullable
    - `collection_id` string, nullable
    - `intent` string, nullable: What recommendations pick: related, complementary, customer
    - `button_text` string, nullable
    - `images` string[], nullable
    - `before` string, nullable: Image address
    - `after` string, nullable: Image address
    - `labels` object, nullable
    - `blocks` EmailBlock[], nullable
  - `footer` EmailFooter: Leaves out the fields that do not apply, also when nested in a response.
    - `details` string, nullable: Markdown: bold, italic and links kept; merge tags like {{siteName}} stay as written and are filled per recipient
    - `menu` EmailLink[], required
      - `text` string, required
      - `url` string, nullable
    - `social` EmailSocial[], required
      - `network` string, required: Facebook, Instagram, X, ...
      - `url` string, nullable
  - `unsubscribe` string, nullable: Text of the unsubscribe link; its address is set at sending

## Other responses

- `400`: Unsupported GSC-Version
- `401`: Missing or invalid API key or access token
- `403`: Access denied
- `404`: `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
- `422`: Validation failed
- `429`: Rate limited
- `503`: Temporarily unavailable; retry later

---

[API](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api.md) - [All operations](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/revisions/084fcad80e75?raw)
