---
updatedAt: 2026-06-18T13:03:37.000Z
agentTools:
  projectIndex: https://docs.zetaglobal.com/llms.txt
---

# Get Campaign Content by Campaign Name

Returns the HTML content for an existing multi-version campaign by its name. The content returned is organised as an array of versions with variates nested within each version. For a campaign with no version or variate, it defaults to  campaign name as label for version and 'A' as the label for variate.

[block:parameters]
{
  "data": {
    "h-0": "Required Headers",
    "h-1": "Value",
    "0-0": "Content-Type",
    "0-1": "application/json",
    "1-0": "Accept",
    "1-1": "application/json",
    "2-0": "Authorization",
    "2-1": "Basic <Auth Key>"
  },
  "cols": 2,
  "rows": 3
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "zme",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.zetaglobal.net/ver2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/{site_id}/campaigns/name/{campaign_name}/content": {
      "get": {
        "summary": "Get Campaign Content by Campaign Name",
        "description": "Returns the HTML content for an existing multi-version campaign by its name. The content returned is organised as an array of versions with variates nested within each version. For a campaign with no version or variate, it defaults to  campaign name as label for version and 'A' as the label for variate.",
        "operationId": "get-campaign-content-by-name",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "description": "ZMP Site ID",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "campaign_name",
            "in": "path",
            "description": "ZMP Campaign Name",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": 12345,\n    \"name\": \"My Awesome Campaign\",\n    \"created_at\": \"2019-11-07T10:29:52.000Z\",\n    \"updated_at\": \"2019-11-07T10:38:24.000Z\",\n    \"created_by\": \"ashankar@zetaglobal.com\",\n    \"updated_by\": \"ashankar@zetaglobal.com\",\n    \"versions\": [\n        {\n            \"label\": \"My Awesome Campaign version 1\",\n            \"variates\": [\n                {\n                    \"label\": \"A\",\n                    \"html\": \"<html><head></head><body><h1> Version 1 -  Variate A </h1></body></html>\"\n                },\n                {\n                    \"label\": \"B\",\n                    \"html\": \"<html><head></head><body><h1> Version 1 -  Variate B </h1></body></html>\"\n                }\n            ]\n        },\n        {\n              \"label\": \"My Awesome Campaign version 2\",\n              \"variates\": [\n                  {\n                      \"label\": \"A\",\n                      \"html\": \"<html><head></head><body><h1> Version 2 -  Variate A </h1></body></html>\"\n                  },\n                  {\n                      \"label\": \"B\",\n                      \"html\": \"<html><head></head><body><h1> Version 2 -  Variate B </h1></body></html>\"\n                  }\n              ]\n          }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "name": {
                      "type": "string",
                      "example": "My Awesome Campaign"
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2019-11-07T10:29:52.000Z"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2019-11-07T10:38:24.000Z"
                    },
                    "created_by": {
                      "type": "string",
                      "example": "ashankar@zetaglobal.com"
                    },
                    "updated_by": {
                      "type": "string",
                      "example": "ashankar@zetaglobal.com"
                    },
                    "versions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "example": "My Awesome Campaign version 1"
                          },
                          "variates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "example": "A"
                                },
                                "html": {
                                  "type": "string",
                                  "example": "<html><head></head><body><h1> Version 1 -  Variate A </h1></body></html>"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```