API Reference
The Conversations API allows you to send user conversations to Aeon for analysis and tracking.
Endpoint
text
1POST https://withaeon.com/api/v1/projects/{project_id}/agents/conversationsRequest
The request body should be a JSON object with the following structure:
json1{ 2 "conversation_id": "<string>", 3 "provider": "<string>", 4 "model": "<string>", 5 "user_id": "<string>", 6 "messages": [ 7 { 8 "role": "user", 9 "content": "<string>", 10 "timestamp": 1763259080 11 }, 12 { 13 "role": "assistant", 14 "content": "<string>", 15 "timestamp": 1763259082 16 } 17 ] 18}
Parameters
- conversation_id (str): Unique identifier for the conversation. If called again with the same ID, the conversation will be updated.
- provider (str): Name of the LLM provider (e.g., "openai", "anthropic").
- model (str): Model used for the conversation (used to calculate cost).
- user_id (str, optional): Identifier for the user in the conversation.
- messages (List[Dict]): List of message objects, each with role, content, and timestamp.
Example (curl)
Send a conversation payload using curl:
bash1curl --request POST \ 2 --url https://withaeon.com/api/v1/projects/123/agents/conversations \ 3 --header 'Authorization: Bearer <token>' \ 4 --header 'Content-Type: application/json' \ 5 --data '{ 6 "conversation_id": "123", 7 "provider": "openai", 8 "model": "gpt-4", 9 "user_id"="john@acme.com" 10 "messages": [ 11 { 12 "role": "user", 13 "content": "...", 14 "timestamp": 1763259080 15 }, 16 { 17 "role": "assistant", 18 "content": "...", 19 "timestamp": 1763259082 20 } 21 ] 22 }'