POST /api/sessions/{session_id}/title Bearer

Rename Session

Update the display title of an existing PocketPaw session. Useful for organizing conversations with descriptive names that appear in the sidebar session list.

Overview

Updates the display title of a session. By default, sessions are auto-titled based on the first message. Use this endpoint to set a custom title.

Parameters

Path Parameters

session_id required
string

The unique identifier of the session to rename.

Request Body

Body Parameters

title required
string

The new title for the session.

Response

status string

"ok" on successful update.

Terminal window
curl -X POST "http://localhost:8000/api/sessions/session_abc123/title" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"title": "Docker deployment guide"}'
const sessionId = "session_abc123";
const response = await fetch(`http://localhost:8000/api/sessions/${sessionId}/title`, {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({ title: "Docker deployment guide" })
});
const data = await response.json();
console.log(data);
import requests
session_id = "session_abc123"
response = requests.post(
f"http://localhost:8000/api/sessions/{session_id}/title",
headers={"Authorization": "Bearer <token>"},
json={"title": "Docker deployment guide"},
)
print(response.json())
{ "status": "ok" }
{ "detail": "Session not found" }
Request
curl -X POST "http://localhost:8000/api/sessions/{session_id}/title" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>"
const response = await fetch("http://localhost:8000/api/sessions/{session_id}/title", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
},
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    "http://localhost:8000/api/sessions/{session_id}/title",
    headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)

print(response.json())
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("POST", "http://localhost:8000/api/sessions/{session_id}/title", nil)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <token>")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Response
Send a request to see the response