Create a session
POST
/api/sessions
Code sample: Shell / cURL
curl --request POST \ --url http://127.0.0.1:8004/api/sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "cwd": "example", "window_name": "example", "runtime": { "type": "local" } }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “Responses”The new session and its first pane
Media typeapplication/json
object
id
required
string format: uuid
name
required
string
pane_id
required
string format: uuid
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "pane_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Invalid runtime; or a malformed JSON body
Media typetext/plain
string
Missing or wrong access token
Media typetext/plain
string
The request’s Host or Origin isn’t allowed, or the caller can’t use this route (a guest token, or btmux connect)
A body over the size limit
Media typetext/plain
string
No Content-Type: application/json
Media typetext/plain
string
A body that doesn’t match its schema
Media typetext/plain
string