curl --request PATCH \
--url https://app.traceroot.ai/api/v1/public/projects/{project_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"trace_ttl_days": 123
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/projects/{project_id}"
payload = {
"name": "<string>",
"trace_ttl_days": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', trace_ttl_days: 123})
};
fetch('https://app.traceroot.ai/api/v1/public/projects/{project_id}', 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://app.traceroot.ai/api/v1/public/projects/{project_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([
'name' => '<string>',
'trace_ttl_days' => 123
]),
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://app.traceroot.ai/api/v1/public/projects/{project_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"trace_ttl_days\": 123\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://app.traceroot.ai/api/v1/public/projects/{project_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"trace_ttl_days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/projects/{project_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 \"name\": \"<string>\",\n \"trace_ttl_days\": 123\n}"
response = http.request(request)
puts response.read_body{
"changed": [
"<string>"
],
"project": {
"id": "<string>",
"name": "<string>",
"workspace_id": "<string>"
},
"updated": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>"
}Edit a project
Edit a project’s name or trace retention.
Requires ADMIN role in the project’s workspace (the write service
decides). A null trace_ttl_days returns retention to the plan default.
Args:
request (Request): Incoming request (rate-limit plumbing).
response (Response): Outgoing response (rate-limit plumbing).
auth (AccountStampedAuth): Account-scope user auth (session token or
CLI access JWT); its resolved user_id becomes the actor.
project_id (str): The project to edit.
payload (UpdateProjectRequest): The fields to change.
_live (None): Write-path liveness gate (blocks a revoked JWT session).
Returns: UpdateProjectResponse: The updated project and the changed fields.
Raises: HTTPException: The write service’s 400/403/404/409 verbatim, or a 503 when its response is ambiguous.
curl --request PATCH \
--url https://app.traceroot.ai/api/v1/public/projects/{project_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"trace_ttl_days": 123
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/projects/{project_id}"
payload = {
"name": "<string>",
"trace_ttl_days": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', trace_ttl_days: 123})
};
fetch('https://app.traceroot.ai/api/v1/public/projects/{project_id}', 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://app.traceroot.ai/api/v1/public/projects/{project_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([
'name' => '<string>',
'trace_ttl_days' => 123
]),
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://app.traceroot.ai/api/v1/public/projects/{project_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"trace_ttl_days\": 123\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://app.traceroot.ai/api/v1/public/projects/{project_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"trace_ttl_days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/projects/{project_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 \"name\": \"<string>\",\n \"trace_ttl_days\": 123\n}"
response = http.request(request)
puts response.read_body{
"changed": [
"<string>"
],
"project": {
"id": "<string>",
"name": "<string>",
"workspace_id": "<string>"
},
"updated": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

