Start a session
For coding agents, keep the requested interface. Otherwise, use the hosted Momentic MCP with an existing Connector for private targets, or theqa CLI when a new tunnel is needed. An
agent that can’t run commands on the machine that reaches the target asks you to
start the tunnel there, then uses hosted tools with that Connector, or the CLI
if you asked for it or the agent has no hosted tools. A blocked hosted session
reports the blocker without switching interfaces. For scripts and continuous
integration (CI) jobs, use the HTTP API below and keep MOMENTIC_API_KEY in
your CI secret store. When a tunnel is needed, start it with the CLI, save the
session ID and URL, then use qa wait and qa report to collect findings.
Start a web session over HTTP with a Momentic API key. This request returns
sessionId and webUrl:
Start a PR session
Both start endpoints accept an optional top-levelslackChannel, such as
"C0123ABC" or "#checkout-qa", to deliver reports and requests for input to
that channel. Connect the Momentic Slack app and invite it to the channel first.
An unknown channel or missing bot membership rejects the start before a session
is created. With the CLI, pass --slack-channel '#checkout-qa' to qa start.
Send the provider and PR reference to /v1/mo/pr-sessions. GitHub is the
supported PR provider. previewUrl is optional; supply it when your script or
coding agent knows which deployment to test:
previewUrl or discovered for
the current PR commit. A saved environment does not replace it. If discovery
finds no usable preview, supply previewUrl before starting.
Wait and fetch the report
For either start route, keep the returnedsessionId. Poll
GET /v1/mo/sessions/:sessionId/status every 10 seconds with the same API key:
canonicalDisplayState when present, otherwise displayState. Keep
polling while that state is running, waiting_on_agents, or checking. For
needs_you, open webUrl, answer the pending questions, then resume polling.
On a failed request, stop and resolve the error rather than treating missing
status as completion.
When Mo is ready, fetch GET /v1/mo/sessions/:sessionId/report:
reason and nextAction; the report
may be partial. Review the report’s findings, verdicts, and coverage gaps before
deciding whether the app met your criteria. A settled session is not proof that
the app passed.
For recurring testing, configure a
Mo schedule with a prompt and
environment. Each scheduled run starts a new session. Copy its session ID from
the schedule’s past-run link or session URL, then use the
HTTP recipe above.
See Mo integrations for other connections.