curl --request POST \
--url https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"content": "Summarize today's sales."
}
EOFimport requests
url = "https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages"
payload = { "content": "Summarize today's sales." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: 'Summarize today\'s sales.'})
};
fetch('https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_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://app.base44.com/api/agents/{agent_id}/conversations/{conversation_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' => 'Summarize today\'s sales.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages"
payload := strings.NewReader("{\n \"content\": \"Summarize today's sales.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"Summarize today's sales.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"Summarize today's sales.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"role": "assistant",
"content": "Here's a summary of today's sales.",
"metadata": {
"created_date": "2026-08-02T14:30:00Z"
},
"file_urls": [
"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/report.pdf"
],
"tool_calls": [
{
"id": "toolu_01A09q90qw90lq917835lq9",
"name": "web_search",
"requires_user_input": false,
"status": "success"
}
]
}Send Superagent message
Sends a message to a Superagent and waits for its reply.
The request stays open while the agent works, which includes any tools it runs, and returns the agent’s final reply. A reply that needs many tool calls can take minutes, so set a generous client timeout. The agent’s turn uses credits from the agent’s workspace.
Send content, and optionally file_urls, in the body. Use a conversation_id from Create Superagent conversation or List Superagent conversations.
Each request starts its own reply. Sending another message before the agent answers starts a second reply alongside the first, and retrying a request that timed out runs the turn again and uses credits again. Wait for the reply before you send the next message.
To hear about messages without waiting on this request, subscribe to message.created and message.completed with Create Superagent webhook.
This endpoint is limited to 20 requests per minute.
Runs as your user in this app, so the app’s access rules decide which records you can read or change.
curl --request POST \
--url https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"content": "Summarize today's sales."
}
EOFimport requests
url = "https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages"
payload = { "content": "Summarize today's sales." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: 'Summarize today\'s sales.'})
};
fetch('https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_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://app.base44.com/api/agents/{agent_id}/conversations/{conversation_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' => 'Summarize today\'s sales.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages"
payload := strings.NewReader("{\n \"content\": \"Summarize today's sales.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"Summarize today's sales.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/agents/{agent_id}/conversations/{conversation_id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"Summarize today's sales.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"role": "assistant",
"content": "Here's a summary of today's sales.",
"metadata": {
"created_date": "2026-08-02T14:30:00Z"
},
"file_urls": [
"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/report.pdf"
],
"tool_calls": [
{
"id": "toolu_01A09q90qw90lq917835lq9",
"name": "web_search",
"requires_user_input": false,
"status": "success"
}
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
ID of the conversation to send the message to. Get it from Create Superagent conversation or List Superagent conversations.
Body
A message a person sends to the AI.
Response
The agent's reply.
A message in a Superagent conversation.
Was this page helpful?