/**
* 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.
*/
const axios = require('axios');
import {AxiosRequestConfig, AxiosResponse} from "axios";
import FormData from 'form-data'
/* tslint:disable:no-unused-locals */
import { GetAccounts4XXResponse } from '../model/getAccounts4XXResponse';
import { GetBulkProfileSuppressionsCreateJobResponse } from '../model/getBulkProfileSuppressionsCreateJobResponse';
import { GetBulkProfileSuppressionsCreateJobResponseCollection } from '../model/getBulkProfileSuppressionsCreateJobResponseCollection';
import { GetBulkProfileSuppressionsRemoveJobResponse } from '../model/getBulkProfileSuppressionsRemoveJobResponse';
import { GetBulkProfileSuppressionsRemoveJobResponseCollection } from '../model/getBulkProfileSuppressionsRemoveJobResponseCollection';
import { GetConversationResponse } from '../model/getConversationResponse';
import { GetImportErrorResponseCollection } from '../model/getImportErrorResponseCollection';
import { GetListResponseCollection } from '../model/getListResponseCollection';
import { GetProfileBulkImportJobListsRelationshipsResponseCollection } from '../model/getProfileBulkImportJobListsRelationshipsResponseCollection';
import { GetProfileBulkImportJobProfilesRelationshipsResponseCollection } from '../model/getProfileBulkImportJobProfilesRelationshipsResponseCollection';
import { GetProfileConversationRelationshipResponse } from '../model/getProfileConversationRelationshipResponse';
import { GetProfileImportJobResponseCollectionCompoundDocument } from '../model/getProfileImportJobResponseCollectionCompoundDocument';
import { GetProfileImportJobResponseCompoundDocument } from '../model/getProfileImportJobResponseCompoundDocument';
import { GetProfileListsRelationshipsResponseCollection } from '../model/getProfileListsRelationshipsResponseCollection';
import { GetProfilePushTokensRelationshipsResponseCollection } from '../model/getProfilePushTokensRelationshipsResponseCollection';
import { GetProfileResponse } from '../model/getProfileResponse';
import { GetProfileResponseCollection } from '../model/getProfileResponseCollection';
import { GetProfileResponseCollectionCompoundDocument } from '../model/getProfileResponseCollectionCompoundDocument';
import { GetProfileResponseCompoundDocument } from '../model/getProfileResponseCompoundDocument';
import { GetProfileSegmentsRelationshipsResponseCollection } from '../model/getProfileSegmentsRelationshipsResponseCollection';
import { GetPushTokenProfileRelationshipResponse } from '../model/getPushTokenProfileRelationshipResponse';
import { GetPushTokenResponseCollection } from '../model/getPushTokenResponseCollection';
import { GetPushTokenResponseCollectionCompoundDocument } from '../model/getPushTokenResponseCollectionCompoundDocument';
import { GetPushTokenResponseCompoundDocument } from '../model/getPushTokenResponseCompoundDocument';
import { GetSegmentResponseCollection } from '../model/getSegmentResponseCollection';
import { PatchProfileResponse } from '../model/patchProfileResponse';
import { PostBulkProfileSuppressionsCreateJobResponse } from '../model/postBulkProfileSuppressionsCreateJobResponse';
import { PostBulkProfileSuppressionsRemoveJobResponse } from '../model/postBulkProfileSuppressionsRemoveJobResponse';
import { PostProfileImportJobResponse } from '../model/postProfileImportJobResponse';
import { PostProfileMergeResponse } from '../model/postProfileMergeResponse';
import { PostProfileResponse } from '../model/postProfileResponse';
import { ProfileCreateQuery } from '../model/profileCreateQuery';
import { ProfileImportJobCreateQuery } from '../model/profileImportJobCreateQuery';
import { ProfileMergeQuery } from '../model/profileMergeQuery';
import { ProfilePartialUpdateQuery } from '../model/profilePartialUpdateQuery';
import { ProfileUpsertQuery } from '../model/profileUpsertQuery';
import { PushTokenCreateQuery } from '../model/pushTokenCreateQuery';
import { SubscriptionCreateJobCreateQuery } from '../model/subscriptionCreateJobCreateQuery';
import { SubscriptionDeleteJobCreateQuery } from '../model/subscriptionDeleteJobCreateQuery';
import { SuppressionCreateJobCreateQuery } from '../model/suppressionCreateJobCreateQuery';
import { SuppressionDeleteJobCreateQuery } from '../model/suppressionDeleteJobCreateQuery';
import { ObjectSerializer } from '../model/models';
import {RequestFile, queryParamPreProcessor, RetryWithExponentialBackoff, Session} from './apis';
let defaultBasePath = 'https://a.klaviyo.com';
// ===============================================
// This file is autogenerated - Please do not edit
// ===============================================
export class ProfilesApi {
session: Session
protected _basePath = defaultBasePath;
protected _defaultHeaders : any = {};
protected _useQuerystring : boolean = false;
constructor(session: Session){
this.session = session
}
set useQuerystring(value: boolean) {
this._useQuerystring = value;
}
set basePath(basePath: string) {
this._basePath = basePath;
}
set defaultHeaders(defaultHeaders: any) {
this._defaultHeaders = defaultHeaders;
}
get defaultHeaders() {
return this._defaultHeaders;
}
get basePath() {
return this._basePath;
}
/**
* Create a bulk profile import job to create or update a batch of profiles. Accepts up to 10,000 profiles per request. The maximum allowed payload size is 5MB. The maximum allowed payload size per-profile is 100KB. To learn more, see our [Bulk Profile Import API guide](https://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_api).
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:write` `profiles:write`
* @summary Bulk Import Profiles
* @param profileImportJobCreateQuery
*/
public async bulkImportProfiles (profileImportJobCreateQuery: ProfileImportJobCreateQuery, ): Promise<{ response: AxiosResponse; body: PostProfileImportJobResponse; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'profileImportJobCreateQuery' is not null or undefined
if (profileImportJobCreateQuery === null || profileImportJobCreateQuery === undefined) {
throw new Error('Required parameter profileImportJobCreateQuery was null or undefined when calling bulkImportProfiles.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(profileImportJobCreateQuery, "ProfileImportJobCreateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: PostProfileImportJobResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "PostProfileImportJobResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Subscribe one or more profiles to email marketing, SMS marketing, WhatsApp, or push. If the provided list has double opt-in enabled, profiles will receive a message requiring their confirmation before subscribing. Otherwise, profiles will be immediately subscribed without receiving a confirmation message. Learn more about [consent in this guide](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). If a list is not provided, the opt-in process used will be determined by the [account-level default opt-in setting](https://www.klaviyo.com/settings/account/api-keys). To add someone to a list without changing their subscription status, use [Add Profile to List](https://developers.klaviyo.com/en/reference/create_list_relationships). This API will remove any `UNSUBSCRIBE`, `SPAM_REPORT` or `USER_SUPPRESSED` suppressions from the provided profiles. Learn more about [suppressed profiles](https://help.klaviyo.com/hc/en-us/articles/115005246108-Understanding-suppressed-email-profiles#what-is-a-suppressed-profile-1). Maximum number of profiles can be submitted for subscription: 1000 This endpoint now supports a `historical_import` flag. If this flag is set `true`, profiles being subscribed will bypass double opt-in emails and be subscribed immediately. They will also bypass any associated \"Added to list\" flows. This is useful for importing historical data where you have already collected consent. If `historical_import` is set to true, the `consented_at` field is required and must be in the past. Push tokens provided in `push_tokens` will be registered for each profile as long as push subscriptions are consented to.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `lists:write` `profiles:write` `subscriptions:write`
* @summary Bulk Subscribe Profiles
* @param subscriptionCreateJobCreateQuery Subscribes one or more profiles to marketing, with support for push channel and push tokens. All profiles will be added to the provided list. Either email or phone number is required. Both may be specified to subscribe to both channels. If a profile cannot be found matching the given identifier(s), a new profile will be created and then subscribed.
*/
public async bulkSubscribeProfiles (subscriptionCreateJobCreateQuery: SubscriptionCreateJobCreateQuery, ): Promise<{ response: AxiosResponse; body?: any; }> {
const localVarPath = this.basePath + '/api/profile-subscription-bulk-create-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'subscriptionCreateJobCreateQuery' is not null or undefined
if (subscriptionCreateJobCreateQuery === null || subscriptionCreateJobCreateQuery === undefined) {
throw new Error('Required parameter subscriptionCreateJobCreateQuery was null or undefined when calling bulkSubscribeProfiles.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(subscriptionCreateJobCreateQuery, "SubscriptionCreateJobCreateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body?: any; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Manually suppress profiles by email address or specify a segment/list ID to suppress all current members of a segment/list. Suppressed profiles cannot receive email marketing, independent of their consent status. To learn more, see our guides on [email suppressions](https://help.klaviyo.com/hc/en-us/articles/115005246108#what-is-a-suppressed-profile-1) and [collecting consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). Email address per request limit: 100
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `profiles:write` `subscriptions:write`
* @summary Bulk Suppress Profiles
* @param suppressionCreateJobCreateQuery Suppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, one will be created and immediately suppressed.
*/
public async bulkSuppressProfiles (suppressionCreateJobCreateQuery: SuppressionCreateJobCreateQuery, ): Promise<{ response: AxiosResponse; body: PostBulkProfileSuppressionsCreateJobResponse; }> {
const localVarPath = this.basePath + '/api/profile-suppression-bulk-create-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'suppressionCreateJobCreateQuery' is not null or undefined
if (suppressionCreateJobCreateQuery === null || suppressionCreateJobCreateQuery === undefined) {
throw new Error('Required parameter suppressionCreateJobCreateQuery was null or undefined when calling bulkSuppressProfiles.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(suppressionCreateJobCreateQuery, "SuppressionCreateJobCreateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: PostBulkProfileSuppressionsCreateJobResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "PostBulkProfileSuppressionsCreateJobResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* > 🚧 > > Profiles not in the specified list will be globally unsubscribed. Always verify profile list membership before calling this endpoint to avoid unintended global unsubscribes. Unsubscribe one or more profiles from email marketing, SMS marketing, push marketing, or a combination. Learn more about [consent in this guide](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). Push tokens provided in `subscriptions.push.tokens` will be removed for the specified profiles. To remove someone from a list without changing their subscription status, use [Remove Profiles from List](https://developers.klaviyo.com/en/reference/remove_profiles_from_list). Maximum number of profiles per call: 100
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `lists:write` `profiles:write` `subscriptions:write`
* @summary Bulk Unsubscribe Profiles
* @param subscriptionDeleteJobCreateQuery Unsubscribes one or more profiles from marketing. Supports email, SMS, WhatsApp, and push channels. All profiles will be removed from the provided list. Either email or phone number is required for email/SMS/WhatsApp channels. Push tokens can be removed by providing token strings directly. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed.
*/
public async bulkUnsubscribeProfiles (subscriptionDeleteJobCreateQuery: SubscriptionDeleteJobCreateQuery, ): Promise<{ response: AxiosResponse; body?: any; }> {
const localVarPath = this.basePath + '/api/profile-subscription-bulk-delete-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'subscriptionDeleteJobCreateQuery' is not null or undefined
if (subscriptionDeleteJobCreateQuery === null || subscriptionDeleteJobCreateQuery === undefined) {
throw new Error('Required parameter subscriptionDeleteJobCreateQuery was null or undefined when calling bulkUnsubscribeProfiles.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(subscriptionDeleteJobCreateQuery, "SubscriptionDeleteJobCreateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body?: any; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Manually unsuppress profiles by email address or specify a segment/list ID to unsuppress all current members of a segment/list. This only removes suppressions with reason USER_SUPPRESSED ; unsubscribed profiles and suppressed profiles with reason INVALID_EMAIL or HARD_BOUNCE remain unchanged. To learn more, see our guides on [email suppressions](https://help.klaviyo.com/hc/en-us/articles/115005246108#what-is-a-suppressed-profile-1) and [collecting consent](https://developers.klaviyo.com/en/docs/collect_email_and_sms_consent_via_api). Email address per request limit: 100
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `subscriptions:write`
* @summary Bulk Unsuppress Profiles
* @param suppressionDeleteJobCreateQuery Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken.
*/
public async bulkUnsuppressProfiles (suppressionDeleteJobCreateQuery: SuppressionDeleteJobCreateQuery, ): Promise<{ response: AxiosResponse; body: PostBulkProfileSuppressionsRemoveJobResponse; }> {
const localVarPath = this.basePath + '/api/profile-suppression-bulk-delete-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'suppressionDeleteJobCreateQuery' is not null or undefined
if (suppressionDeleteJobCreateQuery === null || suppressionDeleteJobCreateQuery === undefined) {
throw new Error('Required parameter suppressionDeleteJobCreateQuery was null or undefined when calling bulkUnsuppressProfiles.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(suppressionDeleteJobCreateQuery, "SuppressionDeleteJobCreateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: PostBulkProfileSuppressionsRemoveJobResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "PostBulkProfileSuppressionsRemoveJobResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Given a set of profile attributes and optionally an ID, create or update a profile. Returns 201 if a new profile was created, 200 if an existing profile was updated. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response. Note that setting a field to `null` will clear out the field, whereas not including a field in your request will leave it unchanged. The maximum allowed payload size is 100KB.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `profiles:write`
* @summary Create or Update Profile
* @param profileUpsertQuery
* @param additionalFieldsProfile Request additional fields not included by default in the response. Supported values: \'subscriptions\', \'predictive_analytics\'
*/
public async createOrUpdateProfile (profileUpsertQuery: ProfileUpsertQuery, options: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>, } = {}): Promise<{ response: AxiosResponse; body: PostProfileResponse; }> {
const localVarPath = this.basePath + '/api/profile-import';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'profileUpsertQuery' is not null or undefined
if (profileUpsertQuery === null || profileUpsertQuery === undefined) {
throw new Error('Required parameter profileUpsertQuery was null or undefined when calling createOrUpdateProfile.');
}
if (options.additionalFieldsProfile !== undefined) {
localVarQueryParameters['additional-fields[profile]'] = ObjectSerializer.serialize(options.additionalFieldsProfile, "Array<'subscriptions' | 'predictive_analytics'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(profileUpsertQuery, "ProfileUpsertQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: PostProfileResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "PostProfileResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Create a new profile. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response. The maximum allowed payload size is 100KB.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `profiles:write`
* @summary Create Profile
* @param profileCreateQuery
* @param additionalFieldsProfile Request additional fields not included by default in the response. Supported values: \'subscriptions\', \'predictive_analytics\'
*/
public async createProfile (profileCreateQuery: ProfileCreateQuery, options: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>, } = {}): Promise<{ response: AxiosResponse; body: PostProfileResponse; }> {
const localVarPath = this.basePath + '/api/profiles';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'profileCreateQuery' is not null or undefined
if (profileCreateQuery === null || profileCreateQuery === undefined) {
throw new Error('Required parameter profileCreateQuery was null or undefined when calling createProfile.');
}
if (options.additionalFieldsProfile !== undefined) {
localVarQueryParameters['additional-fields[profile]'] = ObjectSerializer.serialize(options.additionalFieldsProfile, "Array<'subscriptions' | 'predictive_analytics'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(profileCreateQuery, "ProfileCreateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: PostProfileResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "PostProfileResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Create or update a push token. This endpoint can be used to migrate push tokens from another platform to Klaviyo. Please use our mobile SDKs ([iOS](https://github.com/klaviyo/klaviyo-swift-sdk) and [Android](https://github.com/klaviyo/klaviyo-android-sdk)) to create push tokens from users\' devices. The maximum allowed payload size is 100KB.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `profiles:write` `push-tokens:write`
* @summary Create or Update Push Token
* @param pushTokenCreateQuery
*/
public async createPushToken (pushTokenCreateQuery: PushTokenCreateQuery, ): Promise<{ response: AxiosResponse; body?: any; }> {
const localVarPath = this.basePath + '/api/push-tokens';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'pushTokenCreateQuery' is not null or undefined
if (pushTokenCreateQuery === null || pushTokenCreateQuery === undefined) {
throw new Error('Required parameter pushTokenCreateQuery was null or undefined when calling createPushToken.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(pushTokenCreateQuery, "PushTokenCreateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body?: any; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Delete a specific push token based on its ID.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `push-tokens:write`
* @summary Delete Push Token
* @param id The value of the push token to delete
*/
public async deletePushToken (id: string, ): Promise<{ response: AxiosResponse; body?: any; }> {
const localVarPath = this.basePath + '/api/push-tokens/{id}'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deletePushToken.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'DELETE',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body?: any; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get a bulk profile import job with the given job ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:read` `profiles:read`
* @summary Get Bulk Import Profiles Job
* @param jobId ID of the job to retrieve.
* @param fieldsList For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsProfileBulkImportJob 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
*/
public async getBulkImportProfilesJob (jobId: string, options: { fieldsList?: Array<'created' | 'name' | 'opt_in_process' | 'updated'>, fieldsProfileBulkImportJob?: Array<'completed_at' | 'completed_count' | 'created_at' | 'expires_at' | 'failed_count' | 'started_at' | 'status' | 'total_count'>, include?: Array<'lists'>, } = {}): Promise<{ response: AxiosResponse; body: GetProfileImportJobResponseCompoundDocument; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs/{job_id}'
.replace('{' + 'job_id' + '}', encodeURIComponent(String(jobId)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'jobId' is not null or undefined
if (jobId === null || jobId === undefined) {
throw new Error('Required parameter jobId was null or undefined when calling getBulkImportProfilesJob.');
}
if (options.fieldsList !== undefined) {
localVarQueryParameters['fields[list]'] = ObjectSerializer.serialize(options.fieldsList, "Array<'created' | 'name' | 'opt_in_process' | 'updated'>");
}
if (options.fieldsProfileBulkImportJob !== undefined) {
localVarQueryParameters['fields[profile-bulk-import-job]'] = ObjectSerializer.serialize(options.fieldsProfileBulkImportJob, "Array<'completed_at' | 'completed_count' | 'created_at' | 'expires_at' | 'failed_count' | 'started_at' | 'status' | 'total_count'>");
}
if (options.include !== undefined) {
localVarQueryParameters['include'] = ObjectSerializer.serialize(options.include, "Array<'lists'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileImportJobResponseCompoundDocument; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileImportJobResponseCompoundDocument");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get all bulk profile import jobs. Returns a maximum of 100 jobs per request.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:read` `profiles:read`
* @summary Get Bulk Import Profiles Jobs
* @param fieldsProfileBulkImportJob 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>`status`: `any`, `equals`* @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
*/
public async getBulkImportProfilesJobs (options: { fieldsProfileBulkImportJob?: Array<'completed_at' | 'completed_count' | 'created_at' | 'expires_at' | 'failed_count' | 'started_at' | 'status' | 'total_count'>, filter?: string, pageCursor?: string, pageSize?: number, sort?: 'created_at' | '-created_at', } = {}): Promise<{ response: AxiosResponse; body: GetProfileImportJobResponseCollectionCompoundDocument; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
if (options.fieldsProfileBulkImportJob !== undefined) {
localVarQueryParameters['fields[profile-bulk-import-job]'] = ObjectSerializer.serialize(options.fieldsProfileBulkImportJob, "Array<'completed_at' | 'completed_count' | 'created_at' | 'expires_at' | 'failed_count' | 'started_at' | 'status' | 'total_count'>");
}
if (options.filter !== undefined) {
localVarQueryParameters['filter'] = ObjectSerializer.serialize(options.filter, "string");
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.pageSize !== undefined) {
localVarQueryParameters['page[size]'] = ObjectSerializer.serialize(options.pageSize, "number");
}
if (options.sort !== undefined) {
localVarQueryParameters['sort'] = ObjectSerializer.serialize(options.sort, "'created_at' | '-created_at'");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileImportJobResponseCollectionCompoundDocument; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileImportJobResponseCollectionCompoundDocument");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get the bulk suppress profiles job with the given job ID.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `subscriptions:read`
* @summary Get Bulk Suppress Profiles Job
* @param jobId ID of the job to retrieve.
* @param fieldsProfileSuppressionBulkCreateJob For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
*/
public async getBulkSuppressProfilesJob (jobId: string, options: { fieldsProfileSuppressionBulkCreateJob?: Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>, } = {}): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsCreateJobResponse; }> {
const localVarPath = this.basePath + '/api/profile-suppression-bulk-create-jobs/{job_id}'
.replace('{' + 'job_id' + '}', encodeURIComponent(String(jobId)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'jobId' is not null or undefined
if (jobId === null || jobId === undefined) {
throw new Error('Required parameter jobId was null or undefined when calling getBulkSuppressProfilesJob.');
}
if (options.fieldsProfileSuppressionBulkCreateJob !== undefined) {
localVarQueryParameters['fields[profile-suppression-bulk-create-job]'] = ObjectSerializer.serialize(options.fieldsProfileSuppressionBulkCreateJob, "Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsCreateJobResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetBulkProfileSuppressionsCreateJobResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get the status of all bulk profile suppression jobs.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `subscriptions:read`
* @summary Get Bulk Suppress Profiles Jobs
* @param fieldsProfileSuppressionBulkCreateJob 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>`status`: `equals`<br>`list_id`: `equals`<br>`segment_id`: `equals`* @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
*/
public async getBulkSuppressProfilesJobs (options: { fieldsProfileSuppressionBulkCreateJob?: Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>, filter?: string, pageCursor?: string, sort?: 'created' | '-created', } = {}): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsCreateJobResponseCollection; }> {
const localVarPath = this.basePath + '/api/profile-suppression-bulk-create-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
if (options.fieldsProfileSuppressionBulkCreateJob !== undefined) {
localVarQueryParameters['fields[profile-suppression-bulk-create-job]'] = ObjectSerializer.serialize(options.fieldsProfileSuppressionBulkCreateJob, "Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>");
}
if (options.filter !== undefined) {
localVarQueryParameters['filter'] = ObjectSerializer.serialize(options.filter, "string");
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.sort !== undefined) {
localVarQueryParameters['sort'] = ObjectSerializer.serialize(options.sort, "'created' | '-created'");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsCreateJobResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetBulkProfileSuppressionsCreateJobResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get the bulk unsuppress profiles job with the given job ID.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `subscriptions:read`
* @summary Get Bulk Unsuppress Profiles Job
* @param jobId ID of the job to retrieve.
* @param fieldsProfileSuppressionBulkDeleteJob For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
*/
public async getBulkUnsuppressProfilesJob (jobId: string, options: { fieldsProfileSuppressionBulkDeleteJob?: Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>, } = {}): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsRemoveJobResponse; }> {
const localVarPath = this.basePath + '/api/profile-suppression-bulk-delete-jobs/{job_id}'
.replace('{' + 'job_id' + '}', encodeURIComponent(String(jobId)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'jobId' is not null or undefined
if (jobId === null || jobId === undefined) {
throw new Error('Required parameter jobId was null or undefined when calling getBulkUnsuppressProfilesJob.');
}
if (options.fieldsProfileSuppressionBulkDeleteJob !== undefined) {
localVarQueryParameters['fields[profile-suppression-bulk-delete-job]'] = ObjectSerializer.serialize(options.fieldsProfileSuppressionBulkDeleteJob, "Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsRemoveJobResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetBulkProfileSuppressionsRemoveJobResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get all bulk unsuppress profiles jobs.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `subscriptions:read`
* @summary Get Bulk Unsuppress Profiles Jobs
* @param fieldsProfileSuppressionBulkDeleteJob 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>`status`: `equals`<br>`list_id`: `equals`<br>`segment_id`: `equals`* @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
*/
public async getBulkUnsuppressProfilesJobs (options: { fieldsProfileSuppressionBulkDeleteJob?: Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>, filter?: string, pageCursor?: string, sort?: 'created' | '-created', } = {}): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsRemoveJobResponseCollection; }> {
const localVarPath = this.basePath + '/api/profile-suppression-bulk-delete-jobs';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
if (options.fieldsProfileSuppressionBulkDeleteJob !== undefined) {
localVarQueryParameters['fields[profile-suppression-bulk-delete-job]'] = ObjectSerializer.serialize(options.fieldsProfileSuppressionBulkDeleteJob, "Array<'completed_at' | 'completed_count' | 'created_at' | 'skipped_count' | 'status' | 'total_count'>");
}
if (options.filter !== undefined) {
localVarQueryParameters['filter'] = ObjectSerializer.serialize(options.filter, "string");
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.sort !== undefined) {
localVarQueryParameters['sort'] = ObjectSerializer.serialize(options.sort, "'created' | '-created'");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetBulkProfileSuppressionsRemoveJobResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetBulkProfileSuppressionsRemoveJobResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get the conversation for a profile with the given profile ID.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `conversations:read` `profiles:read`
* @summary Get Conversation for Profile
* @param id
*/
public async getConversationForProfile (id: string, ): Promise<{ response: AxiosResponse; body: GetConversationResponse; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/conversation'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getConversationForProfile.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetConversationResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetConversationResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get the conversation relationship for a profile with the given profile ID.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `conversations:read` `profiles:read`
* @summary Get Conversation ID for Profile
* @param id
*/
public async getConversationIdForProfile (id: string, ): Promise<{ response: AxiosResponse; body: GetProfileConversationRelationshipResponse; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/relationships/conversation'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getConversationIdForProfile.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileConversationRelationshipResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileConversationRelationshipResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get import errors for the bulk profile import job with the given ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read`
* @summary Get Errors for Bulk Import Profiles Job
* @param id
* @param fieldsImportError For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @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.
*/
public async getErrorsForBulkImportProfilesJob (id: string, options: { fieldsImportError?: Array<'code' | 'detail' | 'original_payload' | 'source' | 'source.pointer' | 'title'>, pageCursor?: string, pageSize?: number, } = {}): Promise<{ response: AxiosResponse; body: GetImportErrorResponseCollection; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs/{id}/import-errors'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getErrorsForBulkImportProfilesJob.');
}
if (options.fieldsImportError !== undefined) {
localVarQueryParameters['fields[import-error]'] = ObjectSerializer.serialize(options.fieldsImportError, "Array<'code' | 'detail' | 'original_payload' | 'source' | 'source.pointer' | 'title'>");
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.pageSize !== undefined) {
localVarQueryParameters['page[size]'] = ObjectSerializer.serialize(options.pageSize, "number");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetImportErrorResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetImportErrorResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get list for the bulk profile import job with the given ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:read`
* @summary Get List for Bulk Import Profiles Job
* @param id
* @param fieldsList For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
*/
public async getListForBulkImportProfilesJob (id: string, options: { fieldsList?: Array<'created' | 'name' | 'opt_in_process' | 'updated'>, } = {}): Promise<{ response: AxiosResponse; body: GetListResponseCollection; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs/{id}/lists'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getListForBulkImportProfilesJob.');
}
if (options.fieldsList !== undefined) {
localVarQueryParameters['fields[list]'] = ObjectSerializer.serialize(options.fieldsList, "Array<'created' | 'name' | 'opt_in_process' | 'updated'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetListResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetListResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get list relationship for the bulk profile import job with the given ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `lists:read`
* @summary Get List IDs for Bulk Import Profiles Job
* @param id
*/
public async getListIdsForBulkImportProfilesJob (id: string, ): Promise<{ response: AxiosResponse; body: GetProfileBulkImportJobListsRelationshipsResponseCollection; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs/{id}/relationships/lists'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getListIdsForBulkImportProfilesJob.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileBulkImportJobListsRelationshipsResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileBulkImportJobListsRelationshipsResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get list memberships for a profile with the given profile ID.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `lists:read` `profiles:read`
* @summary Get List IDs for Profile
* @param id
*/
public async getListIdsForProfile (id: string, ): Promise<{ response: AxiosResponse; body: GetProfileListsRelationshipsResponseCollection; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/relationships/lists'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getListIdsForProfile.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileListsRelationshipsResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileListsRelationshipsResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get list memberships for a profile with the given profile ID.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `lists:read` `profiles:read`
* @summary Get Lists for Profile
* @param id
* @param fieldsList For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
*/
public async getListsForProfile (id: string, options: { fieldsList?: Array<'created' | 'name' | 'opt_in_process' | 'updated'>, } = {}): Promise<{ response: AxiosResponse; body: GetListResponseCollection; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/lists'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getListsForProfile.');
}
if (options.fieldsList !== undefined) {
localVarQueryParameters['fields[list]'] = ObjectSerializer.serialize(options.fieldsList, "Array<'created' | 'name' | 'opt_in_process' | 'updated'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetListResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetListResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get the profile with the given profile ID. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response.
*Rate limits*:
Burst: `75/s`
Steady: `750/m`
Rate limits when using the `include=list` parameter in your API request:
Burst: `1/s`
Steady: `15/m`
Rate limits when using the `include=segment` parameter in your API request:
Burst: `1/s`
Steady: `15/m`
To learn more about how the `include` 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:** `profiles:read`
* @summary Get Profile
* @param id
* @param additionalFieldsProfile Request additional fields not included by default in the response. Supported values: \'subscriptions\', \'predictive_analytics\'* @param fieldsList For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsProfile For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsPushToken For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsSegment 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
*/
public async getProfile (id: string, options: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>, fieldsList?: Array<'created' | 'name' | 'opt_in_process' | 'updated'>, fieldsProfile?: Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>, fieldsPushToken?: Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>, fieldsSegment?: Array<'created' | 'definition' | 'definition.condition_groups' | 'is_active' | 'is_processing' | 'is_starred' | 'name' | 'updated'>, include?: Array<'conversation' | 'lists' | 'push-tokens' | 'segments'>, } = {}): Promise<{ response: AxiosResponse; body: GetProfileResponseCompoundDocument; }> {
const localVarPath = this.basePath + '/api/profiles/{id}'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getProfile.');
}
if (options.additionalFieldsProfile !== undefined) {
localVarQueryParameters['additional-fields[profile]'] = ObjectSerializer.serialize(options.additionalFieldsProfile, "Array<'subscriptions' | 'predictive_analytics'>");
}
if (options.fieldsList !== undefined) {
localVarQueryParameters['fields[list]'] = ObjectSerializer.serialize(options.fieldsList, "Array<'created' | 'name' | 'opt_in_process' | 'updated'>");
}
if (options.fieldsProfile !== undefined) {
localVarQueryParameters['fields[profile]'] = ObjectSerializer.serialize(options.fieldsProfile, "Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>");
}
if (options.fieldsPushToken !== undefined) {
localVarQueryParameters['fields[push-token]'] = ObjectSerializer.serialize(options.fieldsPushToken, "Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>");
}
if (options.fieldsSegment !== undefined) {
localVarQueryParameters['fields[segment]'] = ObjectSerializer.serialize(options.fieldsSegment, "Array<'created' | 'definition' | 'definition.condition_groups' | 'is_active' | 'is_processing' | 'is_starred' | 'name' | 'updated'>");
}
if (options.include !== undefined) {
localVarQueryParameters['include'] = ObjectSerializer.serialize(options.include, "Array<'conversation' | 'lists' | 'push-tokens' | 'segments'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileResponseCompoundDocument; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileResponseCompoundDocument");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Return the profile associated with the given push token.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read` `push-tokens:read`
* @summary Get Profile for Push Token
* @param id The value of the push token
* @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
*/
public async getProfileForPushToken (id: string, options: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>, fieldsProfile?: Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>, } = {}): Promise<{ response: AxiosResponse; body: GetProfileResponse; }> {
const localVarPath = this.basePath + '/api/push-tokens/{id}/profile'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getProfileForPushToken.');
}
if (options.additionalFieldsProfile !== undefined) {
localVarQueryParameters['additional-fields[profile]'] = ObjectSerializer.serialize(options.additionalFieldsProfile, "Array<'subscriptions' | 'predictive_analytics'>");
}
if (options.fieldsProfile !== undefined) {
localVarQueryParameters['fields[profile]'] = ObjectSerializer.serialize(options.fieldsProfile, "Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Return the ID of the profile associated with the given push token.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read` `push-tokens:read`
* @summary Get Profile ID for Push Token
* @param id The value of the push token
*/
public async getProfileIdForPushToken (id: string, ): Promise<{ response: AxiosResponse; body: GetPushTokenProfileRelationshipResponse; }> {
const localVarPath = this.basePath + '/api/push-tokens/{id}/relationships/profile'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getProfileIdForPushToken.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetPushTokenProfileRelationshipResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetPushTokenProfileRelationshipResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get profile relationships for the bulk profile import job with the given ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read`
* @summary Get Profile IDs for Bulk Import Profiles Job
* @param id
* @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.
*/
public async getProfileIdsForBulkImportProfilesJob (id: string, options: { pageCursor?: string, pageSize?: number, } = {}): Promise<{ response: AxiosResponse; body: GetProfileBulkImportJobProfilesRelationshipsResponseCollection; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs/{id}/relationships/profiles'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getProfileIdsForBulkImportProfilesJob.');
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.pageSize !== undefined) {
localVarQueryParameters['page[size]'] = ObjectSerializer.serialize(options.pageSize, "number");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileBulkImportJobProfilesRelationshipsResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileBulkImportJobProfilesRelationshipsResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get all profiles in an account. Profiles can be sorted by the following fields in ascending and descending order: `id`, `created`, `updated`, `email`, `subscriptions.email.marketing.suppression.timestamp`, `subscriptions.email.marketing.list_suppressions.timestamp` Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response.
*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:** `profiles:read`
* @summary Get Profiles
* @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 fieldsPushToken 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>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than`<br>`subscriptions.email.marketing.list_suppressions.reason`: `equals`<br>`subscriptions.email.marketing.list_suppressions.timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`subscriptions.email.marketing.list_suppressions.list_id`: `equals`<br>`subscriptions.email.marketing.suppression.reason`: `equals`<br>`subscriptions.email.marketing.suppression.timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-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 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
*/
public async getProfiles (options: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>, fieldsProfile?: Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>, fieldsPushToken?: Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>, filter?: string, include?: Array<'conversation' | 'push-tokens'>, pageCursor?: string, pageSize?: number, sort?: 'created' | '-created' | 'email' | '-email' | 'id' | '-id' | 'subscriptions.email.marketing.list_suppressions.timestamp' | '-subscriptions.email.marketing.list_suppressions.timestamp' | 'subscriptions.email.marketing.suppression.timestamp' | '-subscriptions.email.marketing.suppression.timestamp' | 'updated' | '-updated', } = {}): Promise<{ response: AxiosResponse; body: GetProfileResponseCollectionCompoundDocument; }> {
const localVarPath = this.basePath + '/api/profiles';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
if (options.additionalFieldsProfile !== undefined) {
localVarQueryParameters['additional-fields[profile]'] = ObjectSerializer.serialize(options.additionalFieldsProfile, "Array<'subscriptions' | 'predictive_analytics'>");
}
if (options.fieldsProfile !== undefined) {
localVarQueryParameters['fields[profile]'] = ObjectSerializer.serialize(options.fieldsProfile, "Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>");
}
if (options.fieldsPushToken !== undefined) {
localVarQueryParameters['fields[push-token]'] = ObjectSerializer.serialize(options.fieldsPushToken, "Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>");
}
if (options.filter !== undefined) {
localVarQueryParameters['filter'] = ObjectSerializer.serialize(options.filter, "string");
}
if (options.include !== undefined) {
localVarQueryParameters['include'] = ObjectSerializer.serialize(options.include, "Array<'conversation' | 'push-tokens'>");
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.pageSize !== undefined) {
localVarQueryParameters['page[size]'] = ObjectSerializer.serialize(options.pageSize, "number");
}
if (options.sort !== undefined) {
localVarQueryParameters['sort'] = ObjectSerializer.serialize(options.sort, "'created' | '-created' | 'email' | '-email' | 'id' | '-id' | 'subscriptions.email.marketing.list_suppressions.timestamp' | '-subscriptions.email.marketing.list_suppressions.timestamp' | 'subscriptions.email.marketing.suppression.timestamp' | '-subscriptions.email.marketing.suppression.timestamp' | 'updated' | '-updated'");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileResponseCollectionCompoundDocument; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileResponseCollectionCompoundDocument");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get profiles for the bulk profile import job with the given ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read`
* @summary Get Profiles for Bulk Import Profiles Job
* @param id
* @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 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.
*/
public async getProfilesForBulkImportProfilesJob (id: string, options: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>, fieldsProfile?: Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>, pageCursor?: string, pageSize?: number, } = {}): Promise<{ response: AxiosResponse; body: GetProfileResponseCollection; }> {
const localVarPath = this.basePath + '/api/profile-bulk-import-jobs/{id}/profiles'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getProfilesForBulkImportProfilesJob.');
}
if (options.additionalFieldsProfile !== undefined) {
localVarQueryParameters['additional-fields[profile]'] = ObjectSerializer.serialize(options.additionalFieldsProfile, "Array<'subscriptions' | 'predictive_analytics'>");
}
if (options.fieldsProfile !== undefined) {
localVarQueryParameters['fields[profile]'] = ObjectSerializer.serialize(options.fieldsProfile, "Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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'>");
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.pageSize !== undefined) {
localVarQueryParameters['page[size]'] = ObjectSerializer.serialize(options.pageSize, "number");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Return a specific push token based on its ID.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read` `push-tokens:read`
* @summary Get Push Token
* @param id The value of the push token
* @param fieldsProfile For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsPushToken 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
*/
public async getPushToken (id: string, options: { fieldsProfile?: Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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' | 'properties' | 'title' | 'updated'>, fieldsPushToken?: Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>, include?: Array<'profile'>, } = {}): Promise<{ response: AxiosResponse; body: GetPushTokenResponseCompoundDocument; }> {
const localVarPath = this.basePath + '/api/push-tokens/{id}'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getPushToken.');
}
if (options.fieldsProfile !== undefined) {
localVarQueryParameters['fields[profile]'] = ObjectSerializer.serialize(options.fieldsProfile, "Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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' | 'properties' | 'title' | 'updated'>");
}
if (options.fieldsPushToken !== undefined) {
localVarQueryParameters['fields[push-token]'] = ObjectSerializer.serialize(options.fieldsPushToken, "Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>");
}
if (options.include !== undefined) {
localVarQueryParameters['include'] = ObjectSerializer.serialize(options.include, "Array<'profile'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetPushTokenResponseCompoundDocument; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetPushTokenResponseCompoundDocument");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Return the IDs of all push tokens associated with the given profile.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read`
* @summary Get Push Token IDs for Profile
* @param id
*/
public async getPushTokenIdsForProfile (id: string, ): Promise<{ response: AxiosResponse; body: GetProfilePushTokensRelationshipsResponseCollection; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/relationships/push-tokens'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getPushTokenIdsForProfile.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfilePushTokensRelationshipsResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfilePushTokensRelationshipsResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Return push tokens associated with company.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read` `push-tokens:read`
* @summary Get Push Tokens
* @param fieldsProfile For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets* @param fieldsPushToken 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>`id`: `equals`<br>`profile.id`: `equals`<br>`enablement_status`: `equals`<br>`platform`: `equals`* @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 pageSize Default: 20. Min: 1. Max: 100.
*/
public async getPushTokens (options: { fieldsProfile?: Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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' | 'properties' | 'title' | 'updated'>, fieldsPushToken?: Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>, filter?: string, include?: Array<'profile'>, pageCursor?: string, pageSize?: number, } = {}): Promise<{ response: AxiosResponse; body: GetPushTokenResponseCollectionCompoundDocument; }> {
const localVarPath = this.basePath + '/api/push-tokens';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
if (options.fieldsProfile !== undefined) {
localVarQueryParameters['fields[profile]'] = ObjectSerializer.serialize(options.fieldsProfile, "Array<'created' | 'email' | 'external_id' | 'first_name' | 'image' | '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' | 'properties' | 'title' | 'updated'>");
}
if (options.fieldsPushToken !== undefined) {
localVarQueryParameters['fields[push-token]'] = ObjectSerializer.serialize(options.fieldsPushToken, "Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>");
}
if (options.filter !== undefined) {
localVarQueryParameters['filter'] = ObjectSerializer.serialize(options.filter, "string");
}
if (options.include !== undefined) {
localVarQueryParameters['include'] = ObjectSerializer.serialize(options.include, "Array<'profile'>");
}
if (options.pageCursor !== undefined) {
localVarQueryParameters['page[cursor]'] = ObjectSerializer.serialize(options.pageCursor, "string");
}
if (options.pageSize !== undefined) {
localVarQueryParameters['page[size]'] = ObjectSerializer.serialize(options.pageSize, "number");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetPushTokenResponseCollectionCompoundDocument; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetPushTokenResponseCollectionCompoundDocument");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Return all push tokens that belong to the given profile.
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:read`
* @summary Get Push Tokens for Profile
* @param id
* @param fieldsPushToken For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
*/
public async getPushTokensForProfile (id: string, options: { fieldsPushToken?: Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>, } = {}): Promise<{ response: AxiosResponse; body: GetPushTokenResponseCollection; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/push-tokens'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getPushTokensForProfile.');
}
if (options.fieldsPushToken !== undefined) {
localVarQueryParameters['fields[push-token]'] = ObjectSerializer.serialize(options.fieldsPushToken, "Array<'background' | 'created' | 'enablement_status' | 'metadata' | 'metadata.app_build' | 'metadata.app_id' | 'metadata.app_name' | 'metadata.app_version' | 'metadata.device_id' | 'metadata.device_model' | 'metadata.environment' | 'metadata.klaviyo_sdk' | 'metadata.manufacturer' | 'metadata.os_name' | 'metadata.os_version' | 'metadata.sdk_version' | 'platform' | 'recorded_date' | 'token' | 'vendor'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetPushTokenResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetPushTokenResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get segment membership relationships for a profile with the given profile ID.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `profiles:read` `segments:read`
* @summary Get Segment IDs for Profile
* @param id
*/
public async getSegmentIdsForProfile (id: string, ): Promise<{ response: AxiosResponse; body: GetProfileSegmentsRelationshipsResponseCollection; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/relationships/segments'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSegmentIdsForProfile.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetProfileSegmentsRelationshipsResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetProfileSegmentsRelationshipsResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Get segment memberships for a profile with the given profile ID.
*Rate limits*:
Burst: `3/s`
Steady: `60/m` **Scopes:** `profiles:read` `segments:read`
* @summary Get Segments for Profile
* @param id
* @param fieldsSegment For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
*/
public async getSegmentsForProfile (id: string, options: { fieldsSegment?: Array<'created' | 'definition' | 'definition.condition_groups' | 'is_active' | 'is_processing' | 'is_starred' | 'name' | 'updated'>, } = {}): Promise<{ response: AxiosResponse; body: GetSegmentResponseCollection; }> {
const localVarPath = this.basePath + '/api/profiles/{id}/segments'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSegmentsForProfile.');
}
if (options.fieldsSegment !== undefined) {
localVarQueryParameters['fields[segment]'] = ObjectSerializer.serialize(options.fieldsSegment, "Array<'created' | 'definition' | 'definition.condition_groups' | 'is_active' | 'is_processing' | 'is_starred' | 'name' | 'updated'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'GET',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: GetSegmentResponseCollection; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "GetSegmentResponseCollection");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Merge a given related profile into a profile with the given profile ID. The profile provided under `relationships` (the \"source\" profile) will be merged into the profile provided by the ID in the base data object (the \"destination\" profile). This endpoint queues an asynchronous task which will merge data from the source profile into the destination profile, deleting the source profile in the process. This endpoint accepts only one source profile. To learn more about how profile data is preserved or overwritten during a merge, please [visit our Help Center](https://help.klaviyo.com/hc/en-us/articles/115005073847#merge-2-profiles3).
*Rate limits*:
Burst: `10/s`
Steady: `150/m` **Scopes:** `profiles:write`
* @summary Merge Profiles
* @param profileMergeQuery
*/
public async mergeProfiles (profileMergeQuery: ProfileMergeQuery, ): Promise<{ response: AxiosResponse; body: PostProfileMergeResponse; }> {
const localVarPath = this.basePath + '/api/profile-merge';
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'profileMergeQuery' is not null or undefined
if (profileMergeQuery === null || profileMergeQuery === undefined) {
throw new Error('Required parameter profileMergeQuery was null or undefined when calling mergeProfiles.');
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'POST',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(profileMergeQuery, "ProfileMergeQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: PostProfileMergeResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "PostProfileMergeResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
/**
* Update the profile with the given profile ID. Use the `additional-fields` parameter to include subscriptions and predictive analytics data in your response. Note that setting a field to `null` will clear out the field, whereas not including a field in your request will leave it unchanged. The maximum allowed payload size is 100KB.
*Rate limits*:
Burst: `75/s`
Steady: `750/m` **Scopes:** `profiles:write`
* @summary Update Profile
* @param id Primary key that uniquely identifies this profile. Generated by Klaviyo.* @param profilePartialUpdateQuery
* @param additionalFieldsProfile Request additional fields not included by default in the response. Supported values: \'subscriptions\', \'predictive_analytics\'
*/
public async updateProfile (id: string, profilePartialUpdateQuery: ProfilePartialUpdateQuery, options: { additionalFieldsProfile?: Array<'subscriptions' | 'predictive_analytics'>, } = {}): Promise<{ response: AxiosResponse; body: PatchProfileResponse; }> {
const localVarPath = this.basePath + '/api/profiles/{id}'
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders);
const produces = ['application/vnd.api+json'];
// give precedence to 'application/json'
if (produces.indexOf('application/json') >= 0) {
localVarHeaderParams.Accept = 'application/json';
} else {
localVarHeaderParams.Accept = produces.join(',');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateProfile.');
}
// verify required parameter 'profilePartialUpdateQuery' is not null or undefined
if (profilePartialUpdateQuery === null || profilePartialUpdateQuery === undefined) {
throw new Error('Required parameter profilePartialUpdateQuery was null or undefined when calling updateProfile.');
}
if (options.additionalFieldsProfile !== undefined) {
localVarQueryParameters['additional-fields[profile]'] = ObjectSerializer.serialize(options.additionalFieldsProfile, "Array<'subscriptions' | 'predictive_analytics'>");
}
queryParamPreProcessor(localVarQueryParameters)
let config: AxiosRequestConfig = {
method: 'PATCH',
url: localVarPath,
headers: localVarHeaderParams,
params: localVarQueryParameters,
data: ObjectSerializer.serialize(profilePartialUpdateQuery, "ProfilePartialUpdateQuery")
}
await this.session.applyToRequest(config)
const request = async (config: AxiosRequestConfig, retried = false): Promise<{ response: AxiosResponse; body: PatchProfileResponse; }> => {
try {
const axiosResponse = await this.session.requestWithRetry(config)
let body;
body = ObjectSerializer.deserialize(axiosResponse.data, "PatchProfileResponse");
return ({response: axiosResponse, body: body});
} catch (error) {
if (await this.session.refreshAndRetry(error, retried)) {
await this.session.applyToRequest(config)
return request(config, true)
}
throw error
}
}
return request(config)
}
}
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkImportProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkImportProfiles} instead
*/
spawnBulkProfileImportJob: typeof ProfilesApi.prototype.bulkImportProfiles;
}
ProfilesApi.prototype.spawnBulkProfileImportJob = ProfilesApi.prototype.bulkImportProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkImportProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkImportProfiles} instead
*/
createProfileBulkImportJob: typeof ProfilesApi.prototype.bulkImportProfiles;
}
ProfilesApi.prototype.createProfileBulkImportJob = ProfilesApi.prototype.bulkImportProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkSubscribeProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkSubscribeProfiles} instead
*/
subscribeProfiles: typeof ProfilesApi.prototype.bulkSubscribeProfiles;
}
ProfilesApi.prototype.subscribeProfiles = ProfilesApi.prototype.bulkSubscribeProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkSubscribeProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkSubscribeProfiles} instead
*/
createProfileSubscriptionBulkCreateJob: typeof ProfilesApi.prototype.bulkSubscribeProfiles;
}
ProfilesApi.prototype.createProfileSubscriptionBulkCreateJob = ProfilesApi.prototype.bulkSubscribeProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkSuppressProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkSuppressProfiles} instead
*/
suppressProfiles: typeof ProfilesApi.prototype.bulkSuppressProfiles;
}
ProfilesApi.prototype.suppressProfiles = ProfilesApi.prototype.bulkSuppressProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkSuppressProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkSuppressProfiles} instead
*/
createProfileSuppressionBulkCreateJob: typeof ProfilesApi.prototype.bulkSuppressProfiles;
}
ProfilesApi.prototype.createProfileSuppressionBulkCreateJob = ProfilesApi.prototype.bulkSuppressProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkUnsubscribeProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkUnsubscribeProfiles} instead
*/
unsubscribeProfiles: typeof ProfilesApi.prototype.bulkUnsubscribeProfiles;
}
ProfilesApi.prototype.unsubscribeProfiles = ProfilesApi.prototype.bulkUnsubscribeProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkUnsubscribeProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkUnsubscribeProfiles} instead
*/
createProfileSubscriptionBulkDeleteJob: typeof ProfilesApi.prototype.bulkUnsubscribeProfiles;
}
ProfilesApi.prototype.createProfileSubscriptionBulkDeleteJob = ProfilesApi.prototype.bulkUnsubscribeProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkUnsuppressProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkUnsuppressProfiles} instead
*/
unsuppressProfiles: typeof ProfilesApi.prototype.bulkUnsuppressProfiles;
}
ProfilesApi.prototype.unsuppressProfiles = ProfilesApi.prototype.bulkUnsuppressProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.bulkUnsuppressProfiles}
*
* @deprecated Use {@link ProfilesApi.bulkUnsuppressProfiles} instead
*/
createProfileSuppressionBulkDeleteJob: typeof ProfilesApi.prototype.bulkUnsuppressProfiles;
}
ProfilesApi.prototype.createProfileSuppressionBulkDeleteJob = ProfilesApi.prototype.bulkUnsuppressProfiles
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.createOrUpdateProfile}
*
* @deprecated Use {@link ProfilesApi.createOrUpdateProfile} instead
*/
createProfileImport: typeof ProfilesApi.prototype.createOrUpdateProfile;
}
ProfilesApi.prototype.createProfileImport = ProfilesApi.prototype.createOrUpdateProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getBulkImportProfilesJob} instead
*/
getBulkProfileImportJob: typeof ProfilesApi.prototype.getBulkImportProfilesJob;
}
ProfilesApi.prototype.getBulkProfileImportJob = ProfilesApi.prototype.getBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getBulkImportProfilesJob} instead
*/
getProfileBulkImportJob: typeof ProfilesApi.prototype.getBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfileBulkImportJob = ProfilesApi.prototype.getBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkImportProfilesJobs}
*
* @deprecated Use {@link ProfilesApi.getBulkImportProfilesJobs} instead
*/
getBulkProfileImportJobs: typeof ProfilesApi.prototype.getBulkImportProfilesJobs;
}
ProfilesApi.prototype.getBulkProfileImportJobs = ProfilesApi.prototype.getBulkImportProfilesJobs
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkImportProfilesJobs}
*
* @deprecated Use {@link ProfilesApi.getBulkImportProfilesJobs} instead
*/
getProfileBulkImportJobs: typeof ProfilesApi.prototype.getBulkImportProfilesJobs;
}
ProfilesApi.prototype.getProfileBulkImportJobs = ProfilesApi.prototype.getBulkImportProfilesJobs
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkSuppressProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getBulkSuppressProfilesJob} instead
*/
getProfileSuppressionBulkCreateJob: typeof ProfilesApi.prototype.getBulkSuppressProfilesJob;
}
ProfilesApi.prototype.getProfileSuppressionBulkCreateJob = ProfilesApi.prototype.getBulkSuppressProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkSuppressProfilesJobs}
*
* @deprecated Use {@link ProfilesApi.getBulkSuppressProfilesJobs} instead
*/
getProfileSuppressionBulkCreateJobs: typeof ProfilesApi.prototype.getBulkSuppressProfilesJobs;
}
ProfilesApi.prototype.getProfileSuppressionBulkCreateJobs = ProfilesApi.prototype.getBulkSuppressProfilesJobs
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkUnsuppressProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getBulkUnsuppressProfilesJob} instead
*/
getProfileSuppressionBulkDeleteJob: typeof ProfilesApi.prototype.getBulkUnsuppressProfilesJob;
}
ProfilesApi.prototype.getProfileSuppressionBulkDeleteJob = ProfilesApi.prototype.getBulkUnsuppressProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getBulkUnsuppressProfilesJobs}
*
* @deprecated Use {@link ProfilesApi.getBulkUnsuppressProfilesJobs} instead
*/
getProfileSuppressionBulkDeleteJobs: typeof ProfilesApi.prototype.getBulkUnsuppressProfilesJobs;
}
ProfilesApi.prototype.getProfileSuppressionBulkDeleteJobs = ProfilesApi.prototype.getBulkUnsuppressProfilesJobs
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getConversationForProfile}
*
* @deprecated Use {@link ProfilesApi.getConversationForProfile} instead
*/
getProfileConversation: typeof ProfilesApi.prototype.getConversationForProfile;
}
ProfilesApi.prototype.getProfileConversation = ProfilesApi.prototype.getConversationForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getConversationIdForProfile}
*
* @deprecated Use {@link ProfilesApi.getConversationIdForProfile} instead
*/
getProfileRelationshipsConversation: typeof ProfilesApi.prototype.getConversationIdForProfile;
}
ProfilesApi.prototype.getProfileRelationshipsConversation = ProfilesApi.prototype.getConversationIdForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getErrorsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getErrorsForBulkImportProfilesJob} instead
*/
getBulkProfileImportJobImportErrors: typeof ProfilesApi.prototype.getErrorsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getBulkProfileImportJobImportErrors = ProfilesApi.prototype.getErrorsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getErrorsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getErrorsForBulkImportProfilesJob} instead
*/
getImportErrorsForProfileBulkImportJob: typeof ProfilesApi.prototype.getErrorsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getImportErrorsForProfileBulkImportJob = ProfilesApi.prototype.getErrorsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getErrorsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getErrorsForBulkImportProfilesJob} instead
*/
getProfileBulkImportJobImportErrors: typeof ProfilesApi.prototype.getErrorsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfileBulkImportJobImportErrors = ProfilesApi.prototype.getErrorsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getListForBulkImportProfilesJob} instead
*/
getBulkProfileImportJobLists: typeof ProfilesApi.prototype.getListForBulkImportProfilesJob;
}
ProfilesApi.prototype.getBulkProfileImportJobLists = ProfilesApi.prototype.getListForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getListForBulkImportProfilesJob} instead
*/
getListsForProfileBulkImportJob: typeof ProfilesApi.prototype.getListForBulkImportProfilesJob;
}
ProfilesApi.prototype.getListsForProfileBulkImportJob = ProfilesApi.prototype.getListForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getListForBulkImportProfilesJob} instead
*/
getProfileBulkImportJobLists: typeof ProfilesApi.prototype.getListForBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfileBulkImportJobLists = ProfilesApi.prototype.getListForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListIdsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getListIdsForBulkImportProfilesJob} instead
*/
getBulkProfileImportJobRelationshipsLists: typeof ProfilesApi.prototype.getListIdsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getBulkProfileImportJobRelationshipsLists = ProfilesApi.prototype.getListIdsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListIdsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getListIdsForBulkImportProfilesJob} instead
*/
getListIdsForProfileBulkImportJob: typeof ProfilesApi.prototype.getListIdsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getListIdsForProfileBulkImportJob = ProfilesApi.prototype.getListIdsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListIdsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getListIdsForBulkImportProfilesJob} instead
*/
getProfileBulkImportJobRelationshipsLists: typeof ProfilesApi.prototype.getListIdsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfileBulkImportJobRelationshipsLists = ProfilesApi.prototype.getListIdsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListIdsForProfile}
*
* @deprecated Use {@link ProfilesApi.getListIdsForProfile} instead
*/
getProfileRelationshipsLists: typeof ProfilesApi.prototype.getListIdsForProfile;
}
ProfilesApi.prototype.getProfileRelationshipsLists = ProfilesApi.prototype.getListIdsForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getListsForProfile}
*
* @deprecated Use {@link ProfilesApi.getListsForProfile} instead
*/
getProfileLists: typeof ProfilesApi.prototype.getListsForProfile;
}
ProfilesApi.prototype.getProfileLists = ProfilesApi.prototype.getListsForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfileForPushToken}
*
* @deprecated Use {@link ProfilesApi.getProfileForPushToken} instead
*/
getPushTokenProfile: typeof ProfilesApi.prototype.getProfileForPushToken;
}
ProfilesApi.prototype.getPushTokenProfile = ProfilesApi.prototype.getProfileForPushToken
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfileIdForPushToken}
*
* @deprecated Use {@link ProfilesApi.getProfileIdForPushToken} instead
*/
getPushTokenRelationshipsProfile: typeof ProfilesApi.prototype.getProfileIdForPushToken;
}
ProfilesApi.prototype.getPushTokenRelationshipsProfile = ProfilesApi.prototype.getProfileIdForPushToken
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfileIdsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getProfileIdsForBulkImportProfilesJob} instead
*/
getBulkProfileImportJobRelationshipsProfiles: typeof ProfilesApi.prototype.getProfileIdsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getBulkProfileImportJobRelationshipsProfiles = ProfilesApi.prototype.getProfileIdsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfileIdsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getProfileIdsForBulkImportProfilesJob} instead
*/
getProfileBulkImportJobRelationshipsProfiles: typeof ProfilesApi.prototype.getProfileIdsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfileBulkImportJobRelationshipsProfiles = ProfilesApi.prototype.getProfileIdsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfileIdsForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getProfileIdsForBulkImportProfilesJob} instead
*/
getProfileIdsForProfileBulkImportJob: typeof ProfilesApi.prototype.getProfileIdsForBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfileIdsForProfileBulkImportJob = ProfilesApi.prototype.getProfileIdsForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfilesForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getProfilesForBulkImportProfilesJob} instead
*/
getBulkProfileImportJobProfiles: typeof ProfilesApi.prototype.getProfilesForBulkImportProfilesJob;
}
ProfilesApi.prototype.getBulkProfileImportJobProfiles = ProfilesApi.prototype.getProfilesForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfilesForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getProfilesForBulkImportProfilesJob} instead
*/
getProfileBulkImportJobProfiles: typeof ProfilesApi.prototype.getProfilesForBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfileBulkImportJobProfiles = ProfilesApi.prototype.getProfilesForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getProfilesForBulkImportProfilesJob}
*
* @deprecated Use {@link ProfilesApi.getProfilesForBulkImportProfilesJob} instead
*/
getProfilesForProfileBulkImportJob: typeof ProfilesApi.prototype.getProfilesForBulkImportProfilesJob;
}
ProfilesApi.prototype.getProfilesForProfileBulkImportJob = ProfilesApi.prototype.getProfilesForBulkImportProfilesJob
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getPushTokenIdsForProfile}
*
* @deprecated Use {@link ProfilesApi.getPushTokenIdsForProfile} instead
*/
getProfileRelationshipsPushTokens: typeof ProfilesApi.prototype.getPushTokenIdsForProfile;
}
ProfilesApi.prototype.getProfileRelationshipsPushTokens = ProfilesApi.prototype.getPushTokenIdsForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getPushTokensForProfile}
*
* @deprecated Use {@link ProfilesApi.getPushTokensForProfile} instead
*/
getProfilePushTokens: typeof ProfilesApi.prototype.getPushTokensForProfile;
}
ProfilesApi.prototype.getProfilePushTokens = ProfilesApi.prototype.getPushTokensForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getSegmentIdsForProfile}
*
* @deprecated Use {@link ProfilesApi.getSegmentIdsForProfile} instead
*/
getProfileRelationshipsSegments: typeof ProfilesApi.prototype.getSegmentIdsForProfile;
}
ProfilesApi.prototype.getProfileRelationshipsSegments = ProfilesApi.prototype.getSegmentIdsForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.getSegmentsForProfile}
*
* @deprecated Use {@link ProfilesApi.getSegmentsForProfile} instead
*/
getProfileSegments: typeof ProfilesApi.prototype.getSegmentsForProfile;
}
ProfilesApi.prototype.getProfileSegments = ProfilesApi.prototype.getSegmentsForProfile
export interface ProfilesApi {
/**
* Alias of {@link ProfilesApi.mergeProfiles}
*
* @deprecated Use {@link ProfilesApi.mergeProfiles} instead
*/
createProfileMerge: typeof ProfilesApi.prototype.mergeProfiles;
}
ProfilesApi.prototype.createProfileMerge = ProfilesApi.prototype.mergeProfiles