Home > @infiniteobjects/klaviyo-service > KlaviyoService
Klaviyo API Service
Signature:
export declare class KlaviyoService
It requires the following environment variables: - KLAVIYO_API_KEY_SECRET
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)() | Initializes the service |
| Property | Modifiers | Type | Description |
|---|---|---|---|
| apiEndpoint | readonly |
string | Klaviyo API Endpoint |
| log | LoggerInstance | Logger Instance |
| 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> |