cURL
curl --request GET \ --url https://api.example.com/api/sessions/{sessionId}
{ "session": { "id": "<string>", "title": "<string>", "status": "<string>", "createdAt": {}, "updatedAt": {}, "model": "<string>", "author": {}, "metadata": {}, "messages": [ {} ], "tasks": [ { "id": "<string>", "title": "<string>", "status": "<string>" } ] } }
Retrieve a single session with its full message history.
Show Session fields
active
completed
failed
Show Message types
type
user
assistant
result
Show Task fields
pending
in_progress
curl -X GET "https://magnet.run/api/sessions/cm3abc123def" \ -H "x-api-key: YOUR_API_KEY"
{ "session": { "id": "cm3abc123def", "title": "Add input validation to signup form", "status": "completed", "model": "claude-opus-4-6", "author": { "id": "user_123", "name": "Alice Chen" }, "metadata": { "repository": "acme/web-app", "prNumber": 42, "prUrl": "https://github.com/acme/web-app/pull/42", "prStatus": "open" }, "messages": [ { "type": "user", "message": { "content": "Add input validation to the signup form..." } }, { "type": "assistant", "message": { "content": [ { "type": "text", "text": "I'll add validation to the signup form..." } ] } } ], "tasks": [ { "id": "task_1", "title": "Add email validation", "status": "completed" } ] } }
401
403
404
500