Core Concepts
Contacts
Store and manage your audience
Structure
{
"id": "contact_abc123",
"email": "user@example.com",
"subscribed": true,
"data": {
"firstName": "Sarah",
"plan": "pro",
"mrr": 99
}
}Adding contacts
- Dashboard: Contacts → Add Contact
- CSV import: Contacts → Import
- API:
POST /contacts - Events: Auto-created when tracking events
Contact data
The data field stores custom key-value pairs.
Best practices:
- Use consistent naming (camelCase or snake_case)
- Store dates as ISO strings:
"2024-03-15T10:30:00Z" - Use numbers for numeric values (enables comparisons)
Template variables
Use {{fieldName}} in emails:
<p>Hello {{firstName}}!</p>Fallback: {{firstName ?? 'there'}}
Reserved: {{email}}, {{id}}
Temporary data
Data that won't save to contact:
data: {
resetCode: { value: 'ABC123', persistent: false }
}Use for: one-time codes, tokens, session data.