Skip to main content
POST
/
v1
/
threads
/
{thread_id}
/
messages
Create Thread Message
curl --request POST \
  --url https://api.example.com/v1/threads/{thread_id}/messages

Endpoint

POST 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

Request Body

ParameterTypeDescription
user_messagestringRequired. The message to send to Tako

Example Request

curl -X POST https://tako.com/api/v1/threads/thread_abc123/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_message": "Show me Nvidia stock performance"
  }'

Response

Returns Tako’s assistant response with content blocks.
{
  "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"]
    }
  ]
}

Follow-up Messages

Tako understands context from previous messages. You can ask follow-up questions naturally:
curl -X POST https://tako.com/api/v1/threads/thread_abc123/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_message": "How does that compare to AMD?"
  }'
Response:
{
  "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"
    }
  ]
}

Notes

  • To authenticate, you’ll need a Tako API key.
  • First create a thread, then use this endpoint to add messages.
  • Threads maintain context—Tako understands references to previous messages, data points, and visualizations.
  • Just send natural language messages like “compare that to last year” or “show me the breakdown by region”.
  • Each visualization includes embed_url for interactive iframes and image_url for static images.