Portless®← Home

Reference

REST API

Every /api/v1 endpoint with request and response shapes.

All endpoints live under https://www.initpbj.dev/api/v1, take and return JSON, need an API key, and are never cached. Errors use one shape, described in Errors.

EndpointPurpose
GET /api/v1/meWorkspace and key for this request
GET /api/v1/serversList upstream servers
POST /api/v1/servers/:id/syncImport a server's current tools
GET /api/v1/toolsList tools
POST /api/v1/tools/callCall a tool
POST /api/v1/mcpMCP endpoint

Get the current key

GET/api/v1/me
Response · 200
{
  "workspace": "Personal",
  "key": {
    "id": "6f1c…",
    "name": "CI"
  },
  "agentId": null
}

agentId is set when the request names a known agent with X-Portless-Agent.

List servers

GET/api/v1/servers
curl
curl https://www.initpbj.dev/api/v1/servers -H "Authorization: Bearer $PORTLESS_API_KEY"
Response · 200
{
  "servers": [
    {
      "id": "c26b0e45-…",
      "name": "GitHub",
      "namespace": "github",
      "transport": "http",
      "endpoint": "https://api.githubcopilot.com/mcp/",
      "status": "healthy",
      "credentialHeaders": [
        "Authorization"
      ],
      "createdAt": "2026-12-03T15:01:04.919Z"
    }
  ]
}
FieldNotes
transporthttp (Streamable HTTP), sse, or stdio
statushealthy, degraded or offline, updated from real calls
credentialHeadersNames of saved credential headers. Values are never returned.

Sync a server's tools

POST/api/v1/servers/:id/sync

Asks the server for its tool list. New tools are added and turned on; existing tools get fresh descriptions. Tools you turned off stay off. Tools the server no longer lists are reported in missing and kept.

curl
curl -X POST https://www.initpbj.dev/api/v1/servers/<id>/sync -H "Authorization: Bearer $PORTLESS_API_KEY"
Response · 200
{
  "server": "github",
  "added": [
    "github.list_branches"
  ],
  "updated": [
    "github.get_issue",
    "github.create_issue"
  ],
  "missing": []
}

List tools

GET/api/v1/tools?enabled=true

Leave out enabled=true to include tools that are turned off.

Response · 200
{
  "tools": [
    {
      "id": "9a3e…",
      "name": "create_issue",
      "description": "Open a new issue",
      "enabled": true,
      "tool": "github.create_issue",
      "server": {
        "id": "c26b…",
        "namespace": "github",
        "name": "GitHub",
        "transport": "http",
        "status": "healthy"
      }
    }
  ]
}

Call a tool

POST/api/v1/tools/call

Body

FieldTypeNotes
toolstringRequired. namespace.tool, or the MCP form namespace__tool.
argumentsobjectOptional. The tool's input; must be a JSON object.
agentstringOptional. Agent name or id; overrides X-Portless-Agent.
curl
curl https://www.initpbj.dev/api/v1/tools/call -H "Authorization: Bearer $PORTLESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tool": "github.get_issue", "arguments": {"repo": "acme/app", "number": 42}, "agent": "Triage bot"}'
Response · 200
{
  "tool": "github.get_issue",
  "latencyMs": 412,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "#42 Login fails on Safari…"
      }
    ]
  }
}

result is the MCP CallToolResult exactly as the server returned it: content blocks (text, images, resources), and optionally structuredContent.

Tool failed? Still 200.

When the tool ran but reported a failure, the response is 200 with result.isError: true, and the call is logged as an error. Always check it. HTTP errors mean the gateway couldn't run the tool at all.
Status · Building

Coming soon

We're putting the finishing touches on Portless®. Follow along on X to hear the moment it's ready.