SessionDock Developer Docs

Make your creative workflow programmable.

Authoritative guides, generated Local API reference, and practical patterns for local automation, scripts, launchers, and AI agents running alongside SessionDock.

Bring SessionDock forward and focus a session card

POST/api/v1/sessions/{id}/focus
curl -X POST 'http://127.0.0.1:18432/api/v1/sessions/session_123/focus' \
  -H 'Authorization: Bearer <token>'

Parameters

NameInTypeRequiredDescriptionExample
idpathstringYesSession identifier.session_123

Responses

200

Focus acknowledgement

application/json

Schema Shape

{
  "data": {
    "id": "<string>",
    "opened": true,
    "focused": true
  }
}

Example

{
  "data": {
    "id": "<string>",
    "opened": true,
    "focused": true
  }
}
400

Focus action failed.

application/json

Schema Shape

{
  "error": {
    "status": 0,
    "code": "<string>",
    "message": "<string>"
  }
}

Example

{
  "error": {
    "status": 400,
    "code": "focus_failed",
    "message": "main window unavailable"
  }
}
401

Missing or invalid bearer token.

application/json

Schema Shape

{
  "error": {
    "status": 0,
    "code": "<string>",
    "message": "<string>"
  }
}

Example

{
  "error": {
    "status": 401,
    "code": "unauthorized",
    "message": "Provide Authorization: Bearer <token>."
  }
}
403

Write attempted while Local API is in read-only mode.

application/json

Schema Shape

{
  "error": {
    "status": 0,
    "code": "<string>",
    "message": "<string>"
  }
}

Example

{
  "error": {
    "status": 403,
    "code": "read_only",
    "message": "Enable Full Automation to perform this action."
  }
}
404

No matching resource was found.

application/json

Schema Shape

{
  "error": {
    "status": 0,
    "code": "<string>",
    "message": "<string>"
  }
}

Example

{
  "error": {
    "status": 404,
    "code": "not_found",
    "message": "session not found"
  }
}
501

Session focus is unavailable in the current runtime.

application/json

Schema Shape

{
  "error": {
    "status": 0,
    "code": "<string>",
    "message": "<string>"
  }
}

Example

{
  "error": {
    "status": 501,
    "code": "focus_unavailable",
    "message": "Session focus is unavailable."
  }
}