Klaviyo-api

Latest version: v16.0.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

5.1.0

Added

- Flow Message Template endpoints:
- You can now retrieve the templates associated with flow messages using `Flows.get_flow_message_template()` or `Flows.get_flow_message_relationships_template()`. You can also include the template HTML for a flow message using `Flows.get_flow_message(id, include=['template'])`.
- Create or Update Push Token endpoint:
- We have added an endpoint to create or update push tokens, `Profiles.create_push_token()`. This endpoint can be used to migrate profiles and their push tokens from another platform to Klaviyo. If you’re looking to register push tokens from users’ devices, please use our [mobile SDKs](https://developers.klaviyo.com/en/docs/sdk_overview#mobile-sdks).

5.0.0

Changed

- To override the client-level `api_key` for a specific request, you will now need to use the following new keyword arg: `_request_auth`
- previously, this keyword arg was called `api_key`

Fixed

- Fixed errors that were occurring on requests using oneOf schemas

4.0.0

Added

- Back-In-stock APIs
- We have added support for subscribing profiles to back-in-stock notifications, for both email and SMS, using the new [create_back_in_stock_subscription](./README.mdcreate-back-in-stock-subscription) endpoint.
- New functionality to Campaigns API
- CRUD support for SMS campaigns is now available
- You can now also retrieve all messages for a campaign to determine performance data on campaigns where you’re running A/B tests
- To support this functionality, we introduced a relationship between [campaigns and campaign messages](./README.mdget-campaign-relationships-campaign-messages), and between [campaign messages and templates](./README.mdget-campaign-message-relationships-template)


Changed

- Relationship Standardization
- We are making a number of changes across endpoints to standardize how we handle [relationships](https://developers.klaviyo.com/en/docs/relationships_) in our APIs and leverage consistently typed objects across endpoints. For example, you can create a profile in our APIs in the same shape, regardless of whether you’re calling the profiles endpoint or the events endpoint.
- The changes include:
- Updating 1:1 relationships to use singular tense and an object (instead of plural and an array)
- example: for [get_flow_action](./README.mdget-flow-action), if you want to use the `include` param, you would set `include=` to `"flow"` (instead of `"flows"`)
- Moving related object IDs from the attributes payload to relationships
- example: The format for the [body](https://developers.klaviyo.com/en/reference/create_tag) of [create_tag](./README.md#create-tag) has changed, with `tag_group_id` previously at `data.attributes.tag_group_id` being removed and replaced by a `data` object containing `type`+`id` and located at `data.relationships.tag-group.data`.
- Specifying a relationship between two Klaviyo objects to allow for improved consistency and greater interoperability across endpoints
- example: for [create_event](./README.mdcreate-event), you can now create/update a profile for an event in the same way you would when using the profiles API directly
- NOTE: The examples for the above relationship changes are illustrative, not comprehensive. For a complete list of ALL the endpoints that have changed and exactly how, please refer to our latest [API Changelog](https://developers.klaviyo.com/en/docs/changelog_#revision-2023-07-15)
- For [get_campaigns](./README.mdget-campaigns) endpoint, `filter` param is now required, to, at minimum, filter on `messages.channel`


Removed

- We removed the `company_id` from the response for [get_template](./README.mdget-template) and [get_templates](./README.mdget-templates). If you need to obtain the company ID / public API key for an account, please use the [Accounts API](./README.mdaccounts).

3.0.0

Added

- Accounts API is now available, this will allow you to access information about the Klaviyo account associated with your API key.
- `get_accounts`
- `get_account`

**Note:** You will need to generate a new API key with either the `Accounts` scope enabled or `Full Access` to use these endpoints.

Changed

- The names of positional arguments have changed from `[resource_type]_id` to `id` (i.e. `campaign_id` to `id`) for some relationship endpoints. If keyword arguments were used instead of positional arguments for `[resource_type]_id` you might need to slightly refactor the code.

Removed

- All `client` endpoint:
- `create_client_event`
- `create_client_profile`
- `create_client_subscription`

2.0.0

Added

- Profiles API now returns predictive analytics when calling `get_profile` and `get_profiles` by passing in `additional_fields_profile = ["predictive_analytics"]`.

Changed

- Relationship endpoints that were previously grouped together are now split into related-resource-specific endpoints. This means that all relationship endpoints have new function names.

Migration Guide

- To migrate to this latest version, all calls to relationship endpoints need to be updated, as in the following example:
- `get_campaign_relationships(campaign_id, "tags")` will become `get_campaign_relationships_tags(campaign_id)`.

1.3.1

Added

- Added `page_size` support for paging through endpoints that return profiles.

Page 4 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.