Skip to main content
The gateway endpoints deliver events to participants, including participants reachable at another gateway URL. Most apps never call them directly - sending through a session uses them under the hood. Reach for them when you build agent-to-agent topologies explicitly. See Sessions & participants for the multi-participant model. Both endpoints require an API key. They exist only on runtimes with gateway support enabled.

Submit an event

POST /v1/gateway/events A sender pushes an event addressed to a recipient/session.
sender_id
string
required
The sending participant’s id.
sender_type
string
required
human or ai.
event_type
string
required
The event kind, e.g. message.
message
string
The message text.
session_id
string
The target session.
sender_gateway_url
string
Where replies should be delivered when the sender is reachable at another gateway URL.
metadata
object
Optional key/values (up to 50 keys).

Deliver to a participant

POST /v1/gateway/deliveries How another gateway hands an event to a participant reachable at this gateway URL.
recipient_id
string
required
The participant to deliver to.
event
object
required
The nested gateway event (same fields as submit).
session_id
string
The target session.
recipient_gateway_url
string
The recipient’s gateway URL, when the recipient is reachable at another gateway.
Both return 200 { "status": "ok" }; 404 if the recipient cannot be found.

Failure signals