---
title: "Get Messages for Campaign"
description: "How to call Get Messages for Campaign (GET /api/campaigns/{id}/campaign-messages) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2025-01-15/reference/get_messages_for_campaign"
revision: "2025-01-15"
latestUrl: "https://developers.klaviyo.com/en/reference/get_messages_for_campaign"
operationId: "get_messages_for_campaign"
aliases: ["get_campaign_campaign_messages","get_campaign_messages"]
method: "GET"
endpoint: "https://a.klaviyo.com/api/campaigns/{id}/campaign-messages"
authentication: "privateKey"
scopes: ["campaigns:read"]
rateLimits: {"burst":"10/s","steady":"150/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
jsonApi: {"include":["campaign","image","template"],"fields":{"campaign-message":["definition","definition.channel","definition.label","definition.content","definition.content.subject","definition.content.preview_text","definition.content.from_email","definition.content.from_label","definition.content.reply_to_email","definition.content.cc_email","definition.content.bcc_email","definition.content.body","definition.content.media_url","definition.render_options","definition.render_options.shorten_links","definition.render_options.add_org_prefix","definition.render_options.add_info_link","definition.render_options.add_opt_out_language","definition.notification_type","definition.content.title","definition.content.dynamic_image","definition.kv_pairs","definition.options","definition.options.on_open","definition.options.on_open.type","definition.options.on_open.ios_deep_link","definition.options.on_open.android_deep_link","definition.options.badge","definition.options.badge.display","definition.options.badge.badge_options","definition.options.badge.badge_options.badge_config","definition.options.badge.badge_options.value","definition.options.badge.badge_options.set_from_property","definition.options.play_sound","send_times","created_at","updated_at"],"campaign":["name","status","archived","audiences","audiences.included","audiences.excluded","send_options","send_options.use_smart_sending","tracking_options","tracking_options.add_tracking_params","tracking_options.custom_tracking_params","tracking_options.is_tracking_clicks","tracking_options.is_tracking_opens","send_strategy","send_strategy.method","send_strategy.datetime","send_strategy.options","send_strategy.options.is_local","send_strategy.options.send_past_recipients_immediately","send_strategy.throttle_percentage","send_strategy.date","created_at","scheduled_at","updated_at","send_time"],"image":["name","image_url","format","size","hidden","updated_at"],"template":["name","editor_type","html","text","amp","created","updated"]}}
related: ["https://developers.klaviyo.com/en/v2025-01-15/reference/campaigns/llms.txt","https://developers.klaviyo.com/en/v2025-01-15/reference/get_campaigns.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_campaign.md","https://developers.klaviyo.com/en/v2025-01-15/reference/create_campaign.md","https://developers.klaviyo.com/en/v2025-01-15/reference/update_campaign.md","https://developers.klaviyo.com/en/v2025-01-15/reference/delete_campaign.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_campaign_recipient_estimation.md","https://developers.klaviyo.com/en/v2025-01-15/reference/create_campaign_clone.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_tags_for_campaign.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_tag_ids_for_campaign.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_message_ids_for_campaign.md"]
---

# Get Messages for Campaign

> This is the Markdown version of https://developers.klaviyo.com/en/v2025-01-15/reference/get_messages_for_campaign

```http
GET https://a.klaviyo.com/api/campaigns/{id}/campaign-messages
```

Return all messages that belong to the given campaign.

- Revision header: `revision: 2025-01-15` (required)
- Scopes: `campaigns:read`
- Rate limits: Burst: `10/s`, Steady: `150/m`

## Example request

```bash
curl --request GET \
     --url 'https://a.klaviyo.com/api/campaigns/id/campaign-messages' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2025-01-15'
```

## Path parameters

- `id` (string, required)

## Query parameters

- `fields[campaign-message]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `definition`, `definition.channel`, `definition.label`, `definition.content`, `definition.content.subject`, `definition.content.preview_text`, `definition.content.from_email`, `definition.content.from_label`, `definition.content.reply_to_email`, `definition.content.cc_email`, `definition.content.bcc_email`, `definition.content.body`, `definition.content.media_url`, `definition.render_options`, `definition.render_options.shorten_links`, `definition.render_options.add_org_prefix`, `definition.render_options.add_info_link`, `definition.render_options.add_opt_out_language`, `definition.notification_type`, `definition.content.title`, `definition.content.dynamic_image`, `definition.kv_pairs`, `definition.options`, `definition.options.on_open`, `definition.options.on_open.type`, `definition.options.on_open.ios_deep_link`, `definition.options.on_open.android_deep_link`, `definition.options.badge`, `definition.options.badge.display`, `definition.options.badge.badge_options`, `definition.options.badge.badge_options.badge_config`, `definition.options.badge.badge_options.value`, `definition.options.badge.badge_options.set_from_property`, `definition.options.play_sound`, `send_times`, `created_at`, `updated_at`
- `fields[campaign]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `name`, `status`, `archived`, `audiences`, `audiences.included`, `audiences.excluded`, `send_options`, `send_options.use_smart_sending`, `tracking_options`, `tracking_options.add_tracking_params`, `tracking_options.custom_tracking_params`, `tracking_options.is_tracking_clicks`, `tracking_options.is_tracking_opens`, `send_strategy`, `send_strategy.method`, `send_strategy.datetime`, `send_strategy.options`, `send_strategy.options.is_local`, `send_strategy.options.send_past_recipients_immediately`, `send_strategy.throttle_percentage`, `send_strategy.date`, `created_at`, `scheduled_at`, `updated_at`, `send_time`
- `fields[image]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `name`, `image_url`, `format`, `size`, `hidden`, `updated_at`
- `fields[template]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `name`, `editor_type`, `html`, `text`, `amp`, `created`, `updated`
- `include` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/v2025-01-15/reference.md) Allowed values: `campaign`, `image`, `template`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2025-01-15`

## Responses

### 200: Success

Content type: `application/vnd.api+json`

- `data` (object[], required)
  - `relationships` (object)
    - `campaign` (object)
      - `data` (object): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (object): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
    - `template` (object)
      - `data` (object): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (RelationshipLinks): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
    - `image` (object)
      - `data` (object): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (RelationshipLinks): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
  - `type` (string, required): Allowed values: `campaign-message`
  - `id` (string, required): The message ID
  - `attributes` (object, required)
    - `definition` (oneOf, nullable)
      - One of:
        - Option 1: `EmailMessageDefinition` Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
        - Option 2: `SMSMessageDefinition` Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
        - Option 3: `MobilePushMessageStandardDefinition` Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
        - Option 4: `MobilePushMessageSilentDefinition` Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
    - `send_times` (object[], nullable): The list of appropriate Send Time Sub-objects associated with the message
      - `datetime` (string<date-time>, required): The datetime that the message is to be sent Example: `2022-11-08T00:00:00+00:00`
      - `is_local` (boolean, required): Whether that datetime is to be a local datetime for the recipient
    - `created_at` (string<date-time>, nullable): The datetime when the message was created Example: `2022-11-08T00:00:00+00:00`
    - `updated_at` (string<date-time>, nullable): The datetime when the message was last updated Example: `2022-11-08T00:00:00+00:00`
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (object)
  - `self` (string<uri>, required)
  - `first` (string<uri>)
  - `last` (string<uri>)
  - `prev` (string<uri>)
  - `next` (string<uri>)
- `included` (oneOf[])
  - One of:
    - Option 1: `CampaignResponseObjectResource`
      - `type` (string, required): Allowed values: `campaign`
      - `id` (string, required): The campaign ID
      - `attributes` (object, required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (ObjectLinks, required): Same fields as the first ObjectLinks above.
    - Option 2: `ImageResponseObjectResource`
      - `type` (string, required): Allowed values: `image`
      - `id` (string, required): The ID of the image Example: `7`
      - `attributes` (object, required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (ObjectLinks, required): Same fields as the first ObjectLinks above.
    - Option 3: `TemplateResponseObjectResource`
      - `type` (string, required): Allowed values: `template`
      - `id` (string, required): The ID of template
      - `attributes` (object, required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
      - `links` (ObjectLinks, required): Same fields as the first ObjectLinks above.

#### Example response body

```json
{
  "data": [
    {
      "relationships": {
        "campaign": {
          "data": {
            "type": "campaign",
            "id": "string"
          },
          "links": {
            "self": "https://www.example.com",
            "related": "https://www.example.com"
          }
        },
        "template": {
          "data": {
            "type": "template",
            "id": "string"
          },
          "links": {
            "self": "https://www.example.com",
            "related": "https://www.example.com"
          }
        },
        "image": {
          "data": {
            "type": "image",
            "id": "string"
          },
          "links": {
            "self": "https://www.example.com",
            "related": "https://www.example.com"
          }
        }
      },
      "type": "campaign-message",
      "id": "string",
      "attributes": {
        "definition": {
          "channel": "email",
          "label": "My message name",
          "content": {
            "subject": "Buy our product!",
            "preview_text": "My preview text",
            "from_email": "store@my-company.com",
            "from_label": "My Company",
            "reply_to_email": "reply-to@my-company.com",
            "cc_email": "cc@my-company.com",
            "bcc_email": "bcc@my-company.com"
          }
        },
        "send_times": [
          {
            "datetime": "2022-11-08T00:00:00+00:00",
            "is_local": true
          }
        ],
        "created_at": "2022-11-08T00:00:00+00:00",
        "updated_at": "2022-11-08T00:00:00+00:00"
      },
      "links": {
        "self": "https://www.example.com"
      }
    }
  ],
  "links": {
    "self": "https://www.example.com",
    "first": "https://www.example.com",
    "last": "https://www.example.com",
    "prev": "https://www.example.com",
    "next": "https://www.example.com"
  },
  "included": [
    {
      "type": "campaign",
      "id": "string",
      "attributes": {
        "name": "string",
        "status": "Adding Recipients",
        "archived": true,
        "audiences": {
          "included": [
            "Y6nRLr"
          ],
          "excluded": [
            "UTd5ui"
          ]
        },
        "send_options": {
          "use_smart_sending": true
        },
        "tracking_options": {
          "add_tracking_params": true,
          "custom_tracking_params": [
            {
              "type": "dynamic",
              "value": "campaign_id",
              "name": "utm_medium"
            }
          ],
          "is_tracking_clicks": true,
          "is_tracking_opens": true
        },
        "send_strategy": {
          "method": "static",
          "datetime": "2022-11-08T00:00:00+00:00",
          "options": {
            "is_local": true,
            "send_past_recipients_immediately": false
          }
        },
        "created_at": "2022-11-08T00:00:00+00:00",
        "scheduled_at": "2022-11-08T00:00:00+00:00",
        "updated_at": "2022-11-08T00:00:00+00:00",
        "send_time": "2022-11-08T00:00:00+00:00"
      },
      "links": {
        "self": "https://www.example.com"
      }
    }
  ]
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
