# Get Email Campaign by ID

GET https://services.leadconnectorhq.com/emails/locations/{locationId}/campaigns/emails/{campaignId}

Get a single email campaign by its ID. Pass `includeContent=true` to get the current `editorContent` (version A). `abVersions` lists its A/B versions B, C, ... Status lifecycle: `draft` (created, editable) → Schedule Campaign → `scheduled` (waiting for `sendAt` or the next batch) → `processing` (sending) → `sent`. RSS campaigns have no `scheduled` state: while active, including between feed checks, they report `processing` or the status of their latest send. `failed` = sending errored. Pause Email Campaign: `scheduled`/`processing` → `paused`; Resume Email Campaign: `paused` → `processing`. Cancel Email Campaign: `scheduled`/`processing`/`paused` → `cancelled`. `draft`, `paused` and `cancelled` campaigns can be (re)scheduled with Schedule Campaign. `archived` = archived campaign (any underlying status).

How an A/B test works (follow these steps in order): 
1. Version A is the campaign itself. Create it with Create Email Campaign and edit it with Update Email Campaign. 
2. Versions B, C, ... are stored inside the same campaign, not as separate campaigns or templates. Create or edit each one with Upsert A/B Variation (`index` 1 = B, 2 = C, ...; create them in order). Never create another campaign or template to make a version. Versions do not show in the campaign list, and the builder only shows them once the test is scheduled. 
3. Check the versions before sending: Get Email Campaign lists them in `abVersions` (with each `documentId`); Validate Email Campaign checks every version (issues carry `variationIndex`); Preview Email Campaign and Test Send Email Campaign take `variationIndex` to show or test-send one version. Use these to read a version; Upsert A/B Variation creates the version when it is missing. 
4. Start the test with Schedule Campaign `abTestConfig`: `testType=emailContent` with `variations[index].documentId` from `abVersions` (index 0 = version A, no documentId needed), or `testType=subjectLine` with one `subject` per version. Without `abTestConfig` the campaign sends version A only, and versions B, C, ... are never sent. The test group must give every version at least 10 contacts (see `abTestConfig.testSize`); otherwise Schedule Campaign returns 400.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `emails/campaigns.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | Yes | Location ID |
| `campaignId` | string | Yes | Campaign ID |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `includeContent` | boolean | No | Set to `true` to include the current `editorContent` (HTML string or design-editor JSON) in the response. Use before editing content so changes are applied to the latest version. |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/emails/locations/{locationId}/campaigns/emails/{campaignId}": {
      "get": {
        "summary": "Get Email Campaign by ID",
        "operationId": "getEmailCampaignById",
        "description": "Get a single email campaign by its ID. Pass `includeContent=true` to get the current `editorContent` (version A). `abVersions` lists its A/B versions B, C, ... Status lifecycle: `draft` (created, editable) → Schedule Campaign → `scheduled` (waiting for `sendAt` or the next batch) → `processing` (sending) → `sent`. RSS campaigns have no `scheduled` state: while active, including between feed checks, they report `processing` or the status of their latest send. `failed` = sending errored. Pause Email Campaign: `scheduled`/`processing` → `paused`; Resume Email Campaign: `paused` → `processing`. Cancel Email Campaign: `scheduled`/`processing`/`paused` → `cancelled`. `draft`, `paused` and `cancelled` campaigns can be (re)scheduled with Schedule Campaign. `archived` = archived campaign (any underlying status).\n\nHow an A/B test works (follow these steps in order): \n1. Version A is the campaign itself. Create it with Create Email Campaign and edit it with Update Email Campaign. \n2. Versions B, C, ... are stored inside the same campaign, not as separate campaigns or templates. Create or edit each one with Upsert A/B Variation (`index` 1 = B, 2 = C, ...; create them in order). Never create another campaign or template to make a version. Versions do not show in the campaign list, and the builder only shows them once the test is scheduled. \n3. Check the versions before sending: Get Email Campaign lists them in `abVersions` (with each `documentId`); Validate Email Campaign checks every version (issues carry `variationIndex`); Preview Email Campaign and Test Send Email Campaign take `variationIndex` to show or test-send one version. Use these to read a version; Upsert A/B Variation creates the version when it is missing. \n4. Start the test with Schedule Campaign `abTestConfig`: `testType=emailContent` with `variations[index].documentId` from `abVersions` (index 0 = version A, no documentId needed), or `testType=subjectLine` with one `subject` per version. Without `abTestConfig` the campaign sends version A only, and versions B, C, ... are never sent. The test group must give every version at least 10 contacts (see `abTestConfig.testSize`); otherwise Schedule Campaign returns 400.",
        "parameters": [
          {
            "name": "locationId",
            "required": true,
            "in": "path",
            "description": "Location ID",
            "schema": {
              "example": "ve9EPM428h8vShlRW1KT",
              "type": "string"
            }
          },
          {
            "name": "campaignId",
            "required": true,
            "in": "path",
            "description": "Campaign ID",
            "schema": {
              "example": "67f15c2ae99226d5bcccb8f3",
              "type": "string"
            }
          },
          {
            "name": "includeContent",
            "required": false,
            "in": "query",
            "description": "Set to `true` to include the current `editorContent` (HTML string or design-editor JSON) in the response. Use before editing content so changes are applied to the latest version.",
            "schema": {
              "default": false,
              "example": true,
              "type": "boolean"
            }
          },
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetEmailCampaignPublicV2ResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "403": {
            "description": "The token does not have access to this location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidLocationDTO"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - rate limit exceeded; retry after a short delay"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Location-Access": [
              "emails/campaigns.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "GetEmailCampaignPublicV2ResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Campaign ID",
            "example": "67f15c2ae99226d5bcccb8f3"
          },
          "source": {
            "type": "string",
            "description": "Source of the campaign",
            "example": "email-campaign"
          },
          "sourceId": {
            "type": "string",
            "description": "Source ID of the campaign",
            "example": "bulkRequest_abc123"
          },
          "name": {
            "type": "string",
            "description": "Campaign name",
            "example": "February Newsletter"
          },
          "status": {
            "type": "string",
            "description": "Campaign status",
            "example": "sent",
            "enum": [
              "all",
              "sent",
              "failed",
              "archived",
              "draft",
              "processing",
              "scheduled",
              "cancelled",
              "paused"
            ]
          },
          "campaignType": {
            "type": "string",
            "description": "Campaign delivery type",
            "example": "bulk-email"
          },
          "campaignCategory": {
            "type": "string",
            "description": "Campaign category",
            "example": "normal"
          },
          "variations": {
            "description": "AB test variation identifiers (available only for AB test campaigns)",
            "example": [
              {
                "sourceId": "9MhVcU7dTdLI7XOU1Vdt",
                "isWinner": true
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sourceId": {
                  "type": "string",
                  "description": "Variation source ID for stats lookup",
                  "example": "9MhVcU7dTdLI7XOU1Vdt"
                },
                "isWinner": {
                  "type": "boolean",
                  "description": "Whether this is the winning variation",
                  "example": true
                }
              },
              "required": [
                "sourceId",
                "isWinner"
              ],
              "title": "EmailCampaignVariationPublicV2Dto"
            }
          },
          "abVersions": {
            "description": "A/B versions after version A (the campaign itself), made with Upsert A/B Variation. Present before the test is scheduled; omitted when the campaign has none.",
            "example": [
              {
                "variationIndex": 1,
                "version": "B",
                "documentId": "67f15c2ae99226d5bcccb8f6"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "variationIndex": {
                  "type": "number",
                  "description": "Version position: 1 = version B, 2 = version C, ...",
                  "example": 1
                },
                "version": {
                  "type": "string",
                  "description": "Version letter",
                  "example": "B"
                },
                "documentId": {
                  "type": "string",
                  "description": "Document holding this version’s content (email-content tests). Pass it as `abTestConfig.variations[variationIndex].documentId` in Schedule Campaign.",
                  "example": "67f15c2ae99226d5bcccb8f6"
                },
                "subject": {
                  "type": "string",
                  "description": "This version’s subject (subject-line tests)",
                  "example": "Last chance: 25% off"
                }
              },
              "required": [
                "variationIndex",
                "version"
              ],
              "title": "EmailCampaignAbVersionPublicV3Dto"
            }
          },
          "editorType": {
            "type": "string",
            "description": "Original editor type the campaign was created with",
            "enum": [
              "html",
              "builder",
              "text"
            ],
            "example": "html"
          },
          "isPlainText": {
            "type": "boolean",
            "description": "Whether the campaign uses plain text",
            "example": false
          },
          "editorContentUrl": {
            "type": "string",
            "description": "URL to fetch the rendered campaign content as HTML. Issue a GET against this URL to retrieve the body.",
            "example": "https://storage.googleapis.com/email-templates/abc123.html"
          },
          "editorContent": {
            "description": "Current editor content, returned only when `includeContent=true`. A string (HTML or plain text) when editorType is `html` or `text`; the design-editor JSON (`elements`, `attrs`, `templateSettings`) when editorType is `builder`. Same shape the Update endpoint accepts, so it can be edited and sent back.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "elements": {
                    "description": "Layout tree: `mj-section` > `mj-column` > leaf elements. Design-editor (`builder`) JSON. `elements` is the layout tree: `mj-section` > `mj-column` > leaf elements. Every node has a unique `id` and a `tagName`. `attrs` is a flat map keyed by node `id` (one entry for every node in the tree, sections and columns included): `{ tagName, content, attributes: [{ name, default, unit? }] }`. `content` holds the text/HTML of leaf elements such as `mj-text` and `mj-button`. Each attribute is `{ name, default, unit? }`: `default` is the value, and sizes are a number plus `unit` (`px` or `%`), e.g. `{ name: \"font-size\", default: 16, unit: \"px\" }`. Padding is split into `padding-top`, `padding-right`, `padding-bottom` and `padding-left` with `enable-padding` set to `true`; the `padding` shorthand and inline `style` are not read by the editor. Send the full attribute set below for every element, changing only the values you need. When an element is selected in the editor, every listed attribute missing from the JSON is written in with the default shown here, so a partial list changes the design (background, padding, font) on first click. Text and image backgrounds use `container-background-color`; section and button backgrounds use `background-color`. Element attributes and the editor defaults: `mj-section`: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, background-color=#ffffff, background-url=\"\", background-size=auto, background-repeat=repeat, full-width=false, text-align=center, border-radius=0px, border-width=0px, border-color=\"\". `mj-column`: enable-padding=true, padding-top=0px, padding-right=0px, padding-bottom=0px, padding-left=0px, is-unstacked=false. `mj-text`: enable-padding=true, padding-top=12px, padding-right=24px, padding-bottom=12px, padding-left=24px, font-family=arial, helvetica, sans-serif, font-size=14px, line-height=1.5, container-background-color=\"\". `mj-image`: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, src=https://..., alt=\"\", href=\"\", width=null, height=null, align=center, border-radius=0px, container-background-color=\"\". `mj-button`: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, background-color=#00a4bd, color=#ffffff, font-family=Ubuntu, Helvetica, Arial, sans-serif, font-size=14px, align=center, border-radius=6px, border-width=0px, border-color=#00a4bd, redirectAction=url, url=\"\". `mj-divider`: enable-padding=true, padding-top=10px, padding-right=20px, padding-bottom=10px, padding-left=20px, border-width=2px, border-color=#99acc2, border-style=solid, width=100%, align=center. `mj-spacer`: height=20px, container-background-color=\"\". Buttons are `mj-button` elements (text in `content`, colors and link in `attributes`). `mj-text` content is edited as rich text and keeps only paragraphs, headings `<h1>`-`<h6>`, `text-align`, `<span style>` font/size/color, `<strong>`, `<em>`, `<u>`, `<s>`, links `<a href>`, lists and `<br>`; other markup (a link styled as a button with background or padding, tables, `<div>`, block styles) renders in the email but the editor drops it on edit, so the canvas shows something different from what is sent. Images: `mj-image` needs `src` set to a public https URL of the image (upload a file first with the Medias API and use its URL); without `src` the editor shows a placeholder. Set `alt` for accessibility and `href` to make the image a link. Leave `width` and `height` as `null` for the natural size (capped to the column) or set a number with `unit: \"px\"`; never omit them or send `\"\"`. `templateSettings` holds template-wide theme settings as lists of `{ name, default, unit? }` grouped by `body` (width, background-color, body-color, border, background image), `button`, `divider`, `text` (fonts, line-height, link styles) and `header` (`customCss`). To keep the current theme, send back the `templateSettings` that Get returned. Text fonts: inside `mj-text` content set `font-family`, `font-size` and `color` on a `<span style=\"...\">` around the text (e.g. `<h1><span style=\"font-family: georgia, palatino, serif; font-size: 32px\">Title</span></h1>`); the editor toolbar reads fonts only from these spans, so styles on `<h1>`/`<p>` themselves show as the default font and size. Use one of these exact `font-family` values: `arial, helvetica, sans-serif`, `helvetica, arial, sans-serif`, `verdana, geneva, sans-serif`, `georgia, palatino, serif`, `'times new roman', times, serif`, `'trebuchet ms', geneva, sans-serif`, `'arial black', sans-serif`, `'andale mono', monospace`, `Ubuntu, Helvetica, Arial, sans-serif`. Google fonts: use `'Font Name', <fallback from the list above>` (quotes only when the name has a space) and list every Google font used in `templateSettings.text` as `{ name: \"custom-fonts\", default: \"Font One;Font Two\" }`; fonts not listed there are not loaded and fall back. Brand-board fonts: use `'Brand Font Name', <fallback>` and list their brand font ids in `{ name: \"brand-custom-fonts\", default: \"id1;id2\" }`. Keep both entries when sending back `templateSettings`. Supported leaf tags: `mj-text`, `mj-image`, `mj-logo`, `mj-button`, `mj-divider`, `mj-spacer`, `mj-social`, `mj-video`, `mj-raw`, `mj-footer`, `mj-accordion`, `mj-carousel`, `mj-countdown-timer`, `mj-form`, `mj-product`, `mj-shopping-cart`, `mj-review-link`, `mj-rss-header`, `mj-rss-item`, `mj-preview-url`. For tags not listed above, copy an existing element of that tag from a Get response. Buttons link through `redirectAction` (`url`, `mail`, `telephone`, `sms`, `skype`, `other`, `file`) plus the attribute it names, e.g. `{ name: \"redirectAction\", default: \"url\" }` with `{ name: \"url\", default: \"https://...\" }`; `href` alone renders no link. Nodes without an `attrs` entry are skipped when rendering. Merge fields are Handlebars: `{{contact.first_name}}`, a fallback is `{{default contact.first_name \"there\"}}`, a condition is `{{#if contact.city}}...{{/if}}`. Liquid filters such as `{{contact.first_name | default: \"there\"}}` are not supported and block the send.",
                    "example": [
                      {
                        "id": "mj-section-1",
                        "tagName": "mj-section",
                        "children": [
                          {
                            "id": "mj-column-1",
                            "tagName": "mj-column",
                            "children": [
                              {
                                "id": "mj-image-1",
                                "tagName": "mj-image"
                              },
                              {
                                "id": "mj-text-1",
                                "tagName": "mj-text"
                              },
                              {
                                "id": "mj-button-1",
                                "tagName": "mj-button"
                              }
                            ]
                          }
                        ]
                      }
                    ],
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Element ID",
                          "example": "mj-text-123"
                        },
                        "tagName": {
                          "type": "string",
                          "description": "Tag name",
                          "example": "mj-text"
                        },
                        "children": {
                          "type": "array",
                          "description": "Child elements, each with the same shape: `{ id, tagName, children? }`",
                          "items": {
                            "type": "object"
                          },
                          "example": [
                            {
                              "id": "mj-column-1",
                              "tagName": "mj-column"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "tagName"
                      ],
                      "title": "BuilderElementNodePublicV2Dto"
                    }
                  },
                  "attrs": {
                    "type": "object",
                    "description": "Attributes map keyed by element ID. Every node in `elements` needs an entry.",
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "tagName": {
                          "type": "string",
                          "description": "Tag name: `mj-section`, `mj-column` or a leaf tag (mj-text, mj-image, mj-logo, mj-button, mj-divider, mj-spacer, mj-social, mj-video, mj-raw, mj-footer, mj-accordion, mj-carousel, mj-countdown-timer, mj-form, mj-product, mj-shopping-cart, mj-review-link, mj-rss-header, mj-rss-item, mj-preview-url)",
                          "example": "mj-text"
                        },
                        "attributes": {
                          "description": "Element attributes",
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Attribute name",
                                "example": "padding"
                              },
                              "default": {
                                "type": "object",
                                "description": "Attribute default value",
                                "example": "10px"
                              },
                              "unit": {
                                "type": "string",
                                "description": "Attribute unit",
                                "example": "px"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "title": "BuilderAttributePublicV2Dto"
                          }
                        },
                        "content": {
                          "type": "string",
                          "description": "Element content",
                          "example": "Hello world"
                        },
                        "customFlags": {
                          "description": "Custom flags",
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "layoutId": {
                                  "type": "object",
                                  "description": "Layout ID",
                                  "example": "hero-layout"
                                },
                                "theme": {
                                  "type": "string",
                                  "description": "Theme name",
                                  "example": "clean"
                                },
                                "socialElementType": {
                                  "type": "string",
                                  "enum": [
                                    "icon",
                                    "icon-text",
                                    "text"
                                  ],
                                  "description": "Social element rendering type"
                                }
                              },
                              "title": "BuilderCustomFlagsPublicV2Dto"
                            }
                          ]
                        }
                      },
                      "required": [
                        "tagName",
                        "attributes"
                      ],
                      "title": "BuilderNodeAttrsPublicV2Dto"
                    },
                    "example": {
                      "mj-section-1": {
                        "tagName": "mj-section",
                        "attributes": [
                          {
                            "name": "enable-padding",
                            "default": true
                          },
                          {
                            "name": "padding-top",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "padding-right",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "padding-bottom",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "padding-left",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "background-color",
                            "default": "#fdf6ec"
                          },
                          {
                            "name": "background-url",
                            "default": ""
                          },
                          {
                            "name": "background-size",
                            "default": "auto"
                          },
                          {
                            "name": "background-repeat",
                            "default": "repeat"
                          },
                          {
                            "name": "full-width",
                            "default": false
                          },
                          {
                            "name": "text-align",
                            "default": "center"
                          },
                          {
                            "name": "border-radius",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "border-width",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "border-color",
                            "default": ""
                          }
                        ]
                      },
                      "mj-column-1": {
                        "tagName": "mj-column",
                        "attributes": [
                          {
                            "name": "enable-padding",
                            "default": true
                          },
                          {
                            "name": "padding-top",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "padding-right",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "padding-bottom",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "padding-left",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "is-unstacked",
                            "default": false
                          }
                        ]
                      },
                      "mj-image-1": {
                        "tagName": "mj-image",
                        "attributes": [
                          {
                            "name": "enable-padding",
                            "default": true
                          },
                          {
                            "name": "padding-top",
                            "default": 10,
                            "unit": "px"
                          },
                          {
                            "name": "padding-right",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "padding-bottom",
                            "default": 10,
                            "unit": "px"
                          },
                          {
                            "name": "padding-left",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "src",
                            "default": "https://example.com/banner.png"
                          },
                          {
                            "name": "alt",
                            "default": "Holiday sale banner"
                          },
                          {
                            "name": "href",
                            "default": ""
                          },
                          {
                            "name": "width",
                            "default": null,
                            "unit": "px"
                          },
                          {
                            "name": "height",
                            "default": null,
                            "unit": "px"
                          },
                          {
                            "name": "align",
                            "default": "center"
                          },
                          {
                            "name": "border-radius",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "container-background-color",
                            "default": ""
                          }
                        ]
                      },
                      "mj-text-1": {
                        "tagName": "mj-text",
                        "content": "<h1><span style=\"font-family: 'Playfair Display', georgia, palatino, serif; font-size: 32px\">Welcome</span></h1><p>Hello {{contact.first_name}}, thanks for subscribing!</p>",
                        "attributes": [
                          {
                            "name": "enable-padding",
                            "default": true
                          },
                          {
                            "name": "padding-top",
                            "default": 12,
                            "unit": "px"
                          },
                          {
                            "name": "padding-right",
                            "default": 24,
                            "unit": "px"
                          },
                          {
                            "name": "padding-bottom",
                            "default": 12,
                            "unit": "px"
                          },
                          {
                            "name": "padding-left",
                            "default": 24,
                            "unit": "px"
                          },
                          {
                            "name": "font-family",
                            "default": "arial, helvetica, sans-serif"
                          },
                          {
                            "name": "font-size",
                            "default": 16,
                            "unit": "px"
                          },
                          {
                            "name": "line-height",
                            "default": 1.5
                          },
                          {
                            "name": "container-background-color",
                            "default": ""
                          }
                        ]
                      },
                      "mj-button-1": {
                        "tagName": "mj-button",
                        "content": "Shop now",
                        "attributes": [
                          {
                            "name": "enable-padding",
                            "default": true
                          },
                          {
                            "name": "padding-top",
                            "default": 10,
                            "unit": "px"
                          },
                          {
                            "name": "padding-right",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "padding-bottom",
                            "default": 10,
                            "unit": "px"
                          },
                          {
                            "name": "padding-left",
                            "default": 20,
                            "unit": "px"
                          },
                          {
                            "name": "background-color",
                            "default": "#188bf6"
                          },
                          {
                            "name": "color",
                            "default": "#ffffff"
                          },
                          {
                            "name": "font-family",
                            "default": "Ubuntu, Helvetica, Arial, sans-serif"
                          },
                          {
                            "name": "font-size",
                            "default": 14,
                            "unit": "px"
                          },
                          {
                            "name": "align",
                            "default": "center"
                          },
                          {
                            "name": "border-radius",
                            "default": 6,
                            "unit": "px"
                          },
                          {
                            "name": "border-width",
                            "default": 0,
                            "unit": "px"
                          },
                          {
                            "name": "border-color",
                            "default": "#188bf6"
                          },
                          {
                            "name": "redirectAction",
                            "default": "url"
                          },
                          {
                            "name": "url",
                            "default": "https://example.com"
                          },
                          {
                            "name": "href",
                            "default": "https://example.com"
                          }
                        ]
                      }
                    }
                  },
                  "templateSettings": {
                    "type": "object",
                    "description": "Template-wide theme settings keyed by group: `body`, `button`, `divider`, `text`, `header`. Each group is a list of `{ name, default, unit? }`.",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Attribute name",
                            "example": "padding"
                          },
                          "default": {
                            "type": "object",
                            "description": "Attribute default value",
                            "example": "10px"
                          },
                          "unit": {
                            "type": "string",
                            "description": "Attribute unit",
                            "example": "px"
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "title": "BuilderAttributePublicV2Dto"
                      }
                    },
                    "example": {
                      "body": [
                        {
                          "name": "width",
                          "default": 600,
                          "unit": "px"
                        },
                        {
                          "name": "background-color",
                          "default": "#EAF0F6"
                        },
                        {
                          "name": "body-color",
                          "default": "#ffffff"
                        }
                      ],
                      "button": [
                        {
                          "name": "background-color",
                          "default": "#2196F3"
                        },
                        {
                          "name": "border-radius",
                          "default": "10",
                          "unit": "px"
                        },
                        {
                          "name": "font-family",
                          "default": "arial, helvetica, sans-serif"
                        },
                        {
                          "name": "font-size",
                          "default": 16,
                          "unit": "px"
                        },
                        {
                          "name": "color",
                          "default": "#ffffff"
                        }
                      ],
                      "divider": [
                        {
                          "name": "border-width",
                          "default": 2,
                          "unit": "px"
                        },
                        {
                          "name": "border-color",
                          "default": "#FED7E2"
                        },
                        {
                          "name": "border-style",
                          "default": "solid"
                        }
                      ],
                      "text": [
                        {
                          "name": "font-family-paragraph",
                          "default": "arial, helvetica, sans-serif"
                        },
                        {
                          "name": "line-height",
                          "default": 1.25
                        },
                        {
                          "name": "text-link-color",
                          "default": "#00a4bd"
                        },
                        {
                          "name": "custom-fonts",
                          "default": "Playfair Display"
                        },
                        {
                          "name": "brand-custom-fonts",
                          "default": ""
                        }
                      ],
                      "header": [
                        {
                          "name": "customCss",
                          "default": "<style> /* custom styles */ </style>"
                        }
                      ]
                    }
                  }
                },
                "title": "BuilderEditorContentPublicV2Dto"
              }
            ]
          },
          "designEditorV2": {
            "type": "boolean",
            "description": "Returned as `true` with `includeContent=true` when the latest version was saved in the new design editor (DnD 2.0, block format). `editorContent` is then omitted: this API reads and writes only the classic design-editor JSON, and the stored classic version is older. A builder update through this API replaces the DnD 2.0 design.",
            "example": true
          },
          "fromName": {
            "type": "string",
            "description": "Sender name",
            "example": "John Doe"
          },
          "fromEmail": {
            "type": "string",
            "description": "Sender email address",
            "example": "john@example.com"
          },
          "subject": {
            "type": "string",
            "description": "Email subject line",
            "example": "Welcome to our newsletter"
          },
          "replyToAddress": {
            "type": "string",
            "description": "Reply-to email address",
            "example": "reply@example.com"
          },
          "previewText": {
            "type": "string",
            "description": "Preview text",
            "example": "Check out our latest updates"
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the campaign is deleted",
            "example": false
          },
          "createdAt": {
            "type": "string",
            "description": "Created at timestamp",
            "example": "2025-07-24T11:55:43.598Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Last updated timestamp",
            "example": "2026-02-09T04:49:12.322Z"
          },
          "traceId": {
            "type": "string",
            "description": "Trace ID of the request",
            "example": "019e4ef5-a65e-4198-8cf9-8e93dca9bda4"
          }
        },
        "required": [
          "id",
          "deleted",
          "createdAt",
          "updatedAt"
        ],
        "title": "GetEmailCampaignPublicV2ResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "InvalidLocationDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code for invalid location access",
            "example": 403
          },
          "message": {
            "type": "string",
            "description": "Error message describing the location access failure",
            "example": "The token does not have access to this location"
          }
        },
        "title": "InvalidLocationDTO"
      },
      "NotFoundDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code for not found",
            "example": 404
          },
          "message": {
            "type": "string",
            "description": "Error message describing the not found failure",
            "example": "Not Found"
          },
          "error": {
            "type": "string",
            "description": "Error type identifier",
            "example": "The requested resource was not found"
          }
        },
        "title": "NotFoundDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      },
      "InternalServerErrorDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code for an unexpected server error",
            "example": 500
          },
          "message": {
            "type": "string",
            "description": "Error message describing the server failure",
            "example": "Internal Server Error"
          }
        },
        "title": "InternalServerErrorDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X GET 'https://services.leadconnectorhq.com/emails/locations/<locationId>/campaigns/emails/<campaignId>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3'
```

**Node.js**

```javascript
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3'
  }
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/emails/locations/<locationId>/campaigns/emails/<campaignId>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/emails/locations/{locationId}/campaigns/emails/{campaignId}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

response = requests.get(url, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/emails/locations/<locationId>/campaigns/emails/<campaignId>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .get("https://services.leadconnectorhq.com/emails/locations/<locationId>/campaigns/emails/<campaignId>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  url := "https://services.leadconnectorhq.com/emails/locations/<locationId>/campaigns/emails/<campaignId>"
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/emails/locations/<locationId>/campaigns/emails/<campaignId>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/emails/locations/<locationId>/campaigns/emails/<campaignId>' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
