Salesforce Service Cloud · Capability

Salesforce Service Cloud Salesforce Chat REST API — Sessions

Salesforce Service Cloud Salesforce Chat REST API — Sessions. 3 operations. Lead operation: Salesforce Service Cloud Initiate a chat session. Self-contained Naftiko capability covering one Salesforce Service Cloud business surface.

Run with Naftiko Salesforce Service CloudSessions

What You Can Do

POST
Initiatechatsession — Salesforce Service Cloud Initiate a chat session
/v1/chasitor/chasitorinit
POST
Endchat — Salesforce Service Cloud End a chat session
/v1/chasitor/chatend
GET
Getsessionid — Salesforce Service Cloud Get a new session ID
/v1/system/sessionid

MCP Tools

salesforce-service-cloud-initiate-chat

Salesforce Service Cloud Initiate a chat session

salesforce-service-cloud-end-chat

Salesforce Service Cloud End a chat session

salesforce-service-cloud-get-new

Salesforce Service Cloud Get a new session ID

read-only idempotent

Capability Spec

salesforce-live-agent-sessions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Salesforce Service Cloud Salesforce Chat REST API — Sessions
  description: 'Salesforce Service Cloud Salesforce Chat REST API — Sessions. 3 operations. Lead operation: Salesforce Service
    Cloud Initiate a chat session. Self-contained Naftiko capability covering one Salesforce Service Cloud business surface.'
  tags:
  - Salesforce Service Cloud
  - Sessions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SALESFORCE_SERVICE_CLOUD_API_KEY: SALESFORCE_SERVICE_CLOUD_API_KEY
capability:
  consumes:
  - type: http
    namespace: salesforce-live-agent-sessions
    baseUri: https://{hostname}/chat/rest
    description: Salesforce Service Cloud Salesforce Chat REST API — Sessions business capability. Self-contained, no shared
      references.
    resources:
    - name: Chasitor-ChasitorInit
      path: /Chasitor/ChasitorInit
      operations:
      - name: initiatechatsession
        method: POST
        description: Salesforce Service Cloud Initiate a chat session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: Chasitor-ChatEnd
      path: /Chasitor/ChatEnd
      operations:
      - name: endchat
        method: POST
        description: Salesforce Service Cloud End a chat session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: System-SessionId
      path: /System/SessionId
      operations:
      - name: getsessionid
        method: GET
        description: Salesforce Service Cloud Get a new session ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: X-LIVEAGENT-API-VERSION
      value: '{{env.SALESFORCE_SERVICE_CLOUD_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: salesforce-live-agent-sessions-rest
    port: 8080
    description: REST adapter for Salesforce Service Cloud Salesforce Chat REST API — Sessions. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/chasitor/chasitorinit
      name: chasitor-chasitorinit
      description: REST surface for Chasitor-ChasitorInit.
      operations:
      - method: POST
        name: initiatechatsession
        description: Salesforce Service Cloud Initiate a chat session
        call: salesforce-live-agent-sessions.initiatechatsession
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/chasitor/chatend
      name: chasitor-chatend
      description: REST surface for Chasitor-ChatEnd.
      operations:
      - method: POST
        name: endchat
        description: Salesforce Service Cloud End a chat session
        call: salesforce-live-agent-sessions.endchat
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/system/sessionid
      name: system-sessionid
      description: REST surface for System-SessionId.
      operations:
      - method: GET
        name: getsessionid
        description: Salesforce Service Cloud Get a new session ID
        call: salesforce-live-agent-sessions.getsessionid
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: salesforce-live-agent-sessions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Salesforce Service Cloud Salesforce Chat REST API — Sessions. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: salesforce-service-cloud-initiate-chat
      description: Salesforce Service Cloud Initiate a chat session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: salesforce-live-agent-sessions.initiatechatsession
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-service-cloud-end-chat
      description: Salesforce Service Cloud End a chat session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: salesforce-live-agent-sessions.endchat
      outputParameters:
      - type: object
        mapping: $.
    - name: salesforce-service-cloud-get-new
      description: Salesforce Service Cloud Get a new session ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: salesforce-live-agent-sessions.getsessionid
      outputParameters:
      - type: object
        mapping: $.