List the composer's commands

The skills a conversation can pin and the agents the caller can launch, read as an MCP client reads the platform server (skills/list, prompts/list) with the caller's own permissions: in every space the caller can act in, or, with ?spaceId=, in that space alone (a conversation limited to it). With skills:write, a skill is listed at the caller's draft when there is one (the definition a turn injects); without it, at its published version, and a skill with no published version is not listed. An agent is launched by a user message carrying a data-agent-prompt part (see streamChat). A failed read is named in unavailable alongside the successful lists; a server that cannot be reached is a 502. Rate limited (60/min per caller). Ignores X-Space-Id; admitted when the acting set is not empty. A credential confined to spaces is refused (403).

GET/api/orgs/{orgId}/chat/commands

Authorization

better-auth.session_token<token>

Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.

In: cookie

Path Parameters

orgId*string

Organization ID.

Query Parameters

spaceId?string

Read the commands in this space alone; it must be a space the caller can act in (else a 400 naming spaceId).

curl -X GET "https://your-instance/api/orgs/string/chat/commands"
{
  "unavailable": [
    "published_skills"
  ],
  "skills": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "version": "string",
      "bytes": 0
    }
  ],
  "agents": [
    {
      "name": "string",
      "title": "string",
      "description": "string",
      "packageId": "string",
      "spaceId": "string",
      "icon": "string",
      "color": "string",
      "integrations": [
        {
          "id": "string",
          "name": "string",
          "icon": "string"
        }
      ]
    }
  ]
}

{
  "type": "https://docs.appstrate.dev/errors/validation-failed",
  "title": "Validation Failed",
  "status": 400,
  "detail": "name: Invalid input: expected string, received undefined (+2 more)",
  "code": "validation_failed",
  "request_id": "req_abc123",
  "errors": [
    {
      "field": "name",
      "code": "required",
      "message": "Invalid input: expected string, received undefined"
    },
    {
      "field": "email",
      "code": "invalid_format",
      "message": "Invalid email address"
    },
    {
      "field": "age",
      "code": "invalid_type",
      "message": "Invalid input: expected number, received string"
    }
  ]
}

{
  "type": "https://docs.appstrate.dev/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "Insufficient permissions",
  "code": "forbidden",
  "request_id": "req_abc123"
}
{
  "type": "https://docs.appstrate.dev/errors/rate-limited",
  "title": "Rate Limited",
  "status": 429,
  "detail": "Too many requests. Please try again shortly.",
  "code": "rate_limited",
  "request_id": "req_abc123",
  "retry_after": 30
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "code": "string",
  "request_id": "string",
  "param": "string",
  "retry_after": 0,
  "login_refusal": "grant",
  "integration_diagnostic": "string",
  "errors": [
    {
      "field": "string",
      "code": "string",
      "message": "string",
      "title": "string",
      "line": 1,
      "column": 1,
      "candidate_connections": [
        {
          "id": "string",
          "label": "string",
          "account_id": "string",
          "owned_by_actor": true,
          "needs_reconnection": true,
          "scopes_granted": [
            "string"
          ],
          "missing_scopes": [
            "string"
          ]
        }
      ],
      "connection_id": "string",
      "missing_scopes": [
        "string"
      ],
      "remedy": "new_connection",
      "owned_by_actor": true,
      "required_scopes": [
        "string"
      ],
      "auth_key": "string",
      "required_auth_key": "string",
      "available_auth_keys": [
        "string"
      ],
      "source": "admin_pin",
      "connect_url": "http://example.com",
      "expiresAt": "2019-08-24T14:15:22Z",
      "packageId": "string"
    }
  ]
}