🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Klaviyo

by @byungkyu

Klaviyo API integration with managed OAuth. Access profiles, lists, segments, campaigns, flows, events, metrics, templates, catalogs, and webhooks. Use this...

πŸ’‘ Examples

# List profiles
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/klaviyo/api/profiles')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('revision', '2026-01-15')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

πŸ“‹ Tips & Best Practices

  • All requests use JSON:API specification
  • Timestamps are in ISO 8601 RFC 3339 format (e.g., 2024-01-16T23:20:50.52Z)
  • Resource IDs are strings (often base64-encoded)
  • Use sparse fieldsets to optimize response size
  • Include revision header for API versioning (recommended: 2026-01-15)
  • Some POST endpoints return 200 instead of 201 for successful creation
  • Coupon external_id must match regex ^[0-9_A-z]+$ (no hyphens)
  • Coupon codes endpoint requires a filter (e.g., filter=equals(coupon.id,"..."))
  • Flow creation via API may be limited; flows are typically created in the Klaviyo UI
  • IMPORTANT: When using curl commands, use curl -g when URLs contain brackets (fields[], page[]) to disable glob parsing
  • IMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.
  • View on ClawHub
    TERMINAL
    clawhub install klaviyo

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’