Skip to Content
API referenceGateways API

Gateways API

This page is for developers who want to manage gateways from their own code. A gateway is a published set of tools with its own address and keys, which AI assistants and coding tools connect to. For example, a setup script can create a gateway for a new team and hand them its key. In the app, gateways live under Gateways; see Gateways.

Gateway detail in the UI

REST API reference for managing gateways, tool assignments, and authentication.

Endpoints

MethodEndpointDescription
GET/gatewaysList gateways. ?kind=tool returns the MCP, UTCP and Skills gateways, which is what the Gateways page lists; ?kind=agent returns the ones an agent’s channels stood up
POST/gatewaysCreate a gateway
GET/gateways/:idGet gateway by ID
PATCH/gateways/:idUpdate a gateway
DELETE/gateways/:idDelete a gateway
POST/gateways/:id/toolsAssign a tool
POST/gateways/:id/tools/bulkBulk assign tools
DELETE/gateways/:id/tools/:toolIdRemove a tool
GET/gateways/:id/tools/availableList available tools
POST/gateways/:id/authAdd auth method
GET/gateways/:id/authList auth methods
DELETE/gateways/:id/auth/:authIdRemove auth method
POST/gateways/:id/auth/api-keysGenerate API key
GET/gateways/:id/auth/api-keysList API keys
DELETE/gateways/:id/auth/api-keys/:keyIdRevoke API key

Create a gateway

curl -X POST https://api.almyty.com/gateways \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Production MCP", "type": "mcp", "endpoint": "/prod-tools", "description": "Production tool gateway", "configuration": { "transport": "http" } }'

Parameters

ParameterTypeRequiredDescription
namestringYesGateway name
typestringYesmcp, utcp or skills: the one protocol the gateway serves. A web chat, website widget, messaging channel or A2A endpoint is a channel of an agent, and is refused here (CHANNEL_GATEWAY_NEEDS_AGENT)
endpointstringYesURL path (unique within org)
descriptionstringNoDescription
configurationobjectYesType-specific config; {} takes the defaults. MCP: { "transport": "http" } (http, sse or websocket)

Response

{ "success": true, "data": { "id": "gw-uuid", "name": "Production MCP", "type": "mcp", "endpoint": "/prod-tools", "status": "active", "toolCount": 0, "createdAt": "2026-03-01T10:00:00Z" } }

Bulk assign tools

curl -X POST https://api.almyty.com/gateways/{id}/tools/bulk \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "toolIds": ["tool-1", "tool-2", "tool-3"] }'

Add authentication

curl -X POST https://api.almyty.com/gateways/{id}/auth \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "type": "api_key", "isRequired": true, "configuration": { "keyHeader": "X-API-Key" } }'

Auth types: none, api_key, bearer_token, basic_auth, jwt, oauth2.

See Gateway Authentication for detailed docs on each type.

Generate API key

curl -X POST https://api.almyty.com/gateways/{id}/auth/api-keys \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Production Key", "scopes": ["tools:read", "tools:execute"], "expiresAt": "2027-01-01T00:00:00Z" }'

Response (key shown once):

{ "success": true, "data": { "id": "key-uuid", "name": "Production Key", "key": "almyty_gw_...", "scopes": ["tools:read", "tools:execute"], "expiresAt": "2027-01-01T00:00:00Z" } }

Gateway endpoint URLs

After creation, the gateway is accessible at:

TypeURL
MCPhttps://api.almyty.com/{org-slug}{endpoint}
UTCPhttps://api.almyty.com/{org-slug}{endpoint}
SkillsVia npx @almyty/skills install @{org-slug}{endpoint}

An agent’s A2A channel answers at the same shape of URL, on the gateway its channel publishes.