For Agents
Send messages to and disconnect specific WebSocket clients connected to an API Gateway WebSocket API, plus fetch connection metadata, via three @connections operations.
Get started with AmazonApiGatewayManagementApi in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"post a message to a websocket connection"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with AmazonApiGatewayManagementApi API.
Send a server-initiated message to a specific WebSocket connection by connection id
Inspect the source ip, identity, and last active timestamp for a connected WebSocket client
Force-disconnect a specific WebSocket client from a deployed API
Drive fan-out patterns by iterating over stored connection ids and posting to each one
GET STARTED
Use for: I want to send a message to a specific WebSocket connection, Get the metadata for a connected WebSocket client, Disconnect a misbehaving WebSocket client, Push a real-time event to a single user via WebSocket
Not supported: Does not handle creating or deploying WebSocket APIs, defining routes, or configuring authorisers — use for sending messages to and managing live WebSocket connections only.
Jentic publishes the only available OpenAPI specification for AmazonApiGatewayManagementApi, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for the API Gateway Management API, keeping it validated and agent-ready. The Amazon API Gateway Management API is the runtime companion to API Gateway WebSocket APIs. It exposes three operations on the @connections resource that let backends send messages to a connected WebSocket client, inspect connection metadata, and force a disconnect. Real-time chat services, live dashboards, and collaborative apps use it to push server-initiated messages to clients without client polling.
Pair with Lambda backends to deliver server-side push without long polling on the client
Patterns agents use AmazonApiGatewayManagementApi API for, with concrete tasks.
★ Real-Time Chat Message Delivery
Real-time chat services use API Gateway WebSocket APIs to keep persistent client connections, store the resulting connectionId values when clients join a room, then call POST @connections/{connectionId} with the message payload as bytes when a peer sends a chat message. The endpoint targets the deployed API's invoke URL and lets the backend deliver server-initiated messages without long polling.
Call POST /@connections/{connectionId} on the deployed API's invoke URL with a JSON body containing the chat message
Connection Hygiene and Disconnection
Backends managing WebSocket connections use GET /@connections/{connectionId} to confirm a stored connection is still active before attempting to send to it, and DELETE /@connections/{connectionId} to disconnect clients that exceed quota or violate policy. Combining a GoneException response on send with cleanup of stale connection ids in DynamoDB keeps the connection table consistent.
Call GET /@connections/{connectionId} to confirm the connection is active, otherwise remove the stored connection id from the connections table
Live Dashboard Push Notifications
Live dashboard backends fan out a single update to many connected clients by storing their connectionId values in DynamoDB and iterating with POST /@connections/{connectionId} per client. The Lambda backend handles individual GoneException responses by deleting stale ids, so dashboards stay current even as users navigate away and reconnect.
Iterate over the connection ids stored in DynamoDB and call POST /@connections/{connectionId} for each, deleting any id that returns 410 Gone
AI Agent WebSocket Notifier
An AI agent invoked through Jentic notifies a specific user over a WebSocket when a long-running task finishes. The agent retrieves the user's connectionId from a backing store, searches Jentic for the post-to-connection operation, and executes it with the message payload. Jentic handles the SigV4 signing required by the @connections endpoint, so the agent only deals with the structured payload.
Search Jentic for post message to websocket connection, execute it for the stored connectionId, and handle GoneException by removing the connection id from the store
3 endpoints — jentic publishes the only available openapi specification for the api gateway management api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/@connections/{connectionId}
Send a message to a specific connected WebSocket client
/@connections/{connectionId}
Retrieve metadata about a connected WebSocket client
/@connections/{connectionId}
Force-disconnect a specific WebSocket client
/@connections/{connectionId}
Send a message to a specific connected WebSocket client
/@connections/{connectionId}
Retrieve metadata about a connected WebSocket client
/@connections/{connectionId}
Force-disconnect a specific WebSocket client
Three things that make agents converge on Jentic-routed access.
Credential isolation
AWS access key id and secret access key for the API Gateway Management API are stored encrypted in the Jentic vault. Jentic performs SigV4 signing server side and supports STS temporary credentials, so the agent never sees the raw secret access key.
Intent-based discovery
Agents search Jentic with phrases like post to websocket connection or disconnect websocket client, and Jentic returns the matching @connections operation with its input schema, so the agent does not have to construct the deployed API's invoke URL by hand.
Time to first call
Direct integration: 1 to 2 days including SigV4 signing against the deployed API endpoint, GoneException handling, and connection-store cleanup. Through Jentic: under 30 minutes — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Amazon API Gateway
Control-plane API for defining and deploying the WebSocket APIs that the Management API operates on
Use the control-plane API Gateway API to create the WebSocket API; use the Management API to send messages and manage connections at runtime.
Amazon Managed Service for Prometheus
Collects metrics from Lambda backends that operate WebSocket fan-out at scale
Use AMP alongside the Management API when the agent needs operational metrics on fan-out latency and per-connection error rates.
Cloudflare
Cloudflare Workers Durable Objects offer an alternative WebSocket runtime with built-in connection storage
Choose Cloudflare Durable Objects when the application is edge-first and does not need AWS-native IAM; choose the API Gateway Management API when the WebSocket backend already runs on Lambda.
Specific to using AmazonApiGatewayManagementApi API through Jentic.
Why is there no official OpenAPI spec for the API Gateway Management API?
AWS does not publish an OpenAPI specification for the API Gateway Management API; the official surface is the AWS SDKs and the Smithy model. Jentic generates and maintains this spec so that AI agents and developers can call AmazonApiGatewayManagementApi via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the API Gateway Management API use?
The API uses AWS Signature Version 4 (SigV4) signed with an IAM access key id and secret access key, optionally with an STS session token. Through Jentic these credentials are stored encrypted in the vault and SigV4 signing is performed server side, so the agent never sees the raw secret access key.
Can I broadcast a single message to all WebSocket connections with the API Gateway Management API?
No. The API operates per connection only. To broadcast, the backend must store every active connectionId (typically in DynamoDB) and iterate, calling POST /@connections/{connectionId} for each. Connections that return 410 Gone should be removed from the store.
What are the rate limits for the API Gateway Management API?
Throttling on the API Gateway Management API is governed by the deployed WebSocket API's per-account and per-stage limits. Sustained high-volume fan-out can hit the per-second message rate of the underlying API; back off on ThrottlingException and consider sharding fan-out across Lambda invocations.
How do I send a WebSocket message with the API Gateway Management API through Jentic?
Install the SDK with pip install jentic, search Jentic for post message to websocket connection, load the PostToConnection operation schema, and execute it with the connectionId and message payload. Jentic handles SigV4 signing against the deployed API's invoke URL and returns success or GoneException.
How do I get the invoke URL my backend needs to call?
The endpoint is of the form https://{api-id}.execute-api.{region}.amazonaws.com/{stage}, or the custom domain configured on the WebSocket API stage. The base URL is the same one your client connects to, with the wss:// scheme replaced by https:// — your backend must explicitly target this endpoint when calling @connections.