/** * 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 { GetFlowResponseCollection } from '../model/getFlowResponseCollection'; import { GetListFlowTriggersRelationshipsResponseCollection } from '../model/getListFlowTriggersRelationshipsResponseCollection'; import { GetListListResponseCollectionCompoundDocument } from '../model/getListListResponseCollectionCompoundDocument'; import { GetListMemberResponseCollection } from '../model/getListMemberResponseCollection'; import { GetListProfilesRelationshipsResponseCollection } from '../model/getListProfilesRelationshipsResponseCollection'; import { GetListRetrieveResponseCompoundDocument } from '../model/getListRetrieveResponseCompoundDocument'; import { GetListTagsRelationshipsResponseCollection } from '../model/getListTagsRelationshipsResponseCollection'; import { GetTagResponseCollection } from '../model/getTagResponseCollection'; import { ListCreateQuery } from '../model/listCreateQuery'; import { ListMembersAddQuery } from '../model/listMembersAddQuery'; import { ListMembersDeleteQuery } from '../model/listMembersDeleteQuery'; import { ListPartialUpdateQuery } from '../model/listPartialUpdateQuery'; import { PatchListPartialUpdateResponse } from '../model/patchListPartialUpdateResponse'; import { PostListCreateResponse } from '../model/postListCreateResponse'; import { Session } from './apis'; export declare class ListsApi { 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; /** * Add a profile to a list with the given list ID. It is recommended that you use the [Subscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/subscribe_profiles) if you\'re trying to give a profile [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) to receive email marketing, SMS marketing, or both. This endpoint accepts a maximum of 1000 profiles per call.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:write` `profiles:write` * @summary Add Profiles to List * @param id * @param listMembersAddQuery */ addProfilesToList(id: string, listMembersAddQuery: ListMembersAddQuery): Promise<{ response: AxiosResponse; body?: any; }>; /** * Create a new list.

*Rate limits*:
Burst: `10/s`
Steady: `150/m`
Daily: `150/d` **Scopes:** `lists:write` * @summary Create List * @param listCreateQuery */ createList(listCreateQuery: ListCreateQuery): Promise<{ response: AxiosResponse; body: PostListCreateResponse; }>; /** * Delete a list with the given list ID.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:write` * @summary Delete List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. */ deleteList(id: string): Promise<{ response: AxiosResponse; body?: any; }>; /** * Get all flows where the given list ID is being used as the trigger.

*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `flows:read` `lists:read` * @summary Get Flows Triggered by List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. * @param fieldsFlow For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getFlowsTriggeredByList(id: string, options?: { fieldsFlow?: Array<'archived' | 'created' | 'name' | 'status' | 'trigger_type' | 'updated'>; }): Promise<{ response: AxiosResponse; body: GetFlowResponseCollection; }>; /** * Get the IDs of all flows where the given list is being used as the trigger.

*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `flows:read` `lists:read` * @summary Get IDs for Flows Triggered by List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. */ getIdsForFlowsTriggeredByList(id: string): Promise<{ response: AxiosResponse; body: GetListFlowTriggersRelationshipsResponseCollection; }>; /** * Get a list with the given list ID.

*Rate limits*:
Burst: `75/s`
Steady: `750/m`

Rate limits when using the `additional-fields[list]=profile_count` parameter in your API request:
Burst: `1/s`
Steady: `15/m`

To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2026-04-15/docs/rate_limits_and_error_handling) guide. **Scopes:** `lists:read` * @summary Get List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. * @param additionalFieldsList Request additional fields not included by default in the response. Supported values: \'profile_count\'* @param fieldsFlow For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsList 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 */ getList(id: string, options?: { additionalFieldsList?: Array<'profile_count'>; fieldsFlow?: Array<'archived' | 'created' | 'name' | 'status' | 'trigger_type' | 'updated'>; fieldsList?: Array<'created' | 'name' | 'opt_in_process' | 'profile_count' | 'updated'>; fieldsTag?: Array<'name'>; include?: Array<'flow-triggers' | 'tags'>; }): Promise<{ response: AxiosResponse; body: GetListRetrieveResponseCompoundDocument; }>; /** * Get all lists in an account. Filter to request a subset of all lists. Lists can be filtered by `id`, `name`, `created`, and `updated` fields. Returns a maximum of 10 results per page.

*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `lists:read` * @summary Get Lists * @param fieldsFlow For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsList 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 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>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than`* @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 */ getLists(options?: { fieldsFlow?: Array<'archived' | 'created' | 'name' | 'status' | 'trigger_type' | 'updated'>; fieldsList?: Array<'created' | 'name' | 'opt_in_process' | 'updated'>; fieldsTag?: Array<'name'>; filter?: string; include?: Array<'flow-triggers' | 'tags'>; pageCursor?: string; sort?: 'created' | '-created' | 'id' | '-id' | 'name' | '-name' | 'updated' | '-updated'; }): Promise<{ response: AxiosResponse; body: GetListListResponseCollectionCompoundDocument; }>; /** * Get profile membership [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a list with the given list ID.

*Rate limits*:
Burst: `75/s`
Steady: `750/m`

Rate limits when using the `additional-fields[profile]=predictive_analytics` parameter in your API request:
Burst: `10/s`
Steady: `150/m`

To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2026-04-15/docs/rate_limits_and_error_handling) guide. **Scopes:** `lists:read` `profiles:read` * @summary Get Profile IDs for List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. * @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>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`push_token`: `any`, `equals`<br>`_kx`: `equals`<br>`joined_group_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`* @param pageCursor For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination* @param pageSize Default: 20. Min: 1. Max: 100.* @param sort For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting */ getProfileIdsForList(id: string, options?: { filter?: string; pageCursor?: string; pageSize?: number; sort?: 'joined_group_at' | '-joined_group_at'; }): Promise<{ response: AxiosResponse; body: GetListProfilesRelationshipsResponseCollection; }>; /** * Get all profiles within a list with the given list ID. Filter to request a subset of all profiles. Profiles can be filtered by `email`, `phone_number`, `push_token`, and `joined_group_at` fields. Profiles can be sorted by the following fields, in ascending and descending order: `joined_group_at`

*Rate limits*:
Burst: `75/s`
Steady: `750/m`

Rate limits when using the `additional-fields[profile]=predictive_analytics` parameter in your API request:
Burst: `10/s`
Steady: `150/m`

To learn more about how the `additional-fields` parameter impacts rate limits, check out our [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/v2026-04-15/docs/rate_limits_and_error_handling) guide. **Scopes:** `lists:read` `profiles:read` * @summary Get Profiles for List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. * @param additionalFieldsProfile Request additional fields not included by default in the response. Supported values: \'subscriptions\', \'predictive_analytics\'* @param fieldsProfile For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @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>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`push_token`: `any`, `equals`<br>`_kx`: `equals`<br>`joined_group_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`* @param pageCursor For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination* @param pageSize Default: 20. Min: 1. Max: 100.* @param sort For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting */ getProfilesForList(id: string, options?: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>; fieldsProfile?: Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | 'joined_group_at' | 'last_event_date' | 'last_name' | 'locale' | 'location' | 'location.address1' | 'location.address2' | 'location.city' | 'location.country' | 'location.ip' | 'location.latitude' | 'location.longitude' | 'location.region' | 'location.timezone' | 'location.zip' | 'organization' | 'phone_number' | 'predictive_analytics' | 'predictive_analytics.average_days_between_orders' | 'predictive_analytics.average_order_value' | 'predictive_analytics.churn_probability' | 'predictive_analytics.expected_date_of_next_order' | 'predictive_analytics.historic_clv' | 'predictive_analytics.historic_number_of_orders' | 'predictive_analytics.predicted_clv' | 'predictive_analytics.predicted_number_of_orders' | 'predictive_analytics.ranked_channel_affinity' | 'predictive_analytics.total_clv' | 'properties' | 'subscriptions' | 'subscriptions.email' | 'subscriptions.email.marketing' | 'subscriptions.email.marketing.can_receive_email_marketing' | 'subscriptions.email.marketing.consent' | 'subscriptions.email.marketing.consent_timestamp' | 'subscriptions.email.marketing.custom_method_detail' | 'subscriptions.email.marketing.double_optin' | 'subscriptions.email.marketing.last_updated' | 'subscriptions.email.marketing.list_suppressions' | 'subscriptions.email.marketing.method' | 'subscriptions.email.marketing.method_detail' | 'subscriptions.email.marketing.suppression' | 'subscriptions.mobile_push' | 'subscriptions.mobile_push.marketing' | 'subscriptions.mobile_push.marketing.can_receive_push_marketing' | 'subscriptions.mobile_push.marketing.consent' | 'subscriptions.mobile_push.marketing.consent_timestamp' | 'subscriptions.sms' | 'subscriptions.sms.marketing' | 'subscriptions.sms.marketing.can_receive_sms_marketing' | 'subscriptions.sms.marketing.consent' | 'subscriptions.sms.marketing.consent_timestamp' | 'subscriptions.sms.marketing.last_updated' | 'subscriptions.sms.marketing.method' | 'subscriptions.sms.marketing.method_detail' | 'subscriptions.sms.transactional' | 'subscriptions.sms.transactional.can_receive_sms_transactional' | 'subscriptions.sms.transactional.consent' | 'subscriptions.sms.transactional.consent_timestamp' | 'subscriptions.sms.transactional.last_updated' | 'subscriptions.sms.transactional.method' | 'subscriptions.sms.transactional.method_detail' | 'subscriptions.whatsapp' | 'subscriptions.whatsapp.conversational' | 'subscriptions.whatsapp.conversational.can_receive' | 'subscriptions.whatsapp.conversational.consent' | 'subscriptions.whatsapp.conversational.consent_timestamp' | 'subscriptions.whatsapp.conversational.created_timestamp' | 'subscriptions.whatsapp.conversational.last_updated' | 'subscriptions.whatsapp.conversational.metadata' | 'subscriptions.whatsapp.conversational.phone_number' | 'subscriptions.whatsapp.conversational.valid_until' | 'subscriptions.whatsapp.marketing' | 'subscriptions.whatsapp.marketing.can_receive' | 'subscriptions.whatsapp.marketing.consent' | 'subscriptions.whatsapp.marketing.consent_timestamp' | 'subscriptions.whatsapp.marketing.created_timestamp' | 'subscriptions.whatsapp.marketing.last_updated' | 'subscriptions.whatsapp.marketing.metadata' | 'subscriptions.whatsapp.marketing.phone_number' | 'subscriptions.whatsapp.marketing.valid_until' | 'subscriptions.whatsapp.transactional' | 'subscriptions.whatsapp.transactional.can_receive' | 'subscriptions.whatsapp.transactional.consent' | 'subscriptions.whatsapp.transactional.consent_timestamp' | 'subscriptions.whatsapp.transactional.created_timestamp' | 'subscriptions.whatsapp.transactional.last_updated' | 'subscriptions.whatsapp.transactional.metadata' | 'subscriptions.whatsapp.transactional.phone_number' | 'subscriptions.whatsapp.transactional.valid_until' | 'title' | 'updated'>; filter?: string; pageCursor?: string; pageSize?: number; sort?: 'joined_group_at' | '-joined_group_at'; }): Promise<{ response: AxiosResponse; body: GetListMemberResponseCollection; }>; /** * Return all tags associated with the given list ID.

*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `lists:read` `tags:read` * @summary Get Tag IDs for List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. */ getTagIdsForList(id: string): Promise<{ response: AxiosResponse; body: GetListTagsRelationshipsResponseCollection; }>; /** * Return all tags associated with the given list ID.

*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `lists:read` `tags:read` * @summary Get Tags for List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo. * @param fieldsTag For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets */ getTagsForList(id: string, options?: { fieldsTag?: Array<'name'>; }): Promise<{ response: AxiosResponse; body: GetTagResponseCollection; }>; /** * Remove a profile from a list with the given list ID. The provided profile will no longer receive marketing from this particular list once removed. Removing a profile from a list will not impact the profile\'s [consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api) status or subscription status in general. To update a profile\'s subscription status, please use the [Unsubscribe Profiles endpoint](https://developers.klaviyo.com/en/reference/unsubscribe_profiles). This endpoint accepts a maximum of 1000 profiles per call.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:write` `profiles:write` * @summary Remove Profiles from List * @param id * @param listMembersDeleteQuery */ removeProfilesFromList(id: string, listMembersDeleteQuery: ListMembersDeleteQuery): Promise<{ response: AxiosResponse; body?: any; }>; /** * Update the name of a list with the given list ID.

*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:write` * @summary Update List * @param id Primary key that uniquely identifies this list. Generated by Klaviyo.* @param listPartialUpdateQuery */ updateList(id: string, listPartialUpdateQuery: ListPartialUpdateQuery): Promise<{ response: AxiosResponse; body: PatchListPartialUpdateResponse; }>; } export interface ListsApi { /** * Alias of {@link ListsApi.addProfilesToList} * * @deprecated Use {@link ListsApi.addProfilesToList} instead */ createListRelationships: typeof ListsApi.prototype.addProfilesToList; } export interface ListsApi { /** * Alias of {@link ListsApi.addProfilesToList} * * @deprecated Use {@link ListsApi.addProfilesToList} instead */ createListRelationshipsProfile: typeof ListsApi.prototype.addProfilesToList; } export interface ListsApi { /** * Alias of {@link ListsApi.addProfilesToList} * * @deprecated Use {@link ListsApi.addProfilesToList} instead */ createListRelationshipsProfiles: typeof ListsApi.prototype.addProfilesToList; } export interface ListsApi { /** * Alias of {@link ListsApi.getFlowsTriggeredByList} * * @deprecated Use {@link ListsApi.getFlowsTriggeredByList} instead */ getFlowTriggersForList: typeof ListsApi.prototype.getFlowsTriggeredByList; } export interface ListsApi { /** * Alias of {@link ListsApi.getFlowsTriggeredByList} * * @deprecated Use {@link ListsApi.getFlowsTriggeredByList} instead */ getListFlowTriggers: typeof ListsApi.prototype.getFlowsTriggeredByList; } export interface ListsApi { /** * Alias of {@link ListsApi.getIdsForFlowsTriggeredByList} * * @deprecated Use {@link ListsApi.getIdsForFlowsTriggeredByList} instead */ getFlowTriggerIdsForList: typeof ListsApi.prototype.getIdsForFlowsTriggeredByList; } export interface ListsApi { /** * Alias of {@link ListsApi.getIdsForFlowsTriggeredByList} * * @deprecated Use {@link ListsApi.getIdsForFlowsTriggeredByList} instead */ getListRelationshipsFlowTriggers: typeof ListsApi.prototype.getIdsForFlowsTriggeredByList; } export interface ListsApi { /** * Alias of {@link ListsApi.getProfileIdsForList} * * @deprecated Use {@link ListsApi.getProfileIdsForList} instead */ getListRelationshipsProfiles: typeof ListsApi.prototype.getProfileIdsForList; } export interface ListsApi { /** * Alias of {@link ListsApi.getProfilesForList} * * @deprecated Use {@link ListsApi.getProfilesForList} instead */ getListProfiles: typeof ListsApi.prototype.getProfilesForList; } export interface ListsApi { /** * Alias of {@link ListsApi.getTagIdsForList} * * @deprecated Use {@link ListsApi.getTagIdsForList} instead */ getListRelationshipsTags: typeof ListsApi.prototype.getTagIdsForList; } export interface ListsApi { /** * Alias of {@link ListsApi.getTagsForList} * * @deprecated Use {@link ListsApi.getTagsForList} instead */ getListTags: typeof ListsApi.prototype.getTagsForList; } export interface ListsApi { /** * Alias of {@link ListsApi.removeProfilesFromList} * * @deprecated Use {@link ListsApi.removeProfilesFromList} instead */ deleteListRelationships: typeof ListsApi.prototype.removeProfilesFromList; } export interface ListsApi { /** * Alias of {@link ListsApi.removeProfilesFromList} * * @deprecated Use {@link ListsApi.removeProfilesFromList} instead */ deleteListRelationshipsProfiles: typeof ListsApi.prototype.removeProfilesFromList; }