Customer.io
Track customer events and manage people via the Customer.io Track API. Use it to keep your Customer.io workspace in sync with InTouch automations: create or update people, fire behavioral events that trigger email/push campaigns and segment membership, read a person's stored attributes, and delete people for GDPR/CCPA requests.
What it does
Calls the Customer.io Track API:
- US base URL:
https://track.customer.io/api/v1 - EU base URL:
https://track-eu.customer.io/api/v1(setregion: eu)
The tool uses the standard library only (urllib, json, base64) — no third-party packages. Response bodies are capped at ~5 MB.
Operations
| operation | HTTP | Purpose |
|---|---|---|
identify |
PUT /customers/{identifier} |
Create or update a person and set attributes |
track |
POST /customers/{identifier}/events |
Send a behavioral event (triggers campaigns / segments) |
get |
GET /customers/{identifier}/attributes |
Read a person's current attributes |
delete |
DELETE /customers/{identifier} |
Permanently delete a person (GDPR/CCPA) |
Authentication / apiKey setup
The Track API uses HTTP Basic auth, base64-encoding the pair site_id:api_key.
- In Customer.io, go to Settings → API Credentials → Track API Keys.
- Copy your Site ID and your Track API Key.
- Join them with a single colon and pass that as the
apiKeyinput:
apiKey = "<site_id>:<api_key>"
For example apiKey = "abc123siteid:def456trackkey".
The tool base64-encodes this string and sends it as Authorization: Basic <encoded>. No OAuth, JWT, or token exchange is required — a single credential string is sufficient.
Inputs
| input | required | default | notes |
|---|---|---|---|
apiKey |
yes | — | site_id:api_key |
operation |
yes | — | identify | track | get | delete |
identifier |
for all | "" |
Person id or email used in the URL path |
eventName |
for track | "" |
e.g. signed_up |
attributes |
identify | "" |
JSON object string of attributes |
eventData |
track | "" |
JSON object string of event data |
region |
no | us |
us or eu |
Outputs
result— the API response payload as a JSON string (or{"httpStatus":...}for empty-body successes such as delete).status—okon a 2xx response. Non-2xx responses fail the step with anerrormessage.
Examples
Identify / update a person
operation: identify
identifier: 42
attributes: {"email": "[email protected]", "plan": "pro", "first_name": "Jane"}
Track a behavioral event (triggers a campaign)
operation: track
identifier: 42
eventName: purchased
eventData: {"product": "Pro Plan", "amount": 49}
Read a person's attributes
operation: get
identifier: [email protected]
Delete a person (GDPR)
operation: delete
identifier: 42