Skip to content

This page is available as Markdown at https://developers.klaviyo.com/en/v2025-01-15/reference/update_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.

Update Campaign Message

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

Update a campaign message

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

Path parameters

  • id#stringrequired

    The message ID to be retrieved

Headers

  • revision#stringrequired

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

    2025-01-15

Request body

Content type: application/vnd.api+jsonrequired

  • data#objectrequired
    Show 4 fields
    • type#stringrequired
      Allowed values:
      • campaign-message
    • id#stringrequired

      The message ID to be retrieved

    • attributes#objectrequired
      Show 1 field
      • definition#oneOfnullable

        The contents and settings of the campaign message

        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: SMSMessageDefinitionCreate
          • channel#stringrequired
            Allowed values:
            • sms
          • content#object
            Show 1 field
            • body#stringnullable

              The message body

              Example: My preview sms

          • render_options#object
            Show 4 fields
            • add_org_prefix#booleannullable

              Default: true

              Example: true

            • add_opt_out_language#booleannullable

              Default: false

        3. Option 3: MobilePushMessageStandardDefinitionUpdate
          • channel#stringrequired
            Allowed values:
            • mobile_push
          • kv_pairs#objectnullable

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

          • content#object
            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

          • 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

          • notification_type#string
            Allowed values:
            • standard
        4. Option 4: MobilePushMessageSilentDefinitionUpdate
          • channel#stringrequired
            Allowed values:
            • mobile_push
          • kv_pairs#object

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

          • notification_type#string
            Allowed values:
            • silent
    • relationships#object
      Show 1 field
      • image#object
        Show 1 field
        • data#object
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • image
          • id#stringrequired

            The associated image for mobile_push messages

Responses

200Success

Content type: application/vnd.api+json

  • data#objectrequired
    Show 5 fields
    • 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

    • 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

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