SessionDock Developer Docs
Authoritative guides, generated Local API reference, and practical patterns for local automation, scripts, launchers, and AI agents running alongside SessionDock.
/api/v1/sessions/{id}/focuscurl -X POST 'http://127.0.0.1:18432/api/v1/sessions/session_123/focus' \
-H 'Authorization: Bearer <token>'| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| id | path | string | Yes | Session identifier. | session_123 |
Focus acknowledgement
application/json
{
"data": {
"id": "<string>",
"opened": true,
"focused": true
}
}{
"data": {
"id": "<string>",
"opened": true,
"focused": true
}
}Focus action failed.
application/json
{
"error": {
"status": 0,
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"status": 400,
"code": "focus_failed",
"message": "main window unavailable"
}
}Missing or invalid bearer token.
application/json
{
"error": {
"status": 0,
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"status": 401,
"code": "unauthorized",
"message": "Provide Authorization: Bearer <token>."
}
}Write attempted while Local API is in read-only mode.
application/json
{
"error": {
"status": 0,
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"status": 403,
"code": "read_only",
"message": "Enable Full Automation to perform this action."
}
}No matching resource was found.
application/json
{
"error": {
"status": 0,
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"status": 404,
"code": "not_found",
"message": "session not found"
}
}Session focus is unavailable in the current runtime.
application/json
{
"error": {
"status": 0,
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"status": 501,
"code": "focus_unavailable",
"message": "Session focus is unavailable."
}
}