Skip to main content

Request Parameters

Main Structure

string
required
Business identifier, please confirm with MarsMind Intelligence
string
required
Signature, see algorithm below
integer
required
Timestamp (Unix seconds)
object
required
Message details, see field definitions below

message_info Fields

string
Unique message ID, required in assist_dialog scenario
string
Group chat ID, error 400 if both from_user_id and group_id are empty
string
Group chat name
string
required
Sender ID
string
Sender nickname
string
Receiver ID
string
Receiver nickname
string[]
List of @ user IDs (only supported by auto_dialog)
string
Message text content, at least one of content and files_info is required
integer
required
1 = Normal message, 2 = Quoted message
string
required
auto_dialog | assist_dialog | website_dialog | cmd_dialog
integer
1=Robot bound account 2=Customer 3=Customer Service 4=Robot message. Required for auto_dialog
integer
required
Message creation time (Unix timestamp)
File[]
Attachment list, see table below. At least one of content and files_info is required
object
Quoted message object, must contain msg_id, message_type. Required if message_type=2

files_info Structure

string
required
File address or base64 data
string
required
“image”/“document”/“voice”

Dialogue Scenario Description

auto_dialog (Automatic Dialogue)

  • event_type = auto_dialog
  • Provide send_url, MarsMind Intelligence automatically controls message logic
  • Supports text, images, files (unique type per request)
from_user_type filling suggestion:
  • Bound objects: Fill in 1 for all except the intelligent assistant’s own messages
  • Unbound objects: Fill in 2 for external customers, 3 for company personnel

assist_dialog (Assisted Dialogue)

  • event_type = assist_dialog
  • Return message processing results in real-time
  • If parameters are consistent with auto_dialog message, context will be reused

website_dialog (Website Dialogue)

  • event_type = website_dialog
  • Message returns results immediately and merges into context, send_url not supported

cmd_dialog (Command Control)

  • event_type = cmd_dialog
  • content is specific command, currently supports:
    • stop_auto_reply: Stop automatic reply (only valid in auto_dialog scenario)

Call Example

auto_dialog