Skip to content

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

KlaviyoKlaviyoDevelopers
v2024-02-15

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

Get Campaign

GEThttps://a.klaviyo.com/api/campaigns/{id}/

Returns a specific campaign based on a required id.

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

Path parameters

  • id#stringrequired

    The campaign ID to be retrieved

Query parameters

  • fields[campaign-message]#string[]

    For more information please visit API overview

    Show 11 allowed values
    • label
    • channel
    • content
    • send_times
    • render_options
    • render_options.shorten_links
    • render_options.add_org_prefix
    • render_options.add_info_link
    • render_options.add_opt_out_language
    • created_at
    • updated_at
  • fields[campaign]#string[]

    For more information please visit API overview

    Show 23 allowed values
    • name
    • status
    • archived
    • audiences
    • audiences.included
    • audiences.excluded
    • send_options
    • tracking_options
    • send_strategy
    • send_strategy.method
    • send_strategy.options_static
    • send_strategy.options_static.datetime
    • send_strategy.options_static.is_local
    • send_strategy.options_static.send_past_recipients_immediately
    • send_strategy.options_throttled
    • send_strategy.options_throttled.datetime
    • send_strategy.options_throttled.throttle_percentage
    • send_strategy.options_sto
    • send_strategy.options_sto.date
    • created_at
    • scheduled_at
    • updated_at
    • send_time
  • fields[tag]#string[]

    For more information please visit API overview

    Allowed values:
    • name
  • include#string[]

    For more information please visit API overview

    Allowed values:
    • campaign-messages
    • tags

Headers

  • revision#stringrequired

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

    2024-02-15

Responses

200Success

Content type: application/json

  • data#objectrequired
    Show 5 fields
    • relationships#object
      Show 2 fields
      • campaign-messages#object
        Show 2 fields
        • data#object[]required
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • campaign-message
          • id#stringrequired

            The message(s) associated with the campaign

      • tags#object
        Show 2 fields
        • data#object[]required
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • tag
          • id#stringrequired
    • 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

      • archived#booleanrequired

        Whether the campaign has been archived or not

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

          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: EmailSendOptionsSubObject
          • use_smart_sending#booleannullable

            Use smart sending. Defaults to True

        2. Option 2: SMSSendOptionsSubObject
          • use_smart_sending#booleannullable

            Use smart sending. Defaults to True

      • tracking_options#oneOfrequired

        The tracking options associated with the campaign

        One of:

        1. Option 1: EmailTrackingOptionsSubObject
          • is_add_utm#booleannullable

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

          • utm_params#object[]nullable

            A list of UTM parameters. If an empty list is given and is_add_utm is True, uses company defaults.

            Show 2 fields
            • name#stringrequired

              Name of the UTM param

              Example: utm_medium

            • value#stringrequired

              Value of the UTM param. Can be templated data.

              Example: campaign

          • 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: SMSTrackingOptionsSubObject
          • is_add_utm#booleannullable

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

          • utm_params#UTMParamsSubObject[]nullable

            A list of UTM parameters. If an empty list is given and is_add_utm is True, uses company defaults.

            Same fields as the first UTMParamsSubObject above.

      • send_strategy#objectrequired
        Show 4 fields
        • method#stringrequired

          Describes the shape of the options object. Allowed values: ['static', 'throttled', 'immediate', 'smart_send_time']

          Example: static

        • options_static#object
          Show 3 fields
          • datetime#string<date-time>required

            The time to send at

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

          • is_local#booleannullable

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

          • send_past_recipients_immediately#booleannullable

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

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

            The time to send at

          • throttle_percentage#integerrequired

            The percentage of recipients per hour to send to. Allowed values: [10, 11, 13, 14, 17, 20, 25, 33, 50]

        • options_sto#object
          Show 1 field
          • date#string<date>required

            The day to send on

      • 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>required

        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>required

        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

  • included#oneOf[]

    One of:

    1. Option 1: CampaignMessageResponseObjectResource
      • type#stringrequired
        Allowed values:
        • campaign-message
      • id#stringrequired

        The message ID

      • attributes#objectrequired
        Show 7 fields
        • label#stringrequired

          The label or name on the message

        • channel#stringrequired

          The channel the message is to be sent on

        • content#oneOfrequired

          Additional attributes relating to the content of the message

          One of:

          1. Option 1: EmailContentSubObject
            • 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: SMSContentSubObject
            • body#stringnullable

              The message body

              Example: My preview sms

            • media_url#stringnullable

              URL for included media

        • 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

        • render_options#object
          Show 4 fields
          • add_org_prefix#booleannullable

            Default: true

            Example: true

          • add_opt_out_language#booleannullable

            Default: false

        • 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

    2. Option 2: TagResponseObjectResource
      • type#stringrequired
        Allowed values:
        • tag
      • id#stringrequired

        The Tag ID

        Example: abcd1234-ef56-gh78-ij90-abcdef123456

      • attributes#objectrequired
        Show 1 field
        • name#stringrequired

          The Tag name

          Example: My Tag

4XXClient Error

Content type: application/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/json

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