stack

Home > @infiniteobjects/klaviyo-service > KlaviyoService

KlaviyoService class

Klaviyo API Service

Signature:

export declare class KlaviyoService 

Remarks

It requires the following environment variables: - KLAVIYO_API_KEY_SECRET

Constructors

Constructor Modifiers Description
(constructor)()   Initializes the service

Properties

Property Modifiers Type Description
apiEndpoint readonly string Klaviyo API Endpoint
log   LoggerInstance Logger Instance

Methods

Method Modifiers Description
addProfileToList(list, profile)   <p>Adds the given profile to a list.</p><p>In Klaviyo’s world “adding” means that the profile will not receive an email.</p>
getAllLists()   Lists all the lists
subscribeToList(list, profile)   <p>Subscribes the given profile to a list.</p><p>In Klaviyo’s world “subscribing: means that the profile will need to accept the subscription via an email.</p>