Skip to main content
POST
/
v1
/
threads
cURL
curl --request POST \
  --url https://trytako.com/api/v1/threads \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "message": "<string>",
  "file_sources": [
    {
      "file_id": "<string>",
      "file_context": "<string>"
    }
  ],
  "in_focus_card_id": "<string>"
}'
{
  "thread_id": "<string>",
  "message_id": "<string>",
  "created": 123,
  "object": "thread.message",
  "role": "<string>",
  "content": [
    {
      "type": "text",
      "text": "<string>"
    }
  ]
}

Notes

  • To authenticate, you’ll need a Tako API key. It’s best practice to store it as an environment variable to avoid hardcoding sensitive credentials in your code.
  • Enables natural language discussion and can produce visualization content within assistant messages.

Authorizations

X-API-Key
string
header
required

Body

application/json
message
string
required

The message text

file_sources
object[]

Optional list of file sources

in_focus_card_id
string | null

Optional card ID currently in focus

Response

Created message in external format

Standardized external message format.

This is the unified format returned by the external API, regardless of the internal representation.

thread_id
string
required

The thread ID

message_id
string
required

The message ID

created
integer
required

Unix timestamp of message creation

role
string
required

Message role: 'user' or 'assistant'

content
Content · array
required

List of content blocks in the message

  • TextContent
  • VisualizationContent
  • FollowupQueriesContent
  • ThinkingStepsContent
  • UserQueryContent
  • NoResultsContent
  • CardExportContent
object
string
default:thread.message

Object type identifier

I