API endpoints
ZestSSH’s automation API has six actions. Four of them (execute, snippet, batch, workflow) can be sent as a zestssh:// link on every platform or as an Android intent. Two (connect, open) are Android intents only.
Every link that runs something asks Run this from a link? first and runs only when you tap Run. An Android intent runs without asking. See Automation API overview for the checks every request goes through.
Link limits
Section titled “Link limits”- A link longer than 2,048 characters is refused (a shared host’s link may be longer, see Other links).
- A link with any value longer than 256 characters is refused, so a long command belongs in a snippet.
- A host name with a control character in it is refused.
- A link that is missing a required value, or whose question you cancel, runs nothing.
For intents, use Package com.affluentlabs.zestssh and Target Activity. A value Tasker sends as a number or as true or false is read the same as text.
execute: run a command
Section titled “execute: run a command”Signs in to one saved host, runs one command, collects its output, and disconnects.
zestssh://execute?connection=web-01&command=uptime&key=API_KEY| Parameter | Required | Default | Description |
|---|---|---|---|
connection |
Yes | The host’s ID, or its name in any letter case (connection_id and host are read too) |
|
command |
Yes | The shell command | |
key |
Yes | Your API key | |
timeout |
No | 30 | Seconds, from 1 to 300 |
grep |
No | Keep only lines that match this pattern | |
head |
No | Keep only the first N lines (after grep) |
|
tail |
No | Keep only the last N lines (after head) |
A callback in a link is ignored: a link must not choose where your output goes.
Android intent
Section titled “Android intent”- Action:
com.affluentlabs.zestssh.EXECUTE - Extras:
key,connection_id(orconnection_label),command, and optionallytimeout,grep,head,tail,callback
Result
Section titled “Result”stdout is the output after any filters, or the error when there is no output. exit_code is the command’s own exit code (or 1 when it did not run).
snippet: run a saved snippet
Section titled “snippet: run a saved snippet”Runs a saved snippet, found by its name in any letter case, on one host.
zestssh://snippet?connection=web-01&name=Restart%20nginx&key=API_KEY| Parameter | Required | Description |
|---|---|---|
connection |
Yes | The host’s ID or name (connection_id and host are read too) |
name |
Yes | The snippet’s name (snippet_name is read too) |
key |
Yes | Your API key |
var_NAME |
No | A value for {{NAME}} or ${NAME} in the snippet’s command |
Android intent
Section titled “Android intent”- Action:
com.affluentlabs.zestssh.SNIPPET - Extras:
key,connection_id(orconnection_label),snippet_name, and onevar_NAMEextra per value
Variables
Section titled “Variables”Each var_NAME value replaces {{NAME}} or ${NAME} in the snippet’s command (${NAME:-default} and ${NAME:secret} too). NAME is letters, digits and underscores. Each value is shell-escaped for the place it lands in, inside any quotes the snippet has around it, and the command is filled in one pass, so a value can never add another placeholder. A variable with a default that gets no value takes its default, at every place it stands. A plain ${NAME} with no value is left as it is, for the remote shell. The question a link asks shows the command with the values in it.
zestssh://snippet?connection=staging-01&name=deploy-branch&var_branch=main&key=API_KEYWith the snippet command git checkout {{branch}}, this runs git checkout 'main'.
Automation fills only {{NAME}} placeholders. A snippet’s own variables, written ${NAME} in the snippet editor, are not filled by automation.
- A snippet run has a timeout of 30 seconds, and takes no
timeout,grep,head,tailorcallback. stdoutis the output, or the error when there is none.exit_codeis the command’s own.
batch: run on several hosts
Section titled “batch: run on several hosts”Runs one command on several saved hosts.
zestssh://batch?connections=web-01,web-02,db-01&command=uptime&key=API_KEY| Parameter | Required | Default | Description |
|---|---|---|---|
connections |
Yes | Host IDs or names, separated by commas | |
command |
Yes | The shell command | |
key |
Yes | Your API key | |
timeout |
No | 30 | Seconds per host, from 1 to 300 |
parallel |
No | true |
false runs the hosts one after another, in the order given |
grep |
No | Applied to each host’s output | |
head |
No | First N lines per host | |
tail |
No | Last N lines per host |
The question a link asks names every host.
Android intent
Section titled “Android intent”- Action:
com.affluentlabs.zestssh.BATCH - Extras:
key,connections(orconnection_ids),command, and optionallytimeout,parallel,grep,head,tail,callback
Limits
Section titled “Limits”- With
parallelon, at most 4 hosts run at once. - A batch takes at most 25 hosts; the rest are left out.
Result
Section titled “Result”One section per host, headed by the name or ID you gave:
=== web-01 (exit=0) ===output from web-01=== web-02 (exit=0) ===output from web-02=== db-01 (exit=1) ===STDERR: error messageexit_code is 0 only when every host succeeded, and 1 otherwise. The history has one entry per host.
workflow: run a saved workflow
Section titled “workflow: run a saved workflow”Runs a saved workflow, found by its ID or by its name in any letter case. See Workflows.
zestssh://workflow?name=Deploy%20staging&key=API_KEYOr by ID:
zestssh://workflow?id=WORKFLOW_ID&key=API_KEY| Parameter | Required | Description |
|---|---|---|
name |
One of the two | The workflow’s name |
id |
One of the two | The workflow’s ID |
key |
Yes | Your API key |
On a computer, the Deep links section of Automation > API keys lists a link for each workflow, with YOUR_KEY in place of the key, and a copy button (Copy URL). Put your key in place of YOUR_KEY: the key you copied when you made it, since ZestSSH shows a key only once.
Android intent
Section titled “Android intent”- Action:
com.affluentlabs.zestssh.WORKFLOW - Extras:
key, andworkflow_nameorworkflow_id
- A key limited to one host cannot run a workflow.
- A workflow set to Manually on a computer, or switched off in a phone’s workflow list, is not started: the result is
ERROR: Workflow "Deploy staging" is turned off in ZestSSH. - A step whose snippet was deleted or renamed stops the workflow there.
- A workflow has no webhook: a workflow’s own Notify steps, and its notify on success or failure, are how it reports.
Result
Section titled “Result”Workflow "Deploy staging" completed: 3/3 steps OK (1520ms), or Workflow "Deploy staging" failed: with the reason and the count of steps that passed. exit_code is 0 or 1.
connect: check a host (Android intent)
Section titled “connect: check a host (Android intent)”Signs in to a host, runs echo "ZestSSH: connected successfully", and disconnects, with a timeout of 15 seconds.
- Action:
com.affluentlabs.zestssh.CONNECT - Extras:
key,connection_id(orconnection_label)
Result: Connected to web-01 successfully, or Connection failed: and the reason. exit_code is 0 or 1.
There is no link form. From a link, execute with a command such as echo ok does the same.
open: open a lasting session (Android intent)
Section titled “open: open a lasting session (Android intent)”Opens a session to the host as a normal tab, so its port forwards set to start with the connection come up, and keeps it open.
- Action:
com.affluentlabs.zestssh.OPEN - Extras:
key,connection_id(orconnection_label), and optionallytimeout(seconds to wait for the session to connect, default 30, from 1 to 300)
Result: Opened session ... for web-01 - auto-start tunnels are coming up, or Open failed: and the reason. exit_code is 0 or 1.
The session counts toward the free plan’s session limit. When the limit is reached, the result is ERROR: Session limit reached. Close an existing session or upgrade.
Webhook callback
Section titled “Webhook callback”An execute or batch Android intent can carry a callback extra with an HTTPS address. When the command ends, ZestSSH sends a POST with this JSON body:
{ "connection": "web-01", "command": "uptime", "stdout": "14:23:01 up 42 days...", "stderr": "", "exit_code": 0, "elapsed_ms": 1523, "timestamp": "2026-01-15T14:23:02.000Z"}For a batch, one POST is sent with the combined output, and connection lists the hosts separated by commas.
- Only
https://addresses are used. localhost, and a loopback, private or link-local IP address, are refused.- Redirects are not followed.
- The POST is sent once and not retried. It does not hold up the run, and a failure does not change its result.
- Content-Type is
application/json.
A callback on a link is ignored. Snippets and workflows send no webhook.
Errors
Section titled “Errors”What an Android app that asked for a result gets in stdout, always with exit_code 1:
| Condition | stdout |
|---|---|
| No Squeezed | ERROR: ZestSSH Squeezed required for automation. |
| Automation off | ERROR: Automation is disabled in ZestSSH settings. |
| No key, or not a key of this device, or expired | ERROR: Invalid or missing automation API key. |
| A key limited to one host, used on another | ERROR: This API key is restricted to a single connection and cannot act on a different host. |
| A key limited to one host, used for a workflow | ERROR: This API key is restricted to a single connection and cannot run workflows. |
| No host given | ERROR: No connection ID or label specified. |
| No command given | ERROR: No command specified. |
| No snippet name given | ERROR: No snippet name specified. |
| No hosts given for a batch | ERROR: No connections specified for batch execution. |
| No workflow name or ID | ERROR: No workflow name or ID specified. |
| Host not found | Connection not found: web-01 |
| Snippet not found | The snippet "deploy" is not in your snippets any more (deleted or renamed), so nothing ran. Choose another snippet for this step. |
| Workflow not found | ERROR: Workflow not found: Deploy staging |
| Workflow turned off | ERROR: Workflow "Deploy staging" is turned off in ZestSSH. |
open with a key not allowed for unattended runs |
ERROR: Unattended runs are not enabled for the credential "deploy-key". Enable it in Keys → the credential → Allow unattended runs. |
| A host key this device does not trust yet | This device does not know the host's key yet, and a new key is not accepted when nobody is there to check it. Connect to the host in the app once and accept its key; after that this will run. |
| A changed host key | The host's key is not the one this device knows, so it was not signed in to and nothing was run. Connect to the host in the app to see what changed. |
| Time ran out before the command started | For example The sign-in had not finished when the time allowed was up (30s). |
A connection or sign-in failure gives the same words a session that failed the same way would show. A run that would need a key not allowed for unattended runs, a code, or a password that is not saved stops and is refused.
Other links
Section titled “Other links”These zestssh:// links run nothing and take no API key.
Open a saved host
Section titled “Open a saved host”zestssh://connect?name=web-01zestssh://connect?id=HOST_IDZestSSH asks Connect to web-01? (“A widget, a shortcut or a link asked to open a session to … with its saved sign-in. Connect only if you asked for it.”) and opens a session when you tap Connect. The host is looked for in your personal space. If no host has the name, ZestSSH says “No host named web-01 is saved in your personal space.” If two have it, it asks you to open the host from the app.
Quick connect
Section titled “Quick connect”zestssh://connect?host=192.168.10.5&user=alex&port=22Opens Quick connect with alex@192.168.10.5:22 typed in, for you to connect or not. Nothing connects by itself. A link that names no host Quick connect can read says “This link names no host to connect to.”
| Link | Opens |
|---|---|
zestssh://settings |
Settings (on a computer, the Settings pop-up) |
zestssh://snippets |
Snippets |
zestssh://identities |
Keys |
zestssh://profile |
Your account (on a computer, Settings > Account) |
zestssh://connection/new |
A new host’s editor |
zestssh://connection/edit/HOST_ID |
That host’s editor |
zestssh://import/ssh-config |
The SSH config import |
zestssh://upgrade |
The upgrade page |
zestssh://join?code=CODE (or zestssh://join#CODE) |
Join a team, with the invite code typed in. Nothing is sent until you go on. See Join a team by code |
Shared hosts
Section titled “Shared hosts”zestssh://add-host?host=...&port=...&user=...&label=... and zestssh://share?d=... (the form a host’s QR code uses) show the host and add it to your personal space only when you say yes. Its port forwards never start by themselves. A shared link that carries a password, a key, a token or a secret is refused.