Track event
Record a user event.
curl -X POST "https://api.flameup.ai/api/v1/track" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"external_id": "example_string",
"userId": "example_string",
"user_id": "example_string",
"event": "example_string",
"parameters": {},
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}'
import requests
import json
url = "https://api.flameup.ai/api/v1/track"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"external_id": "example_string",
"userId": "example_string",
"user_id": "example_string",
"event": "example_string",
"parameters": {},
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.flameup.ai/api/v1/track", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"external_id": "example_string",
"userId": "example_string",
"user_id": "example_string",
"event": "example_string",
"parameters": {},
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"external_id": "example_string",
"userId": "example_string",
"user_id": "example_string",
"event": "example_string",
"parameters": {},
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}`)
req, err := http.NewRequest("POST", "https://api.flameup.ai/api/v1/track", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.flameup.ai/api/v1/track')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"external_id": "example_string",
"userId": "example_string",
"user_id": "example_string",
"event": "example_string",
"parameters": {},
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"event_id": "example_string",
"person_id": "123e4567-e89b-12d3-a456-426614174000",
"event": "example_string",
"parameters": {},
"timestamp": "2024-12-25T10:00:00Z",
"processed_at": "2024-12-25T10:00:00Z",
"status": "processed",
"person_created": true,
"warnings": [
"example_string"
]
}
}
{
"success": false,
"error": "Person not found",
"code": "example_string"
}
{
"error": "Unauthorized",
"message": "Invalid or expired API key",
"details": "Please provide a valid API key in the Authorization header: Bearer <your_api_key>"
}
{
"success": false,
"error": {
"code": "example_string",
"message": "example_string",
"details": {}
}
}
{
"success": false,
"error": "Person not found",
"code": "example_string"
}
{
"error": "Unauthorized",
"message": "Invalid or expired API key",
"details": "Please provide a valid API key in the Authorization header: Bearer <your_api_key>"
}
{
"success": false,
"error": {
"code": "example_string",
"message": "example_string",
"details": {}
}
}
/track
Target server for requests. Edit to use your own host.
Your Flameup API key (passed as Bearer token)
The media type of the request body
Your own identifier for the person, as sent to /identify.
Alias for external_id.
Alias for external_id.
Event name
Event parameters
Alias for parameters
When the event occurred (defaults to now)
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Your Flameup API key (passed as Bearer token)
Body
Your own identifier for the person, as sent to /identify.
Alias for external_id.
Alias for external_id.
Event name
Event parameters
Alias for parameters
When the event occurred (defaults to now)