SynapSynapDocs
Hub REST API

Commands

The Commands operations of the Hub REST API (3 operations).

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)
GET
/commands

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Query Parameters

workspaceId?string

Response Body

Commands

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://pod.example.com/api/hub/commands'
Example Response
[  {    "id": "string",    "workspaceId": "string",    "name": "string",    "description": "string",    "triggerSlug": "string",    "skillId": "string",    "config": {      "property1": null,      "property2": null    },    "createdAt": "string",    "updatedAt": "string",    "property1": null,    "property2": null  }]

Get a single command

GET
/commands/{id}

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Path Parameters

id*string

Response Body

Command

application/json
  1. response
id*string
workspaceId?string|null
name*string
description?string|null
triggerSlug?string|null
skillId?string|null
config?
createdAt?string|
updatedAt?string|
[key: string]?unknown
Example Request
curl -X GET 'https://pod.example.com/api/hub/commands/string'
Example Response
{  "id": "string",  "workspaceId": "string",  "name": "string",  "description": "string",  "triggerSlug": "string",  "skillId": "string",  "config": {    "property1": null,    "property2": null  },  "createdAt": "string",  "updatedAt": "string",  "property1": null,  "property2": null}
POST
/commands/execute

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
command*string

Shell-compatible command line. Subject to BLOCKED_COMMAND_PATTERNS.

workingDir?string

Optional working directory. Path traversal and sensitive system dirs are rejected.

timeoutMs?number

Defaults to 30s. Hard-capped at 5 minutes.

userId?string
workspaceId?string

Workspace context. When set, rate-limit (10/min) applies and an event is emitted on completion.

agentUserId?string
sourceMessageId?string
reason?string

Human-readable reason — included in proposal payload when one is created.

Response Body

Execution result, proposal, or denial

application/json
  1. response
status*string
Value in"executed""proposed""denied"
stdout?string
stderr?string
exitCode?number
proposalId?string
summary?string
reasoning?string
reviewPath?string
reviewUrl?string
message?string
Example Request
curl -X POST 'https://pod.example.com/api/hub/commands/execute' \  -H 'Content-Type: application/json' \  -d '{  "command": "string"}'
Example Response
{  "status": "executed",  "stdout": "string",  "stderr": "string",  "exitCode": 0,  "proposalId": "string",  "summary": "string",  "reasoning": "string",  "reviewPath": "string",  "reviewUrl": "string",  "message": "string"}