Skip to main content
GET
/
v1
/
threads
/
{thread_id}
/
messages
List Thread Messages
curl --request GET \
  --url https://api.example.com/v1/threads/{thread_id}/messages

Endpoint

GET https://tako.com/api/v1/threads/{thread_id}/messages

Authentication

Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Path Parameters

ParameterTypeDescription
thread_idstringRequired. The ID of the thread

Example Request

curl -X GET https://tako.com/api/v1/threads/thread_abc123/messages \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Returns an array of messages in the conversation, including both user and assistant messages.
{
  "messages": [
    {
      "role": "user",
      "content": "Show me Nvidia stock performance"
    },
    {
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "Here's Nvidia's stock performance over the past year:"
        },
        {
          "type": "visualization",
          "card_id": "abc123",
          "title": "Nvidia Stock Performance",
          "embed_url": "https://tako.com/embed/abc123",
          "image_url": "https://tako.com/image/abc123.png",
          "webpage_url": "https://tako.com/card/abc123",
          "description": "Nvidia stock has increased 180% over the past year...",
          "sources": ["Yahoo Finance"],
          "methodologies": ["Daily closing prices"]
        }
      ]
    },
    {
      "role": "user",
      "content": "How does that compare to AMD?"
    },
    {
      "role": "assistant",
      "content": [
        {
          "type": "text",
          "text": "Let me show you a comparison between Nvidia and AMD stock performance:"
        },
        {
          "type": "visualization",
          "card_id": "def456",
          "title": "Nvidia vs AMD Stock Comparison",
          "embed_url": "https://tako.com/embed/def456"
        }
      ]
    }
  ]
}

Assistant Response Content Types

Tako’s assistant messages can include multiple types of content blocks:
TypeDescription
textNatural language explanations and context
visualizationInteractive Tako cards with data visualizations
queryThe underlying data queries Tako used
follow_upSuggested follow-up questions
thinkingTako’s reasoning process (when available)

Visualization Metadata

Each visualization includes rich metadata for display:
FieldDescription
card_idUnique identifier for the visualization
titleTitle of the visualization
embed_urlURL for embedding in an iframe
image_urlStatic image URL for reports or thumbnails
webpage_urlLink to the full Tako card page
descriptionNatural language summary of the data
sourcesData sources used
methodologiesMethodology notes

Notes

  • To authenticate, you’ll need a Tako API key.
  • Use this endpoint to display the full conversation in your UI or resume conversations later.
  • The embed_url can be dropped into an iframe for interactive charts.
  • The description, sources, and methodologies fields help build trust by showing data provenance.