curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/"
payload = { "prompt": "<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({prompt: '<string>'})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/assistant/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://api.getoneprofile.ai/tables/{table_id}/assistant/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([
'prompt' => '<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.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/"
payload := strings.NewReader("{\n \"prompt\": \"<string>\"\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.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/assistant/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 \"prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"assistant_message": {
"content": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "build",
"result": {
"columns": [
{
"column_type": "text",
"name": "<string>"
}
],
"rows": [
[
"<string>"
]
],
"scanned_row_count": 1,
"truncated": true,
"kind": "analysis"
},
"role": "user",
"sequence": 123,
"status": "complete"
},
"suggestions": [
{
"accepted_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action_key": "<string>",
"column_type": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"credit_tenths_per_row": 123,
"description": "<string>",
"dismissed_reason": "<string>",
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 123,
"rationale": "<string>",
"status": "pending",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"user_message": {
"content": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "build",
"result": {
"columns": [
{
"column_type": "text",
"name": "<string>"
}
],
"rows": [
[
"<string>"
]
],
"scanned_row_count": 1,
"truncated": true,
"kind": "analysis"
},
"role": "user",
"sequence": 123,
"status": "complete"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Ask the AI Assistant
Run one turn. There is no mode to send: the assistant reads the request, and either answers it or proposes columns as suggestions the caller can accept. Which it did comes back as the reply’s mode.
Synchronous rather than streamed — the turn reads the table before the model call and persists the transcript after it, and a streaming route runs without a database session.
curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/"
payload = { "prompt": "<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({prompt: '<string>'})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/assistant/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://api.getoneprofile.ai/tables/{table_id}/assistant/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([
'prompt' => '<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.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/"
payload := strings.NewReader("{\n \"prompt\": \"<string>\"\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.getoneprofile.ai/tables/{table_id}/assistant/conversations/{conversation_id}/messages/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/assistant/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 \"prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"assistant_message": {
"content": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "build",
"result": {
"columns": [
{
"column_type": "text",
"name": "<string>"
}
],
"rows": [
[
"<string>"
]
],
"scanned_row_count": 1,
"truncated": true,
"kind": "analysis"
},
"role": "user",
"sequence": 123,
"status": "complete"
},
"suggestions": [
{
"accepted_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action_key": "<string>",
"column_type": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"credit_tenths_per_row": 123,
"description": "<string>",
"dismissed_reason": "<string>",
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 123,
"rationale": "<string>",
"status": "pending",
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"user_message": {
"content": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "build",
"result": {
"columns": [
{
"column_type": "text",
"name": "<string>"
}
],
"rows": [
[
"<string>"
]
],
"scanned_row_count": 1,
"truncated": true,
"kind": "analysis"
},
"role": "user",
"sequence": 123,
"status": "complete"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Ask the assistant something.
Just the message: there is no mode to pick. Whether this is a column to
build or a question to answer is read off the sentence itself, and the
answer comes back as the reply's mode.
1 - 4000Response
Successful Response
What one turn produced.
Carries the persisted user message as well as the reply: the panel rendered its own optimistic copy before sending and needs the server's — including its assigned sequence — to reconcile against.
One message in a conversation.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
One message in a conversation.
Show child attributes
Show child attributes
Was this page helpful?