Rename a session
Sets the session’s display name. Send name: null to clear it, so
the name is derived from the prompt again. Returns the updated
session.
Workspace scope is resolved from workspaceId in the JSON body, or
the workspace bound to the API key, so API-key callers may omit it.
curl --request PATCH \
--url https://api.lusor.ai/v1/sessions/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.lusor.ai/v1/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/sessions/{id}"
payload = {
"name": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"prompt": "<string>",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"deviceId": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app": "<string>",
"outputSchema": {},
"output": {},
"error": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"maxDurationSecs": 123,
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"promptExpiresAt": "2023-11-07T05:31:56Z",
"outputExpiresAt": "2023-11-07T05:31:56Z",
"nameExpiresAt": "2023-11-07T05:31:56Z",
"errorExpiresAt": "2023-11-07T05:31:56Z"
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Workspace API key, created in the dashboard under Settings → API Keys.
Path Parameters
Session ID.
Body
Response
Updated session
One run. Content is kept for the workspace's history window; each
*ExpiresAt field says when the matching field expires.
queued, running, executing, awaiting_human, complete, completed, failed, cancelled Structured output. Populated when status == completed. Shape
is caller-defined via outputSchema on session create.
Machine-readable failure code when status == failed. Known
code: secret_required:<name> - a run created with an API key
needed a credential or 2FA code (<name> is the agent's slug for
it, for example gmail_password) that it was not given. The run
ends immediately rather than waiting for a human. Save the secret
in the workspace, then retry the run naming it in secrets
(<item_slug>.<field>). Dashboard runs never
fail this way: they pause in awaiting_human and are answered in
the dashboard. Known code: credits_exhausted - the run's model
cost reached the workspace's credit balance at the time the run
started, so it stopped; upgrade the plan or buy a credit pack,
then continue the session.
Effective per-session duration cap in seconds as persisted by the API at session creation. Null means a historical row has no persisted cap; consumers must not infer the current default from null.
The agent that ran this turn; null for runs started without an agent.
Display name; null means derive it from the prompt.
Was this page helpful?
curl --request PATCH \
--url https://api.lusor.ai/v1/sessions/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.lusor.ai/v1/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/sessions/{id}"
payload = {
"name": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"prompt": "<string>",
"status": "queued",
"createdAt": "2023-11-07T05:31:56Z",
"deviceId": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app": "<string>",
"outputSchema": {},
"output": {},
"error": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"maxDurationSecs": 123,
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"promptExpiresAt": "2023-11-07T05:31:56Z",
"outputExpiresAt": "2023-11-07T05:31:56Z",
"nameExpiresAt": "2023-11-07T05:31:56Z",
"errorExpiresAt": "2023-11-07T05:31:56Z"
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
