dots.v2.actionGateway.sessions.post()
Generated on 5 Nov 2026
from DoTs version
v1.23.0
Usage
client.v2.actionGateway.sessions.post(body: Session_create, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | Create_session_response>Description
Creates a session owned by your team, with a new session URN, and returns the MCP URL an agent connects to. tools selects the tools and toolbelts the session exposes, and policy decides which calls run, need approval, or are refused.
Set config.cache to opt into result caching for all eligible tools or a specific list. Caching is off by default and must be enabled for the team.
Parameters
namestring requiredExample:
support-bot-aliceRequired human-readable session name.
actorIdstring optionalExample:
aliceOptional actor binding: the user whose connections the session's tool calls use, matched against connection
user_id. When set it must use the same alphabet as a connection'suser_id,[A-Za-z0-9._-], at most 64 characters; anything else is rejected with 400.policyobject or null optionalOptional tool-permission policy. Omitted asks before every call.
Show child properties
defaultActionstring optionalAction for calls no rule matches. Empty means ask; otherwise this must be allow, ask, or deny.
rulesarray of objects optionalRules for specific tools or toolbelts.
toolsarray of strings optionalExample:
["toolbelt:search-toolbelt@1", "jira_create_issue"]Omitted enables every tool. An explicit empty array enables no tools. Direct tools may be
<tool>or<tool>@<version>, using provider-qualified tool slugs, and a pinned version must be the released one; toolbelt references must be version-pinned astoolbelt:<belt-name>@<version>.configobject optionalExample:
{"preloadTools": ["exa_web_search"], "outputViews": {"exa_web_search": "titles-and-urls"}, "customInstructions": "Prefer primary sources and cite URLs."}Optional session options. config.preloadTools may contain concrete tool names (optionally version-pinned) and version-pinned toolbelt references. config.customInstructions is a string of at most 1000 characters. config.outputViews maps up to 100 tool slugs to the name of an output view to apply to that tool's results. config.cache opts eligible tools into result caching for this session.
Show child properties
cacheobject optionalExample:
{"allEligible": true, "maxAgeSeconds": 60}Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call.
Show child properties
toolsarray of strings optionalExample:
["exa_web_search"]Provider-qualified tool slugs to cache. Every listed tool must resolve for the team and have a catalog cache policy, or session creation fails. Use slugs without version suffixes or toolbelt references. An empty array enables no tools.
allEligibleboolean optionalExample:
trueEnables caching for every called tool version with a catalog cache policy, including tools that become eligible after session creation. Do not combine with tools.
maxAgeSecondsinteger optionalExample:
60Maximum cache lifetime in seconds for this session. Omit to use each tool's lifetime, up to 300 seconds. A smaller tool lifetime or provider response cache header can shorten it. Per-call max_age_seconds can require a fresher result but cannot increase this limit.
networkobject optionalProduct-level session network binding. When set,
vpc_uuidmust identify a VPC owned by the session's team.Show child properties
vpcUuidstring optionalExample:
5a4981aa-9653-4bd1-bef5-d6bff52042e4UUID of a VPC owned by your team, in a region that supports sessions.
insightsobject optionalOmitted when the request omitted insights or explicitly sent null.
Show child properties
metricsboolean or null optionalExample:
trueAccepted and stored for parity with the Insights schema.
logsboolean or null optionalExample:
trueWhether the session's customer logs are sent to Insights.
tracesboolean or null optionalExample:
falseWhether the session's customer traces are sent to Insights.
Request Sample
Response Example
More Information
See /v2/action-gateway/sessions in the API reference for additional detail on responses, headers, parameters, and more.