v1
latestOpenAPI 3.1.02026-07-2691819.8 KBCreate Event
Create an event.
Creating an endpoint requires supplying a fingerprint. See how to create a fingerprint here.
Agents, Agent Versions, People and Sessions that are provided but do not exist will be created.
post/api/v1/events
Headers
Authorizationstring required
Example:Bearer 123
Request body
Example request
{
"agent": "customer-support-agent",
"agent_version": "v1",
"event_name": "llm",
"fingerprint_id": "123",
"person": "user_123",
"properties": {
"api": "openai-chat-completions",
"inputs": {
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "Can you help me?",
"role": "user"
}
],
"model": "gpt-4o"
},
"output": {
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello! How can I assist you today?",
"role": "assistant"
}
}
],
"id": "chatcmpl-123",
"model": "gpt-4o-2024-08-06",
"usage": {
"completion_tokens": 9,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0,
"rejected_prediction_tokens": 0
},
"prompt_tokens": 99,
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
},
"total_tokens": 108
}
}
},
"session": "session_456"
}Response
Successful Response
{"stackTrail":"paths:/api/v1/events:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}