Quick Start
Get up and running with Flameup in 5 minutes
Quick Start Guide
This guide will walk you through integrating Flameup into your application. By the end, you'll be able to identify users, track events, and send your first message.
Step 1: Get Your API Key
Log into Dashboard
Go to app.flameup.ai and log in to your account.
Navigate to API Keys
Go to Settings > API Keys in the sidebar.
Create a New Key
Click Create API Key, give it a name like "My App - Development", select Test environment, and grant the following permissions:
people:readpeople:writeevents:readevents:write
Copy Your Key
Copy the API key and save it securely. It follows the format ws_test_{workspace}_{random}.{secret}
Step 2: Identify a User
When a user signs up or logs in, identify them to Flameup. This creates or updates their profile.
const API_KEY = 'ws_test_abc12345_abc123.your_secret_here';
const WORKSPACE_ID = 'your_workspace_id';
async function identifyUser(userId, email, traits) {
const response = await fetch(
`https://api.flameup.ai/api/v1/workspaces/${WORKSPACE_ID}/people`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
userId: userId,
email: email,
traits: traits
})
}
);
return response.json();
}
// Example usage
const user = await identifyUser(
'user_12345',
'sarah@example.com',
{
first_name: 'Sarah',
last_name: 'Connor',
plan: 'premium',
signup_date: '2024-01-15'
}
);
console.log('User identified:', user.id);
import requests
API_KEY = 'ws_test_abc12345_abc123.your_secret_here'
WORKSPACE_ID = 'your_workspace_id'
def identify_user(user_id, email, traits):
response = requests.post(
f'https://api.flameup.ai/api/v1/workspaces/{WORKSPACE_ID}/people',
headers={
'Content-Type': 'application/json',
'Authorization': f'Bearer {API_KEY}'
},
json={
'userId': user_id,
'email': email,
'traits': traits
}
)
return response.json()
# Example usage
user = identify_user(
'user_12345',
'sarah@example.com',
{
'first_name': 'Sarah',
'last_name': 'Connor',
'plan': 'premium',
'signup_date': '2024-01-15'
}
)
print(f"User identified: {user['id']}")
curl -X POST "https://api.flameup.ai/api/v1/workspaces/{workspace_id}/people" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ws_test_abc12345_abc123.your_secret_here" \
-d '{
"userId": "user_12345",
"email": "sarah@example.com",
"traits": {
"first_name": "Sarah",
"last_name": "Connor",
"plan": "premium",
"signup_date": "2024-01-15"
}
}'
userId is your unique identifier for this user. It can be a database ID, username, or any stable identifier in your system.Step 3: Track an Event
Track user actions to understand behavior and trigger campaigns.
async function trackEvent(externalId, eventName, parameters) {
const response = await fetch(
'https://api.flameup.ai/api/v1/track',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
external_id: externalId,
event: eventName,
parameters: parameters,
timestamp: new Date().toISOString()
})
}
);
return response.json();
}
// Track a purchase
await trackEvent('user_12345', 'purchase_completed', {
order_id: 'order_789',
amount: 99.99,
currency: 'USD',
items: ['product_a', 'product_b']
});
console.log('Event tracked!');
from datetime import datetime
def track_event(external_id, event_name, parameters):
response = requests.post(
'https://api.flameup.ai/api/v1/track',
headers={
'Content-Type': 'application/json',
'Authorization': f'Bearer {API_KEY}'
},
json={
'external_id': external_id,
'event': event_name,
'parameters': parameters,
'timestamp': datetime.utcnow().isoformat() + 'Z'
}
)
return response.json()
# Track a purchase
track_event('user_12345', 'purchase_completed', {
'order_id': 'order_789',
'amount': 99.99,
'currency': 'USD',
'items': ['product_a', 'product_b']
})
print('Event tracked!')
curl -X POST "https://api.flameup.ai/api/v1/track" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ws_test_abc12345_abc123.your_secret_here" \
-d '{
"external_id": "user_12345",
"event": "purchase_completed",
"parameters": {
"order_id": "order_789",
"amount": 99.99,
"currency": "USD",
"items": ["product_a", "product_b"]
},
"timestamp": "2024-01-15T10:30:00Z"
}'
Step 4: Register a Device (Optional)
If your app uses push notifications, register the device token:
async function registerDevice(personId, token, platform) {
const response = await fetch(
`https://api.flameup.ai/api/v1/people/${personId}/devices`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
token: token,
platform: platform, // 'ios' or 'android' ('web' coming soon)
device_name: 'iPhone 15 Pro',
app_version: '2.1.0'
})
}
);
return response.json();
}
// Register an iOS device (personId is the Flameup person ID from Step 2)
await registerDevice(
'person_abc123',
'fcm_device_token_here',
'ios'
);
def register_device(person_id, token, platform):
response = requests.post(
f'https://api.flameup.ai/api/v1/people/{person_id}/devices',
headers={
'Content-Type': 'application/json',
'Authorization': f'Bearer {API_KEY}'
},
json={
'token': token,
'platform': platform, # 'ios' or 'android' ('web' coming soon)
'device_name': 'iPhone 15 Pro',
'app_version': '2.1.0'
}
)
return response.json()
# Register an iOS device (person_id is the Flameup person ID from Step 2)
register_device(
'person_abc123',
'fcm_device_token_here',
'ios'
)
Step 5: Send a Transactional Message
Send a one-off message to a user (e.g., order confirmation):
async function sendTransactional(userId, templateId, channel, variables) {
const response = await fetch(
`https://api.flameup.ai/api/v1/workspaces/${WORKSPACE_ID}/transactional/send`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
user_id: userId,
template_id: templateId,
channel: channel, // 'email', 'sms', or 'push'
variables: variables
})
}
);
return response.json();
}
// Send order confirmation via push
await sendTransactional('user_12345', 'order_confirmation', 'push', {
order_id: 'order_789',
total: '$99.99',
items: '2 items'
});
def send_transactional(user_id, template_id, channel, variables):
response = requests.post(
f'https://api.flameup.ai/api/v1/workspaces/{WORKSPACE_ID}/transactional/send',
headers={
'Content-Type': 'application/json',
'Authorization': f'Bearer {API_KEY}'
},
json={
'user_id': user_id,
'template_id': template_id,
'channel': channel, # 'email', 'sms', or 'push'
'variables': variables
}
)
return response.json()
# Send order confirmation via push
send_transactional('user_12345', 'order_confirmation', 'push', {
'order_id': 'order_789',
'total': '$99.99',
'items': '2 items'
})
Verification
Check that everything is working:
-
Dashboard: Log into app.flameup.ai and check the People section - you should see your test user.
-
API: Fetch the user you just created:
curl "https://api.flameup.ai/api/v1/workspaces/{workspace_id}/people/search?email=sarah@example.com" \
-H "Authorization: Bearer ws_test_abc12345_abc123.your_secret_here"
What's Next?
People API
Learn about user management, batch operations, and search.
Events API
Track custom events and query event history.
Campaigns
Set up automated campaigns triggered by user behavior.
API Reference
Explore the complete API documentation.
Last updated today