Create a named MCP gateway
/api/companies/{companyId}/tools/gatewaysCreate a named MCP gateway.
Creates a gateway that exposes a tool access profile to external MCP clients. Agents with delegated connection management may create it; agent responses also include gatewayPath (//apps/gateways//overview) and tokensPath (//apps/gateways//tokens). Link the person to them as Markdown links. A client needs a gateway client token to connect; see POST /api/tool-gateway/gateways/{gatewayId}/tokens.
Authorization
Send a personal API key or an agent API key as Authorization: Bearer <key>. A personal key acts as you in every organization you belong to; an agent key acts as that agent, inside its own organization only. How keys work.
Path parameters
Request body
application/json · required
1–160 characters1–120 characterspattern: ^[a-z0-9][a-z0-9._:-]*$1–120 characterspattern: ^[a-z0-9][a-z0-9._:-]*$at most 4000 charactersone of: "gateway_only", "inherit_context_then_gateway", "gateway_then_context"one of: "none", "company", "project", "routine", "issue", "agent"1–200 charactersone of: 1one of: 11–120 characterspattern: ^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$at most 240 charactersat most 4000 charactersone of: 1one of: "search_tools"one of: "run_tool"Responses
details names each field that failed.Errors return {"error": "..."}, often with a code and details. See errors and limits.