Skip to content

Send input

POST
/api/panes/{pane_id}/input
Code sample: Shell / cURL
curl --request POST \
--url http://127.0.0.1:8004/api/panes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/input \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "text": "example", "keys": [ "example" ], "cols": 1, "rows": 1 }'

Sends text verbatim, then tmux-style keys, starting the pane’s shell if no client has yet.

pane_id
required
string format: uuid

Pane ID

Media typeapplication/json
object
text

Sent verbatim, before keys.

string
keys

Tmux-style key names, e.g. ["Enter"] or ["C-c"].

Array<string>
cols

Only used if the PTY hasn’t been spawned yet (no browser has attached to this pane). Ignored once a shell is already running.

integer | null format: int32
<= 65535
rows
integer | null format: int32
<= 65535

Example generated

{
"text": "example",
"keys": [
"example"
],
"cols": 1,
"rows": 1
}

Sent

Media typeapplication/json
object
newly_spawned
required

True if this call caused the shell to spawn. Callers polling /output afterward should expect a short delay before the shell prints its first prompt.

boolean

Example generated

{
"newly_spawned": true
}

An unknown key name, no text or keys, or more than 64 KiB; or a malformed ID or 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)

No such pane

Media typetext/plain
string

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

The shell failed to start, or the pane closed

Media typetext/plain
string