Events
Track event
Record a user event.
curl -X POST "https://api.flameup.ai/api/v1/workspaces/example_string/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"userId": "example_string",
"event": "example_string",
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}'
import requests
import json
url = "https://api.flameup.ai/api/v1/workspaces/example_string/events"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"userId": "example_string",
"event": "example_string",
"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/workspaces/example_string/events", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"userId": "example_string",
"event": "example_string",
"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(`{
"userId": "example_string",
"event": "example_string",
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}`)
req, err := http.NewRequest("POST", "https://api.flameup.ai/api/v1/workspaces/example_string/events", 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/workspaces/example_string/events')
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 = '{
"userId": "example_string",
"event": "example_string",
"properties": {},
"timestamp": "2024-12-25T10:00:00Z"
}'
response = http.request(request)
puts response.body
{
"success": true,
"event_id": "example_string"
}
POST
/workspaces/{workspaceId}/eventsPOST
Security Scheme
Bearer Token
Bearer Tokenstring
RequiredYour Flameup API key (passed as Bearer token)
Your Flameup API key (passed as Bearer token)
path
workspaceIdstring
RequiredWorkspace ID
Content-Typestring
RequiredThe media type of the request body
Options: application/json
userIdstring
RequiredUser identifier
eventstring
RequiredEvent name
propertiesobject
Event properties
timestampstring
When the event occurred (defaults to now)
Format: date-time
Request Preview
Response
Response will appear here after sending the request
Authentication
BearerAuth
header
Authorizationstring
RequiredBearer token. Your Flameup API key (passed as Bearer token)
Path Parameters
workspaceIdstring
RequiredWorkspace ID
Body
application/json
userIdstring
RequiredUser identifier
eventstring
RequiredEvent name
propertiesobject
Event properties
timestampstring
When the event occurred (defaults to now)
Responses
successboolean
event_idstring
Was this page helpful?
Built with Documentation.AI
Last updated today