# Mobile · Sessions

Session endpoints shaped for the mobile app: list and create, send a message, stream updates, answer permissions and questions, read diffs and todos, and teleport a session between hosts.

Playground

Send these requests to your own running server. Values stay in this browser.

Not connected

Base URL  Directory _optional_  Bearer token _optional_ 

 

How this works

Start a server with `nikcli serve --hostname 127.0.0.1 --port 4096`. Requests go straight from this page to that address — the browser allows it because loopback counts as a secure origin, and the server allows it because `nikcli-ai.dev` is in its CORS allowlist.

To try things without touching your real sessions or config, start the server with `NIKCLI_TEST_HOME` pointed at a throwaway directory — see [the guided tour](/docs/guides/api-tour).

## Operations

21 endpoints, generated from the server's own [OpenAPI document](/docs/api). Every path also accepts the `directory` and `workspace` query parameters that select which instance handles the request.

<table class="api-index not-prose"><tbody><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-session">/mobile/session</a></td><td class="api-index-id">mobile.session.list</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session">/mobile/session</a></td><td class="api-index-id">mobile.session.create</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-session-sessionID">/mobile/session/{sessionID}</a></td><td class="api-index-id">mobile.session.detail</td></tr><tr><td class="api-index-method"><span class="api-method api-method-delete">delete</span></td><td><a href="#op-delete-mobile-session-sessionID">/mobile/session/{sessionID}</a></td><td class="api-index-id">mobile.session.delete</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-session-sessionID-diff-messageID">/mobile/session/{sessionID}/diff/{messageID}</a></td><td class="api-index-id">mobile.session.diff</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-session-sessionID-command">/mobile/session/{sessionID}/command</a></td><td class="api-index-id">mobile.session.command.list</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-command">/mobile/session/{sessionID}/command</a></td><td class="api-index-id">mobile.session.command</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-message">/mobile/session/{sessionID}/message</a></td><td class="api-index-id">mobile.session.message</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-abort">/mobile/session/{sessionID}/abort</a></td><td class="api-index-id">mobile.session.abort</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-permissions-permissionID">/mobile/session/{sessionID}/permissions/{permissionID}</a></td><td class="api-index-id">mobile.permission.respond</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-question-requestID">/mobile/session/{sessionID}/question/{requestID}</a></td><td class="api-index-id">mobile.question.respond</td></tr><tr><td class="api-index-method"><span class="api-method api-method-delete">delete</span></td><td><a href="#op-delete-mobile-session-sessionID-question-requestID">/mobile/session/{sessionID}/question/{requestID}</a></td><td class="api-index-id">mobile.question.reject</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-publish">/mobile/session/{sessionID}/publish</a></td><td class="api-index-id">mobile.github.session.publish</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-cleanup">/mobile/session/{sessionID}/cleanup</a></td><td class="api-index-id">mobile.github.session.cleanup</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-session-sessionID-stream">/mobile/session/{sessionID}/stream</a></td><td class="api-index-id">mobile.session.stream</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-rename">/mobile/session/{sessionID}/rename</a></td><td class="api-index-id">mobile.session.rename</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-session-sessionID-todo">/mobile/session/{sessionID}/todo</a></td><td class="api-index-id">mobile.session.todo</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-teleport-upload">/mobile/teleport/upload</a></td><td class="api-index-id">mobile.session.teleport.upload.begin</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-teleport-upload-uploadID">/mobile/teleport/upload/{uploadID}</a></td><td class="api-index-id">mobile.session.teleport.upload.chunk</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-teleport">/mobile/teleport</a></td><td class="api-index-id">mobile.session.teleport</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-session-sessionID-teleport">/mobile/session/{sessionID}/teleport</a></td><td class="api-index-id">mobile.session.teleport.out</td></tr></tbody></table>

### Session

get /mobile/session [#](#op-get-mobile-session) `mobile.session.list`

Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| limit | query | string | null | optional |
| search | query | string | null | optional |
| directory | query | string | optional |
| workspace | query | string | optional |

Responses

200 Success application/json

({
  info: [Session\_1](#schema-Session_1)
  status?: [SessionStatus](#schema-SessionStatus) | null
})\[\]

Example response from schema

\[
  {
    "info": {
      "id": "",
      "slug": "",
      "projectID": "",
      "directory": "",
      "parentID": "",
      "workspaceID": "",
      "summary": {
        "additions": null,
        "deletions": null,
        "files": null,
        "diffs": null
      },
      "share": {
        "url": null
      },
      "github": {
        "owner": null,
        "repo": null,
        "fullName": null,
        "baseBranch": null,
        "headBranch": null,
        "repositoryDirectory": null,
        "cloneUrl": null,
        "htmlUrl": null,
        "private": null,
        "worktree": null,
        "pullRequest": null,
        "lastCommitSha": null,
        "publishedAt": null,
        "publishError": null
      },
      "worktree": {
        "name": null,
        "branch": null,
        "directory": null,
        "repositoryDirectory": null,
        "cleanedAt": null
      },
      "mobile": {
        "platforms": null,
        "primaryPlatform": null,
        "method": null,
        "detectedAt": null,
        "buildStatus": null,
        "lastBuildAt": null,
        "artifacts": null
      },
      "title": "",
      "activeCommand": "",
      "version": "",
      "time": {
        "created": null,
        "updated": null,
        "compacting": null,
        "archived": null
      },
      "permission": \[\],
      "skills": \[\],
      "disabledInstructions": \[\],
      "disabledTools": {},
      "revert": {
        "messageID": null,
        "partID": null,
        "snapshot": null,
        "diff": null
      },
      "lastModel": {
        "providerID": null,
        "modelID": null
      }
    },
    "status": {
      "type": "idle"
    }
  }
\]

Generated from the response schema — field values are placeholders, the shape is real.

SDK example

mobile.session.list

ts 

1

2

3

4

5

6

```
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.session.list({
  ...
})
```

Try it

limit _query_  search _query_  directory _query_  workspace _query_

---

Source: https://nikcli-ai.dev/docs/api/mobile-session
