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",
"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",
"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",
"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",
"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",
"event": "example_string",
"parameters": {},
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}'
response = http.request(request)
puts response.body
{
"success": true,
"event_id": "example_string"
}
POST
/track
POST
Base URLstring
Target server for requests. Edit to use your own host.
Bearer Token
Bearer Tokenstring
RequiredYour Flameup API key (passed as Bearer token)
Your Flameup API key (passed as Bearer token)
Content-Typestring
RequiredThe media type of the request body
Options: application/json
external_idstring
RequiredUser identifier (external_id or email)
userIdstring
Deprecated alias for external_id
eventstring
RequiredEvent name
parametersobject
Event parameters
propertiesobject
Alias for parameters
timestampstring
When the event occurred (defaults to now)
Format: date-time
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. Your Flameup API key (passed as Bearer token)
Body
application/json
external_idstring
RequiredUser identifier (external_id or email)
userIdstring
Deprecated alias for external_id
eventstring
RequiredEvent name
parametersobject
Event parameters
propertiesobject
Alias for parameters
timestampstring
When the event occurred (defaults to now)
Responses
successboolean
event_idstring
Was this page helpful?