Skip to main content
POST
/
v1
/
threads
/
{thread_id}
/
messages
Create message
curl --request POST \
  --url https://flow.seekr.com/v1/threads/{thread_id}/messages \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "meta_data": {}
}
'
import requests

url = "https://flow.seekr.com/v1/threads/{thread_id}/messages"

payload = {
"content": "<string>",
"meta_data": {}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', meta_data: {}})
};

fetch('https://flow.seekr.com/v1/threads/{thread_id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://flow.seekr.com/v1/threads/{thread_id}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'meta_data' => [

]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://flow.seekr.com/v1/threads/{thread_id}/messages"

payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"meta_data\": {}\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/threads/{thread_id}/messages")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"meta_data\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://flow.seekr.com/v1/threads/{thread_id}/messages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"meta_data\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "thread_id": "<string>",
  "role": "<string>",
  "content": "<string>",
  "id": "<string>",
  "object": "thread.message",
  "created_at": "2023-11-07T05:31:56Z",
  "parts": [
    {
      "type": "<string>",
      "text": "<string>",
      "id": "<string>",
      "metadata": {}
    }
  ],
  "agent_id": "<string>",
  "run_id": "<string>",
  "meta_data": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.

Headers

x-team-id
string | null

Path Parameters

thread_id
string
required

Query Parameters

include_parts
boolean
default:false

Body

application/json

Pydantic model for creating a thread message request.

Attributes: role (str): The role of the message sender. content (Union[str, list[InputMessage], list[OutputMessage]]): The content of the message. meta_data (Optional[dict[str, Any]]): Optional metadata dictionary.

role
enum<string>
required
Available options:
user,
system,
tool,
developer,
assistant
content
required
meta_data
Meta Data · object

Response

Successful Response

Thread message shape returned by the thread API.

parts are opt-in so existing clients keep the previous response shape by default.

thread_id
string
required
role
string
required
content
required
id
string
object
string
default:thread.message
created_at
string<date-time>
parts
(MessageTextPart · object | MessageReasoningPart · object | MessageFilePart · object | MessageDataPart · object | MessageToolCallPart · object | MessageToolErrorPart · object | MessageToolResultPart · object)[] | null

A text part persisted alongside a thread message.

agent_id
string | null
run_id
string | null
meta_data
Meta Data · object
Last modified on June 18, 2026