Skip to content

Open a popup

POST
/api/panes/{pane_id}/popup
Code sample: Shell / cURL
curl --request POST \
--url http://127.0.0.1:8004/api/panes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/popup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "command": { "exec": [ "example" ] }, "cwd": "example", "env": [ [ "NAME", "value" ] ], "title": "example" }'

Runs a program in a popup over the pane. Replies once a client started it; then wait for its exit status.

pane_id
required
string format: uuid

Pane ID

Media typeapplication/json
object
id

Chosen by the caller, so a request retried across an upgrade finds its popup rather than running the program again.

string | null format: uuid
command
required
One of:

A program and its arguments.

object
exec
required

A program and its arguments.

Array<string>
cwd
string | null
env

Replaces the server’s environment.

Array<array> | null
title
string | null

Started in a client

Media typeapplication/json
object
id
required
string format: uuid

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

An empty command, a cwd that isn’t a directory, or an id already in use; 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

No client is showing the pane

Media typetext/plain
string

The popup closed before it started

Media typetext/plain
string

A body over the size limit

Media typetext/plain
string

No Content-Type: application/json

Media typetext/plain
string

The program can’t start; or a body that doesn’t match its schema

Media typetext/plain
string

The pane already has a popup open

Media typetext/plain
string