Post a message to an existing chat and stream the reply
curl --request POST \
--url https://api.usenotra.com/v1/chats/{chatId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Summarize what shipped in the last week.",
"approvals": [
{
"id": "<string>",
"approved": true,
"reason": "<string>"
}
],
"model": "zai/glm-5.3-flash",
"enableThinking": false,
"thinkingLevel": "medium",
"timezone": "Europe/Berlin",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
]
}
'import requests
url = "https://api.usenotra.com/v1/chats/{chatId}"
payload = {
"message": "Summarize what shipped in the last week.",
"approvals": [
{
"id": "<string>",
"approved": True,
"reason": "<string>"
}
],
"model": "zai/glm-5.3-flash",
"enableThinking": False,
"thinkingLevel": "medium",
"timezone": "Europe/Berlin",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
]
}
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({
message: 'Summarize what shipped in the last week.',
approvals: [{id: '<string>', approved: true, reason: '<string>'}],
model: 'zai/glm-5.3-flash',
enableThinking: false,
thinkingLevel: 'medium',
timezone: 'Europe/Berlin',
context: [
{
type: 'github-repo',
integrationId: '<string>',
owner: '<string>',
repo: '<string>'
}
]
})
};
fetch('https://api.usenotra.com/v1/chats/{chatId}', 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://api.usenotra.com/v1/chats/{chatId}",
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([
'message' => 'Summarize what shipped in the last week.',
'approvals' => [
[
'id' => '<string>',
'approved' => true,
'reason' => '<string>'
]
],
'model' => 'zai/glm-5.3-flash',
'enableThinking' => false,
'thinkingLevel' => 'medium',
'timezone' => 'Europe/Berlin',
'context' => [
[
'type' => 'github-repo',
'integrationId' => '<string>',
'owner' => '<string>',
'repo' => '<string>'
]
]
]),
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://api.usenotra.com/v1/chats/{chatId}"
payload := strings.NewReader("{\n \"message\": \"Summarize what shipped in the last week.\",\n \"approvals\": [\n {\n \"id\": \"<string>\",\n \"approved\": true,\n \"reason\": \"<string>\"\n }\n ],\n \"model\": \"zai/glm-5.3-flash\",\n \"enableThinking\": false,\n \"thinkingLevel\": \"medium\",\n \"timezone\": \"Europe/Berlin\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ]\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://api.usenotra.com/v1/chats/{chatId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Summarize what shipped in the last week.\",\n \"approvals\": [\n {\n \"id\": \"<string>\",\n \"approved\": true,\n \"reason\": \"<string>\"\n }\n ],\n \"model\": \"zai/glm-5.3-flash\",\n \"enableThinking\": false,\n \"thinkingLevel\": \"medium\",\n \"timezone\": \"Europe/Berlin\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/chats/{chatId}")
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 \"message\": \"Summarize what shipped in the last week.\",\n \"approvals\": [\n {\n \"id\": \"<string>\",\n \"approved\": true,\n \"reason\": \"<string>\"\n }\n ],\n \"model\": \"zai/glm-5.3-flash\",\n \"enableThinking\": false,\n \"thinkingLevel\": \"medium\",\n \"timezone\": \"Europe/Berlin\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body<string>{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"limit": 2,
"remaining": 1,
"reset": 123
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}Post a message to an existing chat and stream the reply
Sends a message or resumes pending tool approvals and streams the assistant reply. Earlier messages are included automatically. To approve or deny tools, send approvals: [{ "id": "<approvalId>", "approved": true }] for every pending approval in the latest assistant message, without a message field; use "approved": false to deny. Approval IDs are emitted in tool-approval-request chunks and stored on tool parts in chat history.
POST
/
v1
/
chats
/
{chatId}
Post a message to an existing chat and stream the reply
curl --request POST \
--url https://api.usenotra.com/v1/chats/{chatId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Summarize what shipped in the last week.",
"approvals": [
{
"id": "<string>",
"approved": true,
"reason": "<string>"
}
],
"model": "zai/glm-5.3-flash",
"enableThinking": false,
"thinkingLevel": "medium",
"timezone": "Europe/Berlin",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
]
}
'import requests
url = "https://api.usenotra.com/v1/chats/{chatId}"
payload = {
"message": "Summarize what shipped in the last week.",
"approvals": [
{
"id": "<string>",
"approved": True,
"reason": "<string>"
}
],
"model": "zai/glm-5.3-flash",
"enableThinking": False,
"thinkingLevel": "medium",
"timezone": "Europe/Berlin",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
]
}
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({
message: 'Summarize what shipped in the last week.',
approvals: [{id: '<string>', approved: true, reason: '<string>'}],
model: 'zai/glm-5.3-flash',
enableThinking: false,
thinkingLevel: 'medium',
timezone: 'Europe/Berlin',
context: [
{
type: 'github-repo',
integrationId: '<string>',
owner: '<string>',
repo: '<string>'
}
]
})
};
fetch('https://api.usenotra.com/v1/chats/{chatId}', 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://api.usenotra.com/v1/chats/{chatId}",
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([
'message' => 'Summarize what shipped in the last week.',
'approvals' => [
[
'id' => '<string>',
'approved' => true,
'reason' => '<string>'
]
],
'model' => 'zai/glm-5.3-flash',
'enableThinking' => false,
'thinkingLevel' => 'medium',
'timezone' => 'Europe/Berlin',
'context' => [
[
'type' => 'github-repo',
'integrationId' => '<string>',
'owner' => '<string>',
'repo' => '<string>'
]
]
]),
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://api.usenotra.com/v1/chats/{chatId}"
payload := strings.NewReader("{\n \"message\": \"Summarize what shipped in the last week.\",\n \"approvals\": [\n {\n \"id\": \"<string>\",\n \"approved\": true,\n \"reason\": \"<string>\"\n }\n ],\n \"model\": \"zai/glm-5.3-flash\",\n \"enableThinking\": false,\n \"thinkingLevel\": \"medium\",\n \"timezone\": \"Europe/Berlin\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ]\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://api.usenotra.com/v1/chats/{chatId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Summarize what shipped in the last week.\",\n \"approvals\": [\n {\n \"id\": \"<string>\",\n \"approved\": true,\n \"reason\": \"<string>\"\n }\n ],\n \"model\": \"zai/glm-5.3-flash\",\n \"enableThinking\": false,\n \"thinkingLevel\": \"medium\",\n \"timezone\": \"Europe/Berlin\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/chats/{chatId}")
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 \"message\": \"Summarize what shipped in the last week.\",\n \"approvals\": [\n {\n \"id\": \"<string>\",\n \"approved\": true,\n \"reason\": \"<string>\"\n }\n ],\n \"model\": \"zai/glm-5.3-flash\",\n \"enableThinking\": false,\n \"thinkingLevel\": \"medium\",\n \"timezone\": \"Europe/Berlin\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body<string>{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"limit": 2,
"remaining": 1,
"reset": 123
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}{
"error": "<string>",
"code": "<string>",
"recovery": "<string>"
}Authorizations
Send your API key in the Authorization header as Bearer API_KEY. Account API keys work in every workspace you belong to: send X-Notra-Organization-Id with the workspace id or slug to choose one. Workspace endpoints require it when you belong to more than one workspace; GET /v1/me/workspaces works without it. Organization keys only accept their own workspace there.
Body
application/json
Deprecated and ignored. Chats always respond with GLM 5.3 Flash.
Available options:
auto, zai/glm-5.3, zai/glm-5.3-flash, anthropic/claude-opus-5.5, anthropic/claude-opus-5, anthropic/claude-opus-4.8, anthropic/claude-sonnet-5, anthropic/claude-sonnet-4.6, anthropic/claude-haiku-4.5, openai/gpt-6-sol, openai/gpt-6-luna, openai/gpt-5.6-sol, openai/gpt-5.5, openai/gpt-5.4 Example:
"zai/glm-5.3-flash"
Response
Streaming UI message stream (newline-delimited JSON chunks). Read the X-Chat-Id response header for the chat id, or take it from the start chunk's messageMetadata.chatId.
The response is of type string.
Was this page helpful?