/** * Klaviyo API * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * * Contact: developers@klaviyo.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AxiosResponse } from "axios"; import { CampaignCloneQuery } from '../model/campaignCloneQuery'; import { CampaignCreateQuery } from '../model/campaignCreateQuery'; import { CampaignMessageAssignTemplateQuery } from '../model/campaignMessageAssignTemplateQuery'; import { CampaignMessageImageUpdateQuery } from '../model/campaignMessageImageUpdateQuery'; import { CampaignMessagePartialUpdateQuery } from '../model/campaignMessagePartialUpdateQuery'; import { CampaignPartialUpdateQuery } from '../model/campaignPartialUpdateQuery'; import { CampaignRecipientEstimationJobCreateQuery } from '../model/campaignRecipientEstimationJobCreateQuery'; import { CampaignSendJobCreateQuery } from '../model/campaignSendJobCreateQuery'; import { CampaignSendJobPartialUpdateQuery } from '../model/campaignSendJobPartialUpdateQuery'; import { GetCampaignMessageCampaignRelationshipResponse } from '../model/getCampaignMessageCampaignRelationshipResponse'; import { GetCampaignMessageImageRelationshipResponse } from '../model/getCampaignMessageImageRelationshipResponse'; import { GetCampaignMessageResponseCollectionCompoundDocument } from '../model/getCampaignMessageResponseCollectionCompoundDocument'; import { GetCampaignMessageResponseCompoundDocument } from '../model/getCampaignMessageResponseCompoundDocument'; import { GetCampaignMessageTemplateRelationshipResponse } from '../model/getCampaignMessageTemplateRelationshipResponse'; import { GetCampaignMessagesRelationshipsResponseCollection } from '../model/getCampaignMessagesRelationshipsResponseCollection'; import { GetCampaignRecipientEstimationJobResponse } from '../model/getCampaignRecipientEstimationJobResponse'; import { GetCampaignRecipientEstimationResponse } from '../model/getCampaignRecipientEstimationResponse'; import { GetCampaignResponse } from '../model/getCampaignResponse'; import { GetCampaignResponseCollectionCompoundDocument } from '../model/getCampaignResponseCollectionCompoundDocument'; import { GetCampaignResponseCompoundDocument } from '../model/getCampaignResponseCompoundDocument'; import { GetCampaignSendJobResponse } from '../model/getCampaignSendJobResponse'; import { GetCampaignTagsRelationshipsResponseCollection } from '../model/getCampaignTagsRelationshipsResponseCollection'; import { GetImageResponse } from '../model/getImageResponse'; import { GetTagResponseCollection } from '../model/getTagResponseCollection'; import { GetTemplateResponse } from '../model/getTemplateResponse'; import { PatchCampaignMessageResponse } from '../model/patchCampaignMessageResponse'; import { PatchCampaignResponse } from '../model/patchCampaignResponse'; import { PostCampaignMessageResponse } from '../model/postCampaignMessageResponse'; import { PostCampaignRecipientEstimationJobResponse } from '../model/postCampaignRecipientEstimationJobResponse'; import { PostCampaignResponse } from '../model/postCampaignResponse'; import { PostCampaignSendJobResponse } from '../model/postCampaignSendJobResponse'; import { Session } from './apis'; export declare class CampaignsApi { session: Session; protected _basePath: string; protected _defaultHeaders: any; protected _useQuerystring: boolean; constructor(session: Session); set useQuerystring(value: boolean); set basePath(basePath: string); set defaultHeaders(defaultHeaders: any); get defaultHeaders(): any; get basePath(): string; /** * Creates a non-reusable version of the template and assigns it to the message.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Assign Template to Campaign Message * @param campaignMessageAssignTemplateQuery Takes a reusable template, clones it, and assigns the non-reusable clone to the message. */ assignTemplateToCampaignMessage(campaignMessageAssignTemplateQuery: CampaignMessageAssignTemplateQuery): Promise<{ response: AxiosResponse; body: PostCampaignMessageResponse; }>; /** * Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Cancel Campaign Send * @param id The ID of the currently sending campaign to cancel or revert* @param campaignSendJobPartialUpdateQuery Permanently cancel the campaign, setting the status to CANCELED or revert the campaign, setting the status back to DRAFT */ cancelCampaignSend(id: string, campaignSendJobPartialUpdateQuery: CampaignSendJobPartialUpdateQuery): Promise<{ response: AxiosResponse; body?: any; }>; /** * Creates a campaign given a set of parameters, then returns it.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Create Campaign * @param campaignCreateQuery Creates a campaign from parameters */ createCampaign(campaignCreateQuery: CampaignCreateQuery): Promise<{ response: AxiosResponse; body: PostCampaignResponse; }>; /** * Clones an existing campaign, returning a new campaign based on the original with a new ID and name.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Create Campaign Clone * @param campaignCloneQuery Clones a campaign from an existing campaign */ createCampaignClone(campaignCloneQuery: CampaignCloneQuery): Promise<{ response: AxiosResponse; body: PostCampaignResponse; }>; /** * Delete a campaign with the given campaign ID.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Delete Campaign * @param id The campaign ID to be deleted */ deleteCampaign(id: string): Promise<{ response: AxiosResponse; body?: any; }>; /** * Returns a specific campaign based on a required id.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaign * @param id The campaign ID to be retrieved * @param fieldsCampaignMessage For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsCampaign For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsTag For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param include For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships */ getCampaign(id: string, options?: { fieldsCampaignMessage?: Array<'created_at' | 'definition' | 'definition.channel' | 'definition.content' | 'definition.content.bcc_email' | 'definition.content.body' | 'definition.content.cc_email' | 'definition.content.dynamic_image' | 'definition.content.from_email' | 'definition.content.from_label' | 'definition.content.media_url' | 'definition.content.preview_text' | 'definition.content.reply_to_email' | 'definition.content.subject' | 'definition.content.title' | 'definition.kv_pairs' | 'definition.label' | 'definition.notification_type' | 'definition.options' | 'definition.options.badge' | 'definition.options.badge.badge_options' | 'definition.options.badge.badge_options.badge_config' | 'definition.options.badge.badge_options.set_from_property' | 'definition.options.badge.badge_options.value' | 'definition.options.badge.display' | 'definition.options.on_open' | 'definition.options.on_open.android_deep_link' | 'definition.options.on_open.ios_deep_link' | 'definition.options.on_open.type' | 'definition.options.play_sound' | 'definition.render_options' | 'definition.render_options.add_info_link' | 'definition.render_options.add_opt_out_language' | 'definition.render_options.add_org_prefix' | 'definition.render_options.shorten_links' | 'send_times' | 'updated_at'>; fieldsCampaign?: Array<'archived' | 'audiences' | 'audiences.excluded' | 'audiences.included' | 'created_at' | 'name' | 'scheduled_at' | 'send_options' | 'send_options.use_smart_sending' | 'send_strategy' | 'send_strategy.date' | 'send_strategy.datetime' | 'send_strategy.method' | 'send_strategy.options' | 'send_strategy.options.is_local' | 'send_strategy.options.send_past_recipients_immediately' | 'send_strategy.throttle_percentage' | 'send_time' | 'status' | 'tracking_options' | 'tracking_options.add_tracking_params' | 'tracking_options.custom_tracking_params' | 'tracking_options.is_tracking_clicks' | 'tracking_options.is_tracking_opens' | 'updated_at'>; fieldsTag?: Array<'name'>; include?: Array<'campaign-messages' | 'tags'>; }): Promise<{ response: AxiosResponse; body: GetCampaignResponseCompoundDocument; }>; /** * Return the related campaign

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaign for Campaign Message * @param id * @param fieldsCampaign For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getCampaignForCampaignMessage(id: string, options?: { fieldsCampaign?: Array<'archived' | 'audiences' | 'audiences.excluded' | 'audiences.included' | 'created_at' | 'name' | 'scheduled_at' | 'send_options' | 'send_options.use_smart_sending' | 'send_strategy' | 'send_strategy.date' | 'send_strategy.datetime' | 'send_strategy.method' | 'send_strategy.options' | 'send_strategy.options.is_local' | 'send_strategy.options.send_past_recipients_immediately' | 'send_strategy.throttle_percentage' | 'send_time' | 'status' | 'tracking_options' | 'tracking_options.add_tracking_params' | 'tracking_options.custom_tracking_params' | 'tracking_options.is_tracking_clicks' | 'tracking_options.is_tracking_opens' | 'updated_at'>; }): Promise<{ response: AxiosResponse; body: GetCampaignResponse; }>; /** * Returns the ID of the related campaign

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaign ID for Campaign Message * @param id */ getCampaignIdForCampaignMessage(id: string): Promise<{ response: AxiosResponse; body: GetCampaignMessageCampaignRelationshipResponse; }>; /** * Returns a specific message based on a required id.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaign Message * @param id The message ID to be retrieved * @param fieldsCampaignMessage For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsCampaign For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsImage For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsTemplate For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param include For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships */ getCampaignMessage(id: string, options?: { fieldsCampaignMessage?: Array<'created_at' | 'definition' | 'definition.channel' | 'definition.content' | 'definition.content.bcc_email' | 'definition.content.body' | 'definition.content.cc_email' | 'definition.content.dynamic_image' | 'definition.content.from_email' | 'definition.content.from_label' | 'definition.content.media_url' | 'definition.content.preview_text' | 'definition.content.reply_to_email' | 'definition.content.subject' | 'definition.content.title' | 'definition.kv_pairs' | 'definition.label' | 'definition.notification_type' | 'definition.options' | 'definition.options.badge' | 'definition.options.badge.badge_options' | 'definition.options.badge.badge_options.badge_config' | 'definition.options.badge.badge_options.set_from_property' | 'definition.options.badge.badge_options.value' | 'definition.options.badge.display' | 'definition.options.on_open' | 'definition.options.on_open.android_deep_link' | 'definition.options.on_open.ios_deep_link' | 'definition.options.on_open.type' | 'definition.options.play_sound' | 'definition.render_options' | 'definition.render_options.add_info_link' | 'definition.render_options.add_opt_out_language' | 'definition.render_options.add_org_prefix' | 'definition.render_options.shorten_links' | 'send_times' | 'updated_at'>; fieldsCampaign?: Array<'archived' | 'audiences' | 'audiences.excluded' | 'audiences.included' | 'created_at' | 'name' | 'scheduled_at' | 'send_options' | 'send_options.use_smart_sending' | 'send_strategy' | 'send_strategy.date' | 'send_strategy.datetime' | 'send_strategy.method' | 'send_strategy.options' | 'send_strategy.options.is_local' | 'send_strategy.options.send_past_recipients_immediately' | 'send_strategy.throttle_percentage' | 'send_time' | 'status' | 'tracking_options' | 'tracking_options.add_tracking_params' | 'tracking_options.custom_tracking_params' | 'tracking_options.is_tracking_clicks' | 'tracking_options.is_tracking_opens' | 'updated_at'>; fieldsImage?: Array<'format' | 'hidden' | 'image_url' | 'name' | 'size' | 'updated_at'>; fieldsTemplate?: Array<'amp' | 'created' | 'editor_type' | 'html' | 'name' | 'text' | 'updated'>; include?: Array<'campaign' | 'image' | 'template'>; }): Promise<{ response: AxiosResponse; body: GetCampaignMessageResponseCompoundDocument; }>; /** * Get the estimated recipient count for a campaign with the provided campaign ID. You can refresh this count by using the `Create Campaign Recipient Estimation Job` endpoint.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaign Recipient Estimation * @param id The ID of the campaign for which to get the estimated number of recipients * @param fieldsCampaignRecipientEstimation For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getCampaignRecipientEstimation(id: string, options?: { fieldsCampaignRecipientEstimation?: Array<'estimated_recipient_count'>; }): Promise<{ response: AxiosResponse; body: GetCampaignRecipientEstimationResponse; }>; /** * Retrieve the status of a recipient estimation job triggered with the `Create Campaign Recipient Estimation Job` endpoint.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaign Recipient Estimation Job * @param id The ID of the campaign to get recipient estimation status * @param fieldsCampaignRecipientEstimationJob For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getCampaignRecipientEstimationJob(id: string, options?: { fieldsCampaignRecipientEstimationJob?: Array<'status'>; }): Promise<{ response: AxiosResponse; body: GetCampaignRecipientEstimationJobResponse; }>; /** * Get a campaign send job

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaign Send Job * @param id The ID of the campaign to send * @param fieldsCampaignSendJob For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getCampaignSendJob(id: string, options?: { fieldsCampaignSendJob?: Array<'status'>; }): Promise<{ response: AxiosResponse; body: GetCampaignSendJobResponse; }>; /** * Returns some or all campaigns based on filters. A channel filter is required to list campaigns. Please provide either: `?filter=equals(messages.channel,\'email\')` to list email campaigns, or `?filter=equals(messages.channel,\'sms\')` to list SMS campaigns. `?filter=equals(messages.channel,\'mobile_push\')` to list mobile push campaigns.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Campaigns * @param filter For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` * @param fieldsCampaignMessage For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsCampaign For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsTag For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param include For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships* @param pageCursor For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination* @param sort For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting */ getCampaigns(filter: string, options?: { fieldsCampaignMessage?: Array<'created_at' | 'definition' | 'definition.channel' | 'definition.content' | 'definition.content.bcc_email' | 'definition.content.body' | 'definition.content.cc_email' | 'definition.content.dynamic_image' | 'definition.content.from_email' | 'definition.content.from_label' | 'definition.content.media_url' | 'definition.content.preview_text' | 'definition.content.reply_to_email' | 'definition.content.subject' | 'definition.content.title' | 'definition.kv_pairs' | 'definition.label' | 'definition.notification_type' | 'definition.options' | 'definition.options.badge' | 'definition.options.badge.badge_options' | 'definition.options.badge.badge_options.badge_config' | 'definition.options.badge.badge_options.set_from_property' | 'definition.options.badge.badge_options.value' | 'definition.options.badge.display' | 'definition.options.on_open' | 'definition.options.on_open.android_deep_link' | 'definition.options.on_open.ios_deep_link' | 'definition.options.on_open.type' | 'definition.options.play_sound' | 'definition.render_options' | 'definition.render_options.add_info_link' | 'definition.render_options.add_opt_out_language' | 'definition.render_options.add_org_prefix' | 'definition.render_options.shorten_links' | 'send_times' | 'updated_at'>; fieldsCampaign?: Array<'archived' | 'audiences' | 'audiences.excluded' | 'audiences.included' | 'created_at' | 'name' | 'scheduled_at' | 'send_options' | 'send_options.use_smart_sending' | 'send_strategy' | 'send_strategy.date' | 'send_strategy.datetime' | 'send_strategy.method' | 'send_strategy.options' | 'send_strategy.options.is_local' | 'send_strategy.options.send_past_recipients_immediately' | 'send_strategy.throttle_percentage' | 'send_time' | 'status' | 'tracking_options' | 'tracking_options.add_tracking_params' | 'tracking_options.custom_tracking_params' | 'tracking_options.is_tracking_clicks' | 'tracking_options.is_tracking_opens' | 'updated_at'>; fieldsTag?: Array<'name'>; include?: Array<'campaign-messages' | 'tags'>; pageCursor?: string; sort?: 'created_at' | '-created_at' | 'id' | '-id' | 'name' | '-name' | 'scheduled_at' | '-scheduled_at' | 'updated_at' | '-updated_at'; }): Promise<{ response: AxiosResponse; body: GetCampaignResponseCollectionCompoundDocument; }>; /** * Return the related image for a given campaign message

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `images:read` * @summary Get Image for Campaign Message * @param id * @param fieldsImage For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getImageForCampaignMessage(id: string, options?: { fieldsImage?: Array<'format' | 'hidden' | 'image_url' | 'name' | 'size' | 'updated_at'>; }): Promise<{ response: AxiosResponse; body: GetImageResponse; }>; /** * Returns the ID of the related image

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `images:read` * @summary Get Image ID for Campaign Message * @param id */ getImageIdForCampaignMessage(id: string): Promise<{ response: AxiosResponse; body: GetCampaignMessageImageRelationshipResponse; }>; /** * Returns the IDs of all messages associated with the given campaign.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Message IDs for Campaign * @param id */ getMessageIdsForCampaign(id: string): Promise<{ response: AxiosResponse; body: GetCampaignMessagesRelationshipsResponseCollection; }>; /** * Return all messages that belong to the given campaign.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` * @summary Get Messages for Campaign * @param id * @param fieldsCampaignMessage For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsCampaign For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsImage For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsTemplate For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param include For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships */ getMessagesForCampaign(id: string, options?: { fieldsCampaignMessage?: Array<'created_at' | 'definition' | 'definition.channel' | 'definition.content' | 'definition.content.bcc_email' | 'definition.content.body' | 'definition.content.cc_email' | 'definition.content.dynamic_image' | 'definition.content.from_email' | 'definition.content.from_label' | 'definition.content.media_url' | 'definition.content.preview_text' | 'definition.content.reply_to_email' | 'definition.content.subject' | 'definition.content.title' | 'definition.kv_pairs' | 'definition.label' | 'definition.notification_type' | 'definition.options' | 'definition.options.badge' | 'definition.options.badge.badge_options' | 'definition.options.badge.badge_options.badge_config' | 'definition.options.badge.badge_options.set_from_property' | 'definition.options.badge.badge_options.value' | 'definition.options.badge.display' | 'definition.options.on_open' | 'definition.options.on_open.android_deep_link' | 'definition.options.on_open.ios_deep_link' | 'definition.options.on_open.type' | 'definition.options.play_sound' | 'definition.render_options' | 'definition.render_options.add_info_link' | 'definition.render_options.add_opt_out_language' | 'definition.render_options.add_org_prefix' | 'definition.render_options.shorten_links' | 'send_times' | 'updated_at'>; fieldsCampaign?: Array<'archived' | 'audiences' | 'audiences.excluded' | 'audiences.included' | 'created_at' | 'name' | 'scheduled_at' | 'send_options' | 'send_options.use_smart_sending' | 'send_strategy' | 'send_strategy.date' | 'send_strategy.datetime' | 'send_strategy.method' | 'send_strategy.options' | 'send_strategy.options.is_local' | 'send_strategy.options.send_past_recipients_immediately' | 'send_strategy.throttle_percentage' | 'send_time' | 'status' | 'tracking_options' | 'tracking_options.add_tracking_params' | 'tracking_options.custom_tracking_params' | 'tracking_options.is_tracking_clicks' | 'tracking_options.is_tracking_opens' | 'updated_at'>; fieldsImage?: Array<'format' | 'hidden' | 'image_url' | 'name' | 'size' | 'updated_at'>; fieldsTemplate?: Array<'amp' | 'created' | 'editor_type' | 'html' | 'name' | 'text' | 'updated'>; include?: Array<'campaign' | 'image' | 'template'>; }): Promise<{ response: AxiosResponse; body: GetCampaignMessageResponseCollectionCompoundDocument; }>; /** * Returns the IDs of all tags associated with the given campaign.

*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `campaigns:read` `tags:read` * @summary Get Tag IDs for Campaign * @param id */ getTagIdsForCampaign(id: string): Promise<{ response: AxiosResponse; body: GetCampaignTagsRelationshipsResponseCollection; }>; /** * Return all tags that belong to the given campaign.

*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `campaigns:read` `tags:read` * @summary Get Tags for Campaign * @param id * @param fieldsTag For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getTagsForCampaign(id: string, options?: { fieldsTag?: Array<'name'>; }): Promise<{ response: AxiosResponse; body: GetTagResponseCollection; }>; /** * Return the related template

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `templates:read` * @summary Get Template for Campaign Message * @param id * @param fieldsTemplate For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getTemplateForCampaignMessage(id: string, options?: { fieldsTemplate?: Array<'amp' | 'created' | 'editor_type' | 'html' | 'name' | 'text' | 'updated'>; }): Promise<{ response: AxiosResponse; body: GetTemplateResponse; }>; /** * Returns the ID of the related template

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:read` `templates:read` * @summary Get Template ID for Campaign Message * @param id */ getTemplateIdForCampaignMessage(id: string): Promise<{ response: AxiosResponse; body: GetCampaignMessageTemplateRelationshipResponse; }>; /** * Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Refresh Campaign Recipient Estimation * @param campaignRecipientEstimationJobCreateQuery Trigger an asynchronous job to update the estimated number of recipients for the given campaign ID. Use the `Get Campaign Recipient Estimation Job` endpoint to retrieve the status of this estimation job. Use the `Get Campaign Recipient Estimation` endpoint to retrieve the estimated recipient count for a given campaign. */ refreshCampaignRecipientEstimation(campaignRecipientEstimationJobCreateQuery: CampaignRecipientEstimationJobCreateQuery): Promise<{ response: AxiosResponse; body: PostCampaignRecipientEstimationJobResponse; }>; /** * Trigger a campaign to send asynchronously

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Send Campaign * @param campaignSendJobCreateQuery Trigger the campaign to send asynchronously */ sendCampaign(campaignSendJobCreateQuery: CampaignSendJobCreateQuery): Promise<{ response: AxiosResponse; body: PostCampaignSendJobResponse; }>; /** * Update a campaign with the given campaign ID.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Update Campaign * @param id The campaign ID to be retrieved* @param campaignPartialUpdateQuery Update a campaign and return it */ updateCampaign(id: string, campaignPartialUpdateQuery: CampaignPartialUpdateQuery): Promise<{ response: AxiosResponse; body: PatchCampaignResponse; }>; /** * Update a campaign message

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` * @summary Update Campaign Message * @param id The message ID to be retrieved* @param campaignMessagePartialUpdateQuery Update a message and return it */ updateCampaignMessage(id: string, campaignMessagePartialUpdateQuery: CampaignMessagePartialUpdateQuery): Promise<{ response: AxiosResponse; body: PatchCampaignMessageResponse; }>; /** * Update a campaign message image

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `campaigns:write` `images:read` * @summary Update Image for Campaign Message * @param id * @param campaignMessageImageUpdateQuery */ updateImageForCampaignMessage(id: string, campaignMessageImageUpdateQuery: CampaignMessageImageUpdateQuery): Promise<{ response: AxiosResponse; body?: any; }>; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.assignTemplateToCampaignMessage} * * @deprecated Use {@link CampaignsApi.assignTemplateToCampaignMessage} instead */ createCampaignMessageAssignTemplate: typeof CampaignsApi.prototype.assignTemplateToCampaignMessage; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.cancelCampaignSend} * * @deprecated Use {@link CampaignsApi.cancelCampaignSend} instead */ updateCampaignSendJob: typeof CampaignsApi.prototype.cancelCampaignSend; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.createCampaignClone} * * @deprecated Use {@link CampaignsApi.createCampaignClone} instead */ cloneCampaign: typeof CampaignsApi.prototype.createCampaignClone; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getCampaignForCampaignMessage} * * @deprecated Use {@link CampaignsApi.getCampaignForCampaignMessage} instead */ getCampaignMessageCampaign: typeof CampaignsApi.prototype.getCampaignForCampaignMessage; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getCampaignIdForCampaignMessage} * * @deprecated Use {@link CampaignsApi.getCampaignIdForCampaignMessage} instead */ getCampaignMessageRelationshipsCampaign: typeof CampaignsApi.prototype.getCampaignIdForCampaignMessage; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getImageForCampaignMessage} * * @deprecated Use {@link CampaignsApi.getImageForCampaignMessage} instead */ getCampaignMessageImage: typeof CampaignsApi.prototype.getImageForCampaignMessage; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getImageIdForCampaignMessage} * * @deprecated Use {@link CampaignsApi.getImageIdForCampaignMessage} instead */ getCampaignMessageRelationshipsImage: typeof CampaignsApi.prototype.getImageIdForCampaignMessage; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getMessageIdsForCampaign} * * @deprecated Use {@link CampaignsApi.getMessageIdsForCampaign} instead */ getCampaignRelationshipsCampaignMessages: typeof CampaignsApi.prototype.getMessageIdsForCampaign; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getMessageIdsForCampaign} * * @deprecated Use {@link CampaignsApi.getMessageIdsForCampaign} instead */ getCampaignRelationshipsMessages: typeof CampaignsApi.prototype.getMessageIdsForCampaign; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getMessagesForCampaign} * * @deprecated Use {@link CampaignsApi.getMessagesForCampaign} instead */ getCampaignCampaignMessages: typeof CampaignsApi.prototype.getMessagesForCampaign; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getMessagesForCampaign} * * @deprecated Use {@link CampaignsApi.getMessagesForCampaign} instead */ getCampaignMessages: typeof CampaignsApi.prototype.getMessagesForCampaign; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getTagIdsForCampaign} * * @deprecated Use {@link CampaignsApi.getTagIdsForCampaign} instead */ getCampaignRelationshipsTags: typeof CampaignsApi.prototype.getTagIdsForCampaign; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getTagsForCampaign} * * @deprecated Use {@link CampaignsApi.getTagsForCampaign} instead */ getCampaignTags: typeof CampaignsApi.prototype.getTagsForCampaign; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getTemplateForCampaignMessage} * * @deprecated Use {@link CampaignsApi.getTemplateForCampaignMessage} instead */ getCampaignMessageTemplate: typeof CampaignsApi.prototype.getTemplateForCampaignMessage; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.getTemplateIdForCampaignMessage} * * @deprecated Use {@link CampaignsApi.getTemplateIdForCampaignMessage} instead */ getCampaignMessageRelationshipsTemplate: typeof CampaignsApi.prototype.getTemplateIdForCampaignMessage; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.refreshCampaignRecipientEstimation} * * @deprecated Use {@link CampaignsApi.refreshCampaignRecipientEstimation} instead */ createCampaignRecipientEstimationJob: typeof CampaignsApi.prototype.refreshCampaignRecipientEstimation; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.sendCampaign} * * @deprecated Use {@link CampaignsApi.sendCampaign} instead */ createCampaignSendJob: typeof CampaignsApi.prototype.sendCampaign; } export interface CampaignsApi { /** * Alias of {@link CampaignsApi.updateImageForCampaignMessage} * * @deprecated Use {@link CampaignsApi.updateImageForCampaignMessage} instead */ updateCampaignMessageRelationshipsImage: typeof CampaignsApi.prototype.updateImageForCampaignMessage; }