Hi there! 👋
Yes, you can use Klaviyo as your ESP and export email contacts from Clay. To set this up, you can either use webhooks or the HTTP API to send data from Clay to Klaviyo. Here’s a quick guide:
Option 1: Using Webhooks
1. Set Up a Webhook in Clay to send email contacts directly to Klaviyo.
2. Follow the steps outlined in Clay’s webhook lesson for more details: Intro to Webhooks.
Option 2: Using Klaviyo’s API
1. Get Your Klaviyo API Key: Log in to Klaviyo, navigate to Account > Settings > API Keys, and generate a new API key if you don’t have one.
2. Add Contacts via HTTP API: Use the API endpoint to add contacts to Klaviyo. Here’s an example
Method POST
Endpoint: https://a.klaviyo.com/api/profiles/ \
Header "Authorization: Klaviyo-API-Key your_private_api_key" \
Header "Content-Type: application/json" \
Body {
"data": {
"type": "profile",
"attributes": {
"email": "email@example.com",
"first_name": "John",
"last_name": "Doe"
}
}
}'