GET /sessions/{session_id}/records

Return the session's stored transcript records, oldest first.

Pagination is opt-in (cursor/limit); a bare call returns the full retained transcript. Available to sandbox tokens too: an agent answering "did X look into Y?" needs to read the session it found via /sessions/search, and any org member sees the same transcript in the dashboard.

curl "https://api.ellipsis.dev/v1/sessions/{session_id}/records" \
  -H "Authorization: Bearer $ELLIPSIS_API_KEY"
{
  "earliest_feed_seq": 0,
  "has_more": false,
  "messages": [],
  "next_cursor": "string",
  "records": [
    {
      "agent_turn_id": "string",
      "cost": 0,
      "created_at": "2026-01-01T00:00:00Z",
      "duration": 0,
      "feed_seq": 0,
      "id": "string",
      "model": "string",
      "payload": {
        "cache_creation": {
          "ephemeral_1h_input_tokens": 0,
          "ephemeral_5m_input_tokens": 0
        },
        "content": [],
        "error": "string",
        "kind": "assistant",
        "message_id": "string",
        "model": "string",
        "parent_tool_use_id": "string",
        "session_id": "string",
        "stop_reason": "string",
        "usage": {
          "cache_creation_input_tokens": 0,
          "cache_read_input_tokens": 0,
          "cost_usd": 0,
          "input_tokens": 0,
          "num_turns": 0,
          "output_tokens": 0
        },
        "uuid": "string"
      },
      "record_format": "claude_sdk@1",
      "record_type": "string",
      "session_id": "string",
      "session_message_id": "string",
      "source": "lifecycle",
      "stream_seq": 0,
      "tokens_info": {
        "cache_creation_input_tokens": 0,
        "cache_read_input_tokens": 0,
        "cost_usd": 0,
        "input_tokens": 0,
        "num_turns": 0,
        "output_tokens": 0
      },
      "tools": [
        "string"
      ]
    }
  ]
}
No request body.
{
  "properties": {
    "earliest_feed_seq": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "has_more": {
      "default": false,
      "type": "boolean"
    },
    "messages": {
      "default": [],
      "items": {
        "properties": {
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_turn_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feed_seq": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "sender_attribution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sender_attribution_type": {
            "anyOf": [
              {
                "enum": [
                  "github_user",
                  "linear_user",
                  "slack_user",
                  "api_key"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "session_id": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "delivered"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "session_id",
          "status",
          "body",
          "created_at"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "records": {
      "items": {
        "oneOf": [
          {
            "properties": {
              "agent_turn_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "duration": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "feed_seq": {
                "type": "integer"
              },
              "id": {
                "type": "string"
              },
              "model": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "payload": {
                "oneOf": [
                  {
                    "properties": {
                      "cache_creation": {
                        "type": "object"
                      },
                      "content": {
                        "type": "array"
                      },
                      "error": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "message_id": {
                        "type": "object"
                      },
                      "model": {
                        "type": "string"
                      },
                      "parent_tool_use_id": {
                        "type": "object"
                      },
                      "session_id": {
                        "type": "object"
                      },
                      "stop_reason": {
                        "type": "object"
                      },
                      "usage": {
                        "type": "object"
                      },
                      "uuid": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "model"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "content": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "parent_tool_use_id": {
                        "type": "object"
                      },
                      "uuid": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "content"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "data": {
                        "type": "object"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "session_id": {
                        "type": "object"
                      },
                      "subtype": {
                        "type": "string"
                      },
                      "uuid": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "subtype"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "api_error_status": {
                        "type": "object"
                      },
                      "cost_usd": {
                        "type": "object"
                      },
                      "duration_api_ms": {
                        "type": "integer"
                      },
                      "duration_ms": {
                        "type": "integer"
                      },
                      "errors": {
                        "type": "object"
                      },
                      "is_error": {
                        "type": "boolean"
                      },
                      "kind": {
                        "type": "string"
                      },
                      "model_usage": {
                        "type": "object"
                      },
                      "num_turns": {
                        "type": "integer"
                      },
                      "result": {
                        "type": "object"
                      },
                      "session_id": {
                        "type": "object"
                      },
                      "stop_reason": {
                        "type": "object"
                      },
                      "structured_output": {
                        "type": "object"
                      },
                      "subtype": {
                        "type": "string"
                      },
                      "usage": {
                        "type": "object"
                      },
                      "uuid": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "subtype",
                      "is_error",
                      "num_turns",
                      "duration_ms",
                      "duration_api_ms"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "kind": {
                        "type": "string"
                      },
                      "rate_limit_type": {
                        "type": "object"
                      },
                      "resets_at": {
                        "type": "object"
                      },
                      "session_id": {
                        "type": "object"
                      },
                      "status": {
                        "type": "string"
                      },
                      "utilization": {
                        "type": "object"
                      },
                      "uuid": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "status"
                    ],
                    "type": "object"
                  }
                ]
              },
              "record_format": {
                "const": "claude_sdk@1",
                "default": "claude_sdk@1",
                "type": "string"
              },
              "record_type": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "session_message_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "enum": [
                  "lifecycle",
                  "claude_code",
                  "codex"
                ],
                "type": "string"
              },
              "stream_seq": {
                "type": "integer"
              },
              "tokens_info": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "cache_creation_input_tokens": {
                        "type": "integer"
                      },
                      "cache_read_input_tokens": {
                        "type": "integer"
                      },
                      "cost_usd": {
                        "type": "number"
                      },
                      "input_tokens": {
                        "type": "integer"
                      },
                      "num_turns": {
                        "type": "integer"
                      },
                      "output_tokens": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tools": {
                "anyOf": [
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "session_id",
              "feed_seq",
              "stream_seq",
              "source",
              "record_type",
              "created_at",
              "payload"
            ],
            "type": "object"
          },
          {
            "properties": {
              "agent_turn_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "duration": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "feed_seq": {
                "type": "integer"
              },
              "id": {
                "type": "string"
              },
              "model": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "payload": {
                "anyOf": [
                  {
                    "additionalProperties": true,
                    "properties": {
                      "thread_id": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "type": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "usage": {
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "error": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "message": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "item": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "item"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "item": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "item"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "item": {
                        "type": "object"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "item"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": true,
                    "properties": {
                      "type": {
                        "type": "object"
                      }
                    },
                    "type": "object"
                  }
                ]
              },
              "record_format": {
                "const": "codex_jsonl@1",
                "default": "codex_jsonl@1",
                "type": "string"
              },
              "record_type": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "session_message_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "enum": [
                  "lifecycle",
                  "claude_code",
                  "codex"
                ],
                "type": "string"
              },
              "stream_seq": {
                "type": "integer"
              },
              "tokens_info": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "cache_creation_input_tokens": {
                        "type": "integer"
                      },
                      "cache_read_input_tokens": {
                        "type": "integer"
                      },
                      "cost_usd": {
                        "type": "number"
                      },
                      "input_tokens": {
                        "type": "integer"
                      },
                      "num_turns": {
                        "type": "integer"
                      },
                      "output_tokens": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tools": {
                "anyOf": [
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "session_id",
              "feed_seq",
              "stream_seq",
              "source",
              "record_type",
              "created_at",
              "payload"
            ],
            "type": "object"
          },
          {
            "properties": {
              "agent_turn_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "duration": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "feed_seq": {
                "type": "integer"
              },
              "id": {
                "type": "string"
              },
              "model": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "payload": {
                "additionalProperties": true,
                "type": "object"
              },
              "record_format": {
                "const": "ellipsis_lifecycle@1",
                "default": "ellipsis_lifecycle@1",
                "type": "string"
              },
              "record_type": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "session_message_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source": {
                "enum": [
                  "lifecycle",
                  "claude_code",
                  "codex"
                ],
                "type": "string"
              },
              "stream_seq": {
                "type": "integer"
              },
              "tokens_info": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "cache_creation_input_tokens": {
                        "type": "integer"
                      },
                      "cache_read_input_tokens": {
                        "type": "integer"
                      },
                      "cost_usd": {
                        "type": "number"
                      },
                      "input_tokens": {
                        "type": "integer"
                      },
                      "num_turns": {
                        "type": "integer"
                      },
                      "output_tokens": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tools": {
                "anyOf": [
                  {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "session_id",
              "feed_seq",
              "stream_seq",
              "source",
              "record_type",
              "created_at",
              "payload"
            ],
            "type": "object"
          }
        ]
      },
      "type": "array"
    }
  },
  "required": [
    "records"
  ],
  "type": "object"
}

Request

Responses

On this page

No Headings
Schedule a demo