Returns paginated messages for the caller’s tenant (derived from JWT) with optional filters on state and session_id. Every message belongs to exactly one session and tracks the full lifecycle (submitted → working → input-required → completed/failed/canceled). Requires JWT with at least read scope.
POST
/
messages
/
get
List messages for a tenant
curl --request POST \
--url https://api.svantic.com/messages/get \
--header 'Content-Type: application/json' \
--data '
{
"page": 1,
"page_size": 20,
"state": "<string>",
"session_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({page: 1, page_size: 20, state: '<string>', session_id: '<string>'})
};
fetch('https://api.svantic.com/messages/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.svantic.com/messages/get"
payload = {
"page": 1,
"page_size": 20,
"state": "<string>",
"session_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.svantic.com/messages/get"
payload := strings.NewReader("{\n \"page\": 1,\n \"page_size\": 20,\n \"state\": \"<string>\",\n \"session_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"data": [
{
"message_id": "<string>",
"session_id": "<string>",
"tenant_id": "<string>",
"state": "submitted",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_input": "<string>",
"assistant_output": "<string>",
"preview": "<string>",
"trace_id": "<string>",
"root_agent": "<string>",
"duration_ms": 123,
"error_message": "<string>",
"task_data": {},
"attachments": [
{}
],
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"page": 123,
"per_page": 123,
"total_pages": 123
}{
"error": "Invalid request body",
"code": "BAD_REQUEST"
}{
"error": "Invalid or expired token",
"code": "unauthorized"
}{
"error": "JWT does not include the required scope for this operation",
"code": "forbidden"
}{
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"request_id": "req_01EXAMPLE",
"timestamp": "2026-03-31T12:00:00.000Z"
}Body
application/json
⌘I
List messages for a tenant
curl --request POST \
--url https://api.svantic.com/messages/get \
--header 'Content-Type: application/json' \
--data '
{
"page": 1,
"page_size": 20,
"state": "<string>",
"session_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({page: 1, page_size: 20, state: '<string>', session_id: '<string>'})
};
fetch('https://api.svantic.com/messages/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.svantic.com/messages/get"
payload = {
"page": 1,
"page_size": 20,
"state": "<string>",
"session_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.svantic.com/messages/get"
payload := strings.NewReader("{\n \"page\": 1,\n \"page_size\": 20,\n \"state\": \"<string>\",\n \"session_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"data": [
{
"message_id": "<string>",
"session_id": "<string>",
"tenant_id": "<string>",
"state": "submitted",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_input": "<string>",
"assistant_output": "<string>",
"preview": "<string>",
"trace_id": "<string>",
"root_agent": "<string>",
"duration_ms": 123,
"error_message": "<string>",
"task_data": {},
"attachments": [
{}
],
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"page": 123,
"per_page": 123,
"total_pages": 123
}{
"error": "Invalid request body",
"code": "BAD_REQUEST"
}{
"error": "Invalid or expired token",
"code": "unauthorized"
}{
"error": "JWT does not include the required scope for this operation",
"code": "forbidden"
}{
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"request_id": "req_01EXAMPLE",
"timestamp": "2026-03-31T12:00:00.000Z"
}