Salesforce Einstein · Capability

Salesforce Einstein Bots API — Sessions

Salesforce Einstein Bots API — Sessions. 3 operations. Lead operation: Salesforce Einstein Create a bot session. Self-contained Naftiko capability covering one Salesforce Einstein business surface.

Run with Naftiko Salesforce EinsteinSessions

What You Can Do

POST
Createsession — Salesforce Einstein Create a bot session
/v1/einstein/bots/{botid}/sessions
GET
Getsession — Salesforce Einstein Get session details
/v1/einstein/bots/{botid}/sessions/{sessionid}
DELETE
Endsession — Salesforce Einstein End a bot session
/v1/einstein/bots/{botid}/sessions/{sessionid}

MCP Tools

salesforce-einstein-create-bot-session

Salesforce Einstein Create a bot session

salesforce-einstein-get-session-details

Salesforce Einstein Get session details

read-only idempotent
salesforce-einstein-end-bot-session

Salesforce Einstein End a bot session

idempotent

Capability Spec

bots-sessions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Salesforce Einstein Bots API — Sessions
  description: 'Salesforce Einstein Bots API — Sessions. 3 operations. Lead operation: Salesforce Einstein Create a bot session.
    Self-contained Naftiko capability covering one Salesforce Einstein business surface.'
  tags:
  - Salesforce Einstein
  - Sessions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SALESFORCE_EINSTEIN_API_KEY: SALESFORCE_EINSTEIN_API_KEY
capability:
  consumes:
  - type: http
    namespace: bots-sessions
    baseUri: https://{instance}.salesforce.com/services/data/v58.0
    description: Salesforce Einstein Bots API — Sessions business capability. Self-contained, no shared references.
    resources:
    - name: einstein-bots-botId-sessions
      path: /einstein/bots/{botId}/sessions
      operations:
      - name: createsession
        method: POST
        description: Salesforce Einstein Create a bot session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: einstein-bots-botId-sessions-sessionId
      path: /einstein/bots/{botId}/sessions/{sessionId}
      operations:
      - name: getsession
        method: GET
        description: Salesforce Einstein Get session details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: endsession
        method: DELETE
        description: Salesforce Einstein End a bot session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SALESFORCE_EINSTEIN_API_KEY}}'
  exposes:
  - type: rest
    namespace: bots-sessions-rest
    port: 8080
    description: REST adapter for Salesforce Einstein Bots API — Sessions. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/einstein/bots/{botid}/sessions
      name: einstein-bots-botid-sessions
      description: REST surface for einstein-bots-botId-sessions.
      operations:
      - method: POST
        name: createsession
        description: Salesforce Einstein Create a bot session
        call: bots-sessions.createsession
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/einstein/bots/{botid}/sessions/{sessionid}
      name: einstein-bots-botid-sessions-sessionid
      description: REST surface for einstein-bots-botId-sessions-sessionId.
      operations:
      - method: GET
        name: getsession
        description: Salesforce Einstein Get session details
        call: bots-sessions.getsession
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: endsession
        description: Salesforce Einstein End a bot session
        call: bots-sessions.endsession
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: bots-sessions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Salesforce Einstein Bots API — Sessions. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: salesforce-einstein-create-bot-session
      description: Salesforce Einstein Create a bot session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: bots-sessions.createsession
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-einstein-get-session-details
      description: Salesforce Einstein Get session details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: bots-sessions.getsession
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-einstein-end-bot-session
      description: Salesforce Einstein End a bot session
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: bots-sessions.endsession
      outputParameters:
      - type: object
        mapping: $.