JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const conversation = await client.assistant.conversations.update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
console.log(conversation.session);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
conversation = client.assistant.conversations.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(conversation.session)curl --request PATCH \
--url https://api.mobilerun.ai/v1/assistant/chat/sessions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"pinned": true,
"title": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/v1/assistant/chat/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'pinned' => true,
'title' => '<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.mobilerun.ai/v1/assistant/chat/sessions/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"pinned\": true,\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.mobilerun.ai/v1/assistant/chat/sessions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"pinned\": true,\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/v1/assistant/chat/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"pinned\": true,\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"session": {
"agent": "<string>",
"basePromptTokens": 123,
"contextExhaustedAt": "<string>",
"costCents": 123,
"costUsd": 123,
"createdAt": "<string>",
"description": "<string>",
"id": "<string>",
"lastActiveAt": "<string>",
"peakPromptTokens": 123,
"pinned": true,
"promptStatus": "ready",
"status": "<string>",
"title": "<string>",
"turnActive": true,
"turnStartedAt": "<string>",
"createdBy": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"code": "session_title_managed_by_workflow"
}Chat
Rename, archive, or pin a named chat session
Rename, change status, and/or pin. Title updates apply best-effort. Archiving always clears the pinned flag. title is rejected with 409 code: "session_title_managed_by_workflow" when this chat is bound to a workflow — a bound chat’s title is managed by the workflow. Other fields (description, status, pinned) remain updateable; archiving a bound chat stays allowed.
PATCH
/
assistant
/
chat
/
sessions
/
{id}
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const conversation = await client.assistant.conversations.update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);
console.log(conversation.session);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
conversation = client.assistant.conversations.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(conversation.session)curl --request PATCH \
--url https://api.mobilerun.ai/v1/assistant/chat/sessions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"pinned": true,
"title": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/v1/assistant/chat/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'pinned' => true,
'title' => '<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.mobilerun.ai/v1/assistant/chat/sessions/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"pinned\": true,\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.mobilerun.ai/v1/assistant/chat/sessions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"pinned\": true,\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/v1/assistant/chat/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"pinned\": true,\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"session": {
"agent": "<string>",
"basePromptTokens": 123,
"contextExhaustedAt": "<string>",
"costCents": 123,
"costUsd": 123,
"createdAt": "<string>",
"description": "<string>",
"id": "<string>",
"lastActiveAt": "<string>",
"peakPromptTokens": 123,
"pinned": true,
"promptStatus": "ready",
"status": "<string>",
"title": "<string>",
"turnActive": true,
"turnStartedAt": "<string>",
"createdBy": "<string>"
}
}{
"message": "<string>"
}{
"message": "<string>",
"code": "session_title_managed_by_workflow"
}Authorizations
Bearer token via Authorization header
Path Parameters
Body
application/json
Response
Updated session
Show child attributes
Show child attributes
Was this page helpful?
⌘I