curl --request POST \
--url https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"question": "Summarize this conversation and suggest the next step."
}
'import requests
url = "https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns"
payload = { "question": "Summarize this conversation and suggest the next step." }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({question: 'Summarize this conversation and suggest the next step.'})
};
fetch('https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns', 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.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns",
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([
'question' => 'Summarize this conversation and suggest the next step.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns"
payload := strings.NewReader("{\n \"question\": \"Summarize this conversation and suggest the next step.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"Summarize this conversation and suggest the next step.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"question\": \"Summarize this conversation and suggest the next step.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"sessionId": "<string>",
"conversationId": "<string>",
"runId": "<string>",
"status": "<string>",
"question": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"approvalMode": "<string>",
"retryOfTurnId": "<string>",
"answer": {
"answer": "<string>",
"warnings": [
"<string>"
],
"citations": [
{}
],
"proposals": [
{}
],
"actionProposals": [
{
"id": "<string>",
"type": "<string>",
"target": {},
"before": {},
"after": {},
"confirmationRequired": true
}
]
},
"actionConfirmations": [
{
"id": "<string>",
"proposalId": "<string>",
"runId": "<string>",
"effectId": "<string>",
"type": "<string>",
"target": {},
"before": {},
"after": {},
"confirmedAt": "2023-11-07T05:31:56Z",
"undo": {
"status": "available",
"undoneAt": "2023-11-07T05:31:56Z"
}
}
]
}
}{
"error": {
"code": "route.not_found",
"message": "Not found",
"requestId": "req_x6q5vl75f5d53m7oet2k4r5w6a"
}
}Ask Evelin in a chat
Only this API key or OAuth grant can access this chat. Requires current owner/admin membership. Chats retain a ceiling of the permissions granted at creation; added permissions require a new chat. Private app chats and other clients are isolated. External integrations such as Linear are unavailable. Starts asynchronous work using the existing AI credit policy. Poll get_evelin_chat_turn with the returned sessionId and id. Reuse the same idempotency key for uncertain retries. A failed turn can be retried using retryOfTurnId and a new key only while it is the latest turn. All changes need separate action confirmation; no messages are sent.
curl --request POST \
--url https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"question": "Summarize this conversation and suggest the next step."
}
'import requests
url = "https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns"
payload = { "question": "Summarize this conversation and suggest the next step." }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({question: 'Summarize this conversation and suggest the next step.'})
};
fetch('https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns', 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.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns",
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([
'question' => 'Summarize this conversation and suggest the next step.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns"
payload := strings.NewReader("{\n \"question\": \"Summarize this conversation and suggest the next step.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"Summarize this conversation and suggest the next step.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.protodesk.io/v1/ai/assistant/sessions/{sessionId}/turns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"question\": \"Summarize this conversation and suggest the next step.\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"sessionId": "<string>",
"conversationId": "<string>",
"runId": "<string>",
"status": "<string>",
"question": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"approvalMode": "<string>",
"retryOfTurnId": "<string>",
"answer": {
"answer": "<string>",
"warnings": [
"<string>"
],
"citations": [
{}
],
"proposals": [
{}
],
"actionProposals": [
{
"id": "<string>",
"type": "<string>",
"target": {},
"before": {},
"after": {},
"confirmationRequired": true
}
]
},
"actionConfirmations": [
{
"id": "<string>",
"proposalId": "<string>",
"runId": "<string>",
"effectId": "<string>",
"type": "<string>",
"target": {},
"before": {},
"after": {},
"confirmedAt": "2023-11-07T05:31:56Z",
"undo": {
"status": "available",
"undoneAt": "2023-11-07T05:31:56Z"
}
}
]
}
}{
"error": {
"code": "route.not_found",
"message": "Not found",
"requestId": "req_x6q5vl75f5d53m7oet2k4r5w6a"
}
}Authorizations
Use a workspace API key in the Authorization header: Bearer pk_.... Older pk_live_ and pk_test_ keys remain valid; their prefixes do not isolate data or select a separate environment.
Headers
8 - 128Path Parameters
1Body
1 - 4000Retry only the latest failed turn, with its identical question and attachments.
The preceding turn whose clarification is being answered; mutually exclusive with retryOfTurnId.
ask_before_changes 4Show child attributes
Show child attributes
Response
Successful operation.
Show child attributes
Show child attributes
