Klaviyo destination connector package for RETL State contracts.
Project description
RETL Klaviyo Destination
condor-retl-klaviyo is a first-party Klaviyo destination connector package. It
exposes retl/klaviyo through the retl.destinations entry point group.
Surfaces
profilesaccepts State upserts and submits Klaviyo Bulk Profile Import jobs. It acceptsemail,phone_e164, andexternal_idIdentifiers and requires at least one of those accepted types. The surface is targetless and does not support remove operations.list_membershipsaccepts targeted State upserts and submits Klaviyo Bulk Profile Import jobs with alistsrelationship. It acceptsemail,phone_e164,external_id, andklaviyo_profile_idIdentifiers and requires at least one of those accepted types. This surface creates or updates profiles and adds them to the target list; it does not support remove operations. Logical Targets can be resolved through explicit mappings, the runtime Target Registry, or managed list lookup/create by exact list name.list_memberships_by_profile_idaccepts targeted State upserts and removes through Klaviyo's List relationships API. It accepts onlyklaviyo_profile_id, supportsupsertandremove, and is the surface to use for authoritative list membership reconciliation. Logical Targets can be resolved through explicit mappings, the runtime Target Registry, or managed list lookup/create by exact list name.
These surfaces use Klaviyo private API key auth with the private_api_key
credential field. Successful submission returns delivery_outcome="accepted"
for Bulk Profile Import surfaces because Klaviyo returns a 202 job acceptance
before asynchronous profile import processing is complete.
list_memberships_by_profile_id returns delivery_outcome="succeeded" because
Klaviyo returns 204 after the list relationship mutation is accepted by the
synchronous endpoint.
The private API key may be loaded with:
credential_namespace="destinations.klaviyo"
which creates retl.secrets["destinations.klaviyo.private_api_key"] without
resolving the secret during binding construction.
Profile Rendering
Each RETL upsert record becomes one JSON:API profile object inside a
profile-bulk-import-job request. RETL identifiers render to Klaviyo profile
attributes as follows:
email->emailphone_e164->phone_numberexternal_id->external_idklaviyo_profile_id-> profile resourceid
Payload fields named first_name, last_name, organization, locale,
title, image, location, anonymous_id, and properties render as
Klaviyo profile attributes. Other payload fields render into the Klaviyo
properties object. null payload values are omitted because Klaviyo's Bulk
Profile Import API does not clear profile fields with null.
For list_memberships, the target resolves to the Klaviyo List ID and is sent
as the Bulk Profile Import job's relationships.lists.data[0].id. For
list_memberships_by_profile_id, the target resolves to the Klaviyo List ID in
/api/lists/{id}/relationships/profiles, and each row renders as
{"type": "profile", "id": "<klaviyo_profile_id>"}.
Both list surfaces support managed Targets. During normal runner execution, when a logical Target is not already mapped or present in the runtime Target Registry, the connector looks for an existing Klaviyo List with the exact target name and creates one when missing. Dry runs can plan managed list creation without creating remote lists or writing Target Registry rows.
Consent is intentionally out of scope for these surfaces. Klaviyo documents that Bulk Profile Import and List relationship mutations do not update general consent or subscription status; use Klaviyo's Subscribe or Unsubscribe Profiles APIs through separate future surfaces when consent updates are needed.
Binding Config
Shared config:
api_revisiondefaults to2026-04-15.transportmay be injected for offline tests. When omitted, non-dry-run submissions use the connector'srequeststransport.
The connector owns the production API origin https://a.klaviyo.com in package
code. Tests use injected transports to capture requests without changing that
origin.
api_revision is namespace-loadable public config:
destination = retl.destinations.load(
"retl/klaviyo",
binding_name="klaviyo_primary",
credential_namespace="destinations.klaviyo",
config_namespace="destinations.klaviyo",
)
The namespace can provide DESTINATIONS__KLAVIYO__API_REVISION.
API Source
This connector is based on Klaviyo's official Bulk Profile Import API docs, accessed 2026-05-11:
https://developers.klaviyo.com/en/reference/bulk_import_profileshttps://developers.klaviyo.com/en/docs/use_klaviyos_bulk_profile_import_apihttps://developers.klaviyo.com/en/reference/add_profiles_to_listhttps://developers.klaviyo.com/en/reference/remove_profiles_from_list
The connector default API revision is 2026-04-15, matching the latest stable
reference page on the access date. Request planning includes the required
revision header, batches at up to 10,000 profiles, and enforces the documented
5 MB request payload ceiling through RETL request batching. List relationship
requests batch at Klaviyo's documented 1,000 profile relationship objects per
request.
Proof Level
Default tests provide:
- Contract proof for package loading, connector metadata, surface shape, auth, and namespace-loadable config.
- Translation proof for profile State upserts, list membership imports, and profile-ID list membership adds/removes without network access.
- Mocked transport proof for request rendering, auth placement, response classification, redacted diagnostics, transport failure handling, selected request-plan reuse, and dry-run behavior.
Sandbox
Live sandbox tests are opt-in:
source local/env/.env.klaviyo.sandbox
make test-sandbox-klaviyo
The sandbox env file must provide DESTINATIONS__KLAVIYO__PRIVATE_API_KEY.
The profile and list_memberships sandbox tests submit synthetic Bulk Profile
Import jobs for lanacooper735@outlook.com. The list sandbox test creates a
temporary managed list, resolves the generated Klaviyo profile ID by email, adds
and removes that profile through list_memberships_by_profile_id, and deletes
the temporary list. Default repository checks exclude live_sandbox tests and
do not contact Klaviyo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file condor_retl_klaviyo-0.1.0.tar.gz.
File metadata
- Download URL: condor_retl_klaviyo-0.1.0.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22322c83ee265bf76e790e5f0530ef03da2a0e93c818f3db32eaa1c2308606e2
|
|
| MD5 |
886f246f2a000e332a03498691a46144
|
|
| BLAKE2b-256 |
4e6e2ddf05617a2b787e89e1e73a690a05450813a3c9244f4a4dfdd733cedbe3
|
Provenance
The following attestation bundles were made for condor_retl_klaviyo-0.1.0.tar.gz:
Publisher:
publish.yml on condorgraph/condor-retl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
condor_retl_klaviyo-0.1.0.tar.gz -
Subject digest:
22322c83ee265bf76e790e5f0530ef03da2a0e93c818f3db32eaa1c2308606e2 - Sigstore transparency entry: 1565148229
- Sigstore integration time:
-
Permalink:
condorgraph/condor-retl@18e0a038f797cb3529b6a1d8662794d89958eddb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/condorgraph
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18e0a038f797cb3529b6a1d8662794d89958eddb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file condor_retl_klaviyo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: condor_retl_klaviyo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51666947c218065a5af51d9a1d798822dc60802c78c2b9c6edce4e67d49d98f7
|
|
| MD5 |
a62e6bc9ce89f4ad514b410bd7730541
|
|
| BLAKE2b-256 |
408a72aea5569e5d086d980fb7b50c0479ab0556e09c33e35bfa290c84835572
|
Provenance
The following attestation bundles were made for condor_retl_klaviyo-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on condorgraph/condor-retl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
condor_retl_klaviyo-0.1.0-py3-none-any.whl -
Subject digest:
51666947c218065a5af51d9a1d798822dc60802c78c2b9c6edce4e67d49d98f7 - Sigstore transparency entry: 1565148267
- Sigstore integration time:
-
Permalink:
condorgraph/condor-retl@18e0a038f797cb3529b6a1d8662794d89958eddb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/condorgraph
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18e0a038f797cb3529b6a1d8662794d89958eddb -
Trigger Event:
workflow_dispatch
-
Statement type: