Enable and publish an Einstein Bot in Salesforce Setup; note the Bot ID (the 18-character record ID from the Bot Overview page URL) and obtain the runtime base URL (e.g., https://runtime-api-na-west.prod.chatbots.sfdc.sh).
Obtain a Salesforce OAuth access token; include it as the Authorization: Bearer header, and also send the X-Org-Id header set to your org's 18-character ID on every request.
Begin a bot session by POSTing to https://<runtime-base-url>/v5.0.0/bots/<botId>/sessions with a JSON body specifying the forceConfig (including orgId and endpoint) and externalSessionKey.
Capture the sessionId from the response and send user messages via POST https://<runtime-base-url>/v5.0.0/bots/<botId>/sessions/<sessionId>/messages with body {"message": {"text": "<user input>"}}.
Parse the bot's reply from the messages array in the response; handle rich response types (text, options, image) that may appear in the items array.
End the session by sending DELETE https://<runtime-base-url>/v5.0.0/bots/<botId>/sessions/<sessionId> when the conversation concludes.
Known gotchas
The runtime base URL is region-specific and is not the same as the Salesforce instance URL — find it in the Embedded Service or channel configuration, or via the bot's connected channel settings.
API v5.0.0 does not support file attachment sending from the external client; if your use case requires file uploads, check the current API version in the documentation.
The X-Org-Id header is mandatory and distinct from the Authorization token — omitting it causes a 401 even with a valid OAuth token.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp