Skip to content

This page is available as Markdown at https://developers.klaviyo.com/en/v2025-01-15/reference/get_campaign_message.md. An index of every page is at https://developers.klaviyo.com/llms.txt.

KlaviyoKlaviyoDevelopers
v2025-01-15

You're reading the reference for API revision 2025-01-15. The latest revision is 2026-10-15. See this page in the latest revision.

Get Campaign Message

GEThttps://a.klaviyo.com/api/campaign-messages/{id}

Returns a specific message based on a required id.

Revision header
revision: 2025-01-15required
Scopes
campaigns:read
Rate limits
Burst: 10/sSteady: 150/m

Path parameters

  • id#stringrequired

    The message ID to be retrieved

Query parameters

  • fields[campaign-message]#string[]

    For more information please visit API overview

    Show 37 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

    Show 25 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

    Allowed values:
    • name
    • image_url
    • format
    • size
    • hidden
    • updated_at
  • fields[template]#string[]

    For more information please visit API overview

    Allowed values:
    • name
    • editor_type
    • html
    • text
    • amp
    • created
    • updated
  • include#string[]

    For more information please visit API overview

    Allowed values:
    • campaign
    • image
    • template

Headers

  • revision#stringrequired

    API endpoint revision (format: YYYY-MM-DD[.suffix])

    2025-01-15

Responses

200Success

Content type: application/vnd.api+json

  • data#objectrequired
    Show 5 fields
    • relationships#object
      Show 3 fields
      • campaign#object
        Show 2 fields
        • data#object
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • campaign
          • id#stringrequired

            The parent campaign id

      • template#object
        Show 2 fields
        • data#object
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • template
          • id#stringrequired

            The associated template id

      • image#object
        Show 2 fields
        • data#object
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • image
          • id#stringrequired

            The associated image id

    • type#stringrequired
      Allowed values:
      • campaign-message
    • id#stringrequired

      The message ID

    • attributes#objectrequired
      Show 4 fields
      • definition#oneOfnullable

        One of:

        1. Option 1: EmailMessageDefinition
          • channel#stringrequired
            Allowed values:
            • email
          • label#stringnullable

            The label or name on the message

            Example: My message name

          • content#object
            Show 7 fields
            • subject#stringnullable

              The subject of the message

              Example: Buy our product!

            • preview_text#stringnullable

              Preview text associated with the message

              Example: My preview text

            • from_email#stringnullable

              The email the message should be sent from

              Example: store@my-company.com

            • from_label#stringnullable

              The label associated with the from_email

              Example: My Company

            • reply_to_email#stringnullable

              Optional Reply-To email address

              Example: reply-to@my-company.com

            • cc_email#stringnullable

              Optional CC email address

              Example: cc@my-company.com

            • bcc_email#stringnullable

              Optional BCC email address

              Example: bcc@my-company.com

        2. Option 2: SMSMessageDefinition
          • channel#stringrequired
            Allowed values:
            • sms
          • content#object
            Show 2 fields
            • body#stringnullable

              The message body

              Example: My preview sms

            • media_url#stringnullable

              URL for included media

          • render_options#object
            Show 4 fields
            • add_org_prefix#booleannullable

              Default: true

              Example: true

            • add_opt_out_language#booleannullable

              Default: false

        3. Option 3: MobilePushMessageStandardDefinition
          • channel#stringrequired
            Allowed values:
            • mobile_push
          • notification_type#stringrequired
            Allowed values:
            • standard
          • content#objectrequired
            Show 3 fields
            • title#stringnullable

              The title of the message

            • body#stringnullable

              The message body

              Example: My preview push notification

            • dynamic_image#stringnullable

              The dynamic image to be used in the push notification

          • kv_pairs#objectnullable

            The key-value pairs to be sent with the push notification

          • options#object
            Show 3 fields
            • on_open#oneOfnullable

              One of:

              1. Option 1: PushOnOpenApp
                • type#stringrequired
                  Allowed values:
                  • open_app
              2. Option 2: PushOnOpenDeepLink
                • type#stringrequired
                  Allowed values:
                  • deep_link
            • badge#oneOfnullable

              Only supported on iOS.

              One of:

              1. Option 1: MobilePushBadge
                • display#anyrequired

                  Whether to display a badge on the app icon

                  Allowed values:
                  • true
                • badge_options#oneOfnullable

                  Badge options

                  One of:

                  1. Option 1: Increment
                    • badge_config#anyrequired
                      Allowed values:
                      • increment_one
                  2. Option 2: StaticCount
                    • badge_config#anyrequired
                      Allowed values:
                      • set_count
                    • value#stringrequired
                  3. Option 3: Property
                    • badge_config#anyrequired
                      Allowed values:
                      • set_property
                    • set_from_property#stringrequired
              2. Option 2: MobilePushNoBadge
                • display#anyrequired

                  Whether to display a badge on the app icon

                  Allowed values:
                  • false
            • play_sound#booleannullable

              Only supported on iOS.

              Default: false

        4. Option 4: MobilePushMessageSilentDefinition
          • channel#stringrequired
            Allowed values:
            • mobile_push
          • notification_type#stringrequired
            Allowed values:
            • silent
          • kv_pairs#objectnullable

            The key-value pairs to be sent with the push notification

      • send_times#object[]nullable

        The list of appropriate Send Time Sub-objects associated with the message

        Show 2 fields
        • datetime#string<date-time>required

          The datetime that the message is to be sent

          Example: 2022-11-08T00:00:00+00:00

        • is_local#booleanrequired

          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

  • included#oneOf[]

    One of:

    1. Option 1: CampaignResponseObjectResource
      • type#stringrequired
        Allowed values:
        • campaign
      • id#stringrequired

        The campaign ID

      • attributes#objectrequired
        Show 11 fields
        • name#stringrequired

          The campaign name

        • status#stringrequired

          The current status of the campaign

          Show 16 allowed values
          • Adding Recipients
          • Cancelled
          • Cancelled: Account Disabled
          • Cancelled: Internal Error
          • Cancelled: No Recipients
          • Cancelled: Smart Sending
          • Draft
          • Preparing to schedule
          • Preparing to send
          • Queued without Recipients
          • Scheduled
          • Sending
          • Sending Segments
          • Sent
          • Unknown
          • Variations Sent
        • archived#booleanrequired

          Whether the campaign has been archived or not

        • audiences#objectrequired
          Show 2 fields
          • included#string[]required

            A list of included audiences

          • excluded#string[]nullable

            An optional list of excluded audiences

        • send_options#oneOfrequired

          Options to use when sending a campaign

          One of:

          1. Option 1: EmailSendOptions
            • use_smart_sending#booleannullable

              Use smart sending.

              Default: true

              Example: true

          2. Option 2: SMSSendOptions
            • use_smart_sending#booleannullable

              Use smart sending.

              Default: true

              Example: true

          3. Option 3: PushSendOptions
            • use_smart_sending#booleannullable

              Use smart sending.

              Default: true

              Example: true

        • tracking_options#oneOfnullable

          The tracking options associated with the campaign

          One of:

          1. Option 1: CampaignsEmailTrackingOptions
            • add_tracking_params#booleannullable

              Whether the campaign needs custom tracking parameters. If set to False, tracking params will not be used.

            • custom_tracking_params#oneOf[]nullable

              A list of custom tracking parameters. If an empty list is given and add_tracking_params is True, uses company defaults.

              One of:

              1. Option 1: DynamicTrackingParam
                • type#stringrequired
                  Allowed values:
                  • dynamic
                • value#stringrequired

                  The value of the tracking parameter

                  Show 12 allowed values
                  • campaign_id
                  • campaign_name
                  • campaign_name_id
                  • campaign_name_send_day
                  • email_subject
                  • group_id
                  • group_name
                  • group_name_id
                  • link_alt_text
                  • message_type
                  • profile_external_id
                  • profile_id
                • name#stringrequired

                  Name of the tracking param

                  Example: utm_medium

              2. Option 2: StaticTrackingParam
                • type#stringrequired
                  Allowed values:
                  • static
                • value#stringrequired

                  The value of the tracking parameter

                • name#stringrequired

                  Name of the tracking param

                  Example: utm_medium

            • is_tracking_clicks#booleannullable

              Whether the campaign is tracking click events. If not specified, uses company defaults.

            • is_tracking_opens#booleannullable

              Whether the campaign is tracking open events. If not specified, uses company defaults.

          2. Option 2: CampaignsSMSTrackingOptions
            • add_tracking_params#booleannullable

              Whether the campaign needs custom tracking parameters. If set to False, tracking params will not be used.

            • custom_tracking_params#oneOf[]nullable

              A list of custom tracking parameters. If an empty list is given and add_tracking_params is True, uses company defaults.

              One of:

              1. Option 1: DynamicTrackingParam

              2. Option 2: StaticTrackingParam

        • send_strategy#oneOfrequired

          The send strategy the campaign will send with

          One of:

          1. Option 1: StaticSendStrategy
            • method#stringrequired
              Allowed values:
              • static
            • datetime#string<date-time>required

              The time to send at

              Example: 2022-11-08T00:00:00+00:00

            • options#oneOfnullable

              If the campaign should be sent with local recipient timezone send (requires UTC time) or statically sent at the given time.

              One of:

              1. Option 1: LocalStaticSend
                • is_local#anyrequired

                  Whether the campaign should be sent with local recipient timezone send (requires UTC time) or statically sent at the given time.

                  Allowed values:
                  • true
                • send_past_recipients_immediately#boolean

                  Determines if we should send to local recipient timezone if the given time has passed. Only applicable to local sends.

                  Default: false

              2. Option 2: NonLocalStaticSend
                • is_local#anyrequired

                  Whether the campaign should be sent with local recipient timezone send (requires UTC time) or statically sent at the given time.

                  Allowed values:
                  • false
          2. Option 2: ThrottledSendStrategy
            • method#stringrequired
              Allowed values:
              • throttled
            • datetime#string<date-time>required

              The time to send at

            • throttle_percentage#integerrequired

              The percentage of recipients per hour to send to.

              Show 9 allowed values
              • 10
              • 11
              • 13
              • 14
              • 17
              • 20
              • 25
              • 33
              • 50
          3. Option 3: ImmediateSendStrategy
            • method#stringrequired
              Allowed values:
              • immediate
          4. Option 4: SmartSendTimeStrategy
            • method#stringrequired
              Allowed values:
              • smart_send_time
            • date#string<date>required

              The day to send on

          5. Option 5: ABTestSendStrategy
            • method#stringrequired
              Allowed values:
              • ab_test_campaign
          6. Option 6: UnsupportedSendStrategy
            • method#stringrequired
              Allowed values:
              • unsupported
        • created_at#string<date-time>required

          The datetime when the campaign was created

          Example: 2022-11-08T00:00:00+00:00

        • scheduled_at#string<date-time>nullable

          The datetime when the campaign was scheduled for future sending

          Example: 2022-11-08T00:00:00+00:00

        • updated_at#string<date-time>required

          The datetime when the campaign was last updated by a user or the system

          Example: 2022-11-08T00:00:00+00:00

        • send_time#string<date-time>nullable

          The datetime when the campaign will be / was sent or None if not yet scheduled by a send_job.

          Example: 2022-11-08T00:00:00+00:00

    2. Option 2: ImageResponseObjectResource
      • type#stringrequired
        Allowed values:
        • image
      • id#stringrequired

        The ID of the image

        Example: 7

      • attributes#objectrequired
        Show 6 fields
        • name#stringrequired
        • image_url#stringrequired
        • format#stringrequired
        • size#integerrequired
        • hidden#booleanrequired
        • updated_at#string<date-time>required

          Example: 2022-11-08T00:00:00+00:00

    3. Option 3: TemplateResponseObjectResource
      • type#stringrequired
        Allowed values:
        • template
      • id#stringrequired

        The ID of template

      • attributes#objectrequired
        Show 7 fields
        • name#stringrequired

          The name of the template

        • editor_type#stringrequired

          editor_type has a fixed set of values:

          • SYSTEM_DRAGGABLE: indicates a drag-and-drop editor template
          • SIMPLE: A rich text editor template
          • CODE: A custom HTML template
          • USER_DRAGGABLE: A hybrid template, using custom HTML in the drag-and-drop editor
        • html#stringrequired

          The rendered HTML of the template

        • text#stringnullable

          The template plain_text

        • amp#stringnullable

          The AMP version of the template. Requires AMP Email to be enabled to access in-app. Refer to the AMP Email setup guide at Send AMP emails in Klaviyo

        • created#string<date-time>nullable

          The date the template was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)

          Example: 2022-11-08T00:00:00+00:00

        • updated#string<date-time>nullable

          The date the template was updated in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)

          Example: 2022-11-08T00:00:00+00:00

4XXClient Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string

5XXServer Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string