POST
https://api.usenotra.com
/
v1
/
chats
Start a new chat and stream the reply
curl --request POST \
--url https://api.usenotra.com/v1/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"enableThinking": true,
"timezone": "<string>",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
],
"externalChannelId": {
"id": "<string>"
}
}
'import requests
url = "https://api.usenotra.com/v1/chats"
payload = {
"message": "<string>",
"enableThinking": True,
"timezone": "<string>",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
],
"externalChannelId": { "id": "<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: '<string>',
enableThinking: true,
timezone: '<string>',
context: [
{
type: 'github-repo',
integrationId: '<string>',
owner: '<string>',
repo: '<string>'
}
],
externalChannelId: {id: '<string>'}
})
};
fetch('https://api.usenotra.com/v1/chats', 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",
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' => '<string>',
'enableThinking' => true,
'timezone' => '<string>',
'context' => [
[
'type' => 'github-repo',
'integrationId' => '<string>',
'owner' => '<string>',
'repo' => '<string>'
]
],
'externalChannelId' => [
'id' => '<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"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"enableThinking\": true,\n \"timezone\": \"<string>\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ],\n \"externalChannelId\": {\n \"id\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"enableThinking\": true,\n \"timezone\": \"<string>\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ],\n \"externalChannelId\": {\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/chats")
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\": \"<string>\",\n \"enableThinking\": true,\n \"timezone\": \"<string>\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ],\n \"externalChannelId\": {\n \"id\": \"<string>\"\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>",
"code": "<string>",
"recovery": "<string>"
}Authorizations
Send your API key in the Authorization header as Bearer API_KEY.
Body
application/json
Required string length:
1 - 50000Available options:
auto, anthropic/claude-opus-4.8, anthropic/claude-sonnet-5, anthropic/claude-sonnet-4.6, anthropic/claude-haiku-4.5, openai/gpt-5.4, openai/gpt-5.5 Available options:
off, low, medium, high Required string length:
1 - 100- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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.
Last modified on July 17, 2026
Was this page helpful?
⌘I
Start a new chat and stream the reply
curl --request POST \
--url https://api.usenotra.com/v1/chats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"enableThinking": true,
"timezone": "<string>",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
],
"externalChannelId": {
"id": "<string>"
}
}
'import requests
url = "https://api.usenotra.com/v1/chats"
payload = {
"message": "<string>",
"enableThinking": True,
"timezone": "<string>",
"context": [
{
"type": "github-repo",
"integrationId": "<string>",
"owner": "<string>",
"repo": "<string>"
}
],
"externalChannelId": { "id": "<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: '<string>',
enableThinking: true,
timezone: '<string>',
context: [
{
type: 'github-repo',
integrationId: '<string>',
owner: '<string>',
repo: '<string>'
}
],
externalChannelId: {id: '<string>'}
})
};
fetch('https://api.usenotra.com/v1/chats', 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",
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' => '<string>',
'enableThinking' => true,
'timezone' => '<string>',
'context' => [
[
'type' => 'github-repo',
'integrationId' => '<string>',
'owner' => '<string>',
'repo' => '<string>'
]
],
'externalChannelId' => [
'id' => '<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"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"enableThinking\": true,\n \"timezone\": \"<string>\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ],\n \"externalChannelId\": {\n \"id\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"enableThinking\": true,\n \"timezone\": \"<string>\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ],\n \"externalChannelId\": {\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenotra.com/v1/chats")
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\": \"<string>\",\n \"enableThinking\": true,\n \"timezone\": \"<string>\",\n \"context\": [\n {\n \"type\": \"github-repo\",\n \"integrationId\": \"<string>\",\n \"owner\": \"<string>\",\n \"repo\": \"<string>\"\n }\n ],\n \"externalChannelId\": {\n \"id\": \"<string>\"\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>",
"code": "<string>",
"recovery": "<string>"
}