Update Session
Rename a session.
session_title is denormalized onto every run in the session (the session
list reads the latest run), so a rename writes them all in one UPDATE. Null
clears the name and the UI falls back to the opening task — it does NOT
re-run title generation, which only fills rows where the title IS NULL and
so would silently overwrite the clear.
const options = {
method: 'PATCH',
headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>'})
};
fetch('https://api.browser-use.com/api/v4/sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.browser-use.com/api/v4/sessions/{session_id} \
--header 'Content-Type: application/json' \
--header 'X-Browser-Use-API-Key: <api-key>' \
--data '
{
"title": "<string>"
}
'import requests
url = "https://api.browser-use.com/api/v4/sessions/{session_id}"
payload = { "title": "<string>" }
headers = {
"X-Browser-Use-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latestRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task": "<string>",
"title": "<string>",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
Rename a session. Null clears the user-set name, so the UI falls back to the session's opening task.
255Response
Successful Response
Lightweight metadata for one V4 session (its most recent run).
Deliberately slim — just what a session list needs (open the conversation, show a label + status + time). The heavy per-run fields (result, error, token/cost totals) live on RunSummary and aren't repeated here.
queued, dispatching, running, completed, failed, cancelled Was this page helpful?
const options = {
method: 'PATCH',
headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: '<string>'})
};
fetch('https://api.browser-use.com/api/v4/sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.browser-use.com/api/v4/sessions/{session_id} \
--header 'Content-Type: application/json' \
--header 'X-Browser-Use-API-Key: <api-key>' \
--data '
{
"title": "<string>"
}
'import requests
url = "https://api.browser-use.com/api/v4/sessions/{session_id}"
payload = { "title": "<string>" }
headers = {
"X-Browser-Use-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latestRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task": "<string>",
"title": "<string>",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}