List pending messages (Approval Queue)
Returns messages in input-required state for the caller’s tenant (derived from JWT). These are tasks where an agent is blocked and waiting for human input — approvals, form data, or confirmations. This is the data source for the dashboard Approval Queue.
POST
/
messages
/
pending
List pending messages (Approval Queue)
curl --request POST \
--url https://api.svantic.com/messages/pending \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "<string>",
"limit": 50,
"offset": 0
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: '<string>', limit: 50, offset: 0})
};
fetch('https://api.svantic.com/messages/pending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.svantic.com/messages/pending"
payload = {
"session_id": "<string>",
"limit": 50,
"offset": 0
}
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/pending"
payload := strings.NewReader("{\n \"session_id\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\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))
}{
"messages": [
{
"message_id": "<string>",
"session_id": "<string>",
"tenant_id": "<string>",
"state": "input-required",
"user_input": "<string>",
"assistant_output": "<string>",
"task_data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 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
Request to list messages awaiting human input. The tenant is derived from the caller's JWT — there is no tenant_id field in the request body.
⌘I
List pending messages (Approval Queue)
curl --request POST \
--url https://api.svantic.com/messages/pending \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "<string>",
"limit": 50,
"offset": 0
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: '<string>', limit: 50, offset: 0})
};
fetch('https://api.svantic.com/messages/pending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.svantic.com/messages/pending"
payload = {
"session_id": "<string>",
"limit": 50,
"offset": 0
}
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/pending"
payload := strings.NewReader("{\n \"session_id\": \"<string>\",\n \"limit\": 50,\n \"offset\": 0\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))
}{
"messages": [
{
"message_id": "<string>",
"session_id": "<string>",
"tenant_id": "<string>",
"state": "input-required",
"user_input": "<string>",
"assistant_output": "<string>",
"task_data": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"total": 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"
}