curl --request GET \
--url https://api.letpiper.com/v1/orgs/{org_id}/responses/sessions/{session_id}/events \
--header 'Authorization: Bearer <token>'{
"session": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_external_session_id": "<string>",
"channel_external_user_id": "<string>",
"is_test": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"runs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "user_message",
"created_at": "2023-11-07T05:31:56Z",
"role": "user",
"content": "<string>",
"tool_name": "<string>",
"tool_call_id": "<string>",
"tool_arguments": {},
"parent_tool_call_id": "<string>",
"reasoning_effort": "low",
"latency_ms": 123,
"error_code": "<string>",
"error_message": "<string>",
"model_name": "<string>",
"provider_name": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"cache_read_tokens": 123,
"cache_write_tokens": 123,
"cost_usd": 123,
"code_executed": "<string>",
"printed_output": "<string>"
}
],
"model_name": "<string>",
"total_input_tokens": 123,
"total_output_tokens": 123,
"total_cost_usd": 123,
"total_requests": 123
}
]
}Get all runs and events for a specific session.
curl --request GET \
--url https://api.letpiper.com/v1/orgs/{org_id}/responses/sessions/{session_id}/events \
--header 'Authorization: Bearer <token>'{
"session": {
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel_external_session_id": "<string>",
"channel_external_user_id": "<string>",
"is_test": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"runs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "user_message",
"created_at": "2023-11-07T05:31:56Z",
"role": "user",
"content": "<string>",
"tool_name": "<string>",
"tool_call_id": "<string>",
"tool_arguments": {},
"parent_tool_call_id": "<string>",
"reasoning_effort": "low",
"latency_ms": 123,
"error_code": "<string>",
"error_message": "<string>",
"model_name": "<string>",
"provider_name": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"cache_read_tokens": 123,
"cache_write_tokens": 123,
"cost_usd": 123,
"code_executed": "<string>",
"printed_output": "<string>"
}
],
"model_name": "<string>",
"total_input_tokens": 123,
"total_output_tokens": 123,
"total_cost_usd": 123,
"total_requests": 123
}
]
}Platform token (starts with pat_)