{
"type": "object",
"properties": {
"thread_config": {
"properties": {
"thread_root": {
"type": "object",
"properties": {
"sender_id": {
"type": "string",
"description": "根消息的发送者。"
},
"receiver_id": {
"type": "string",
"description": "根消息的接收者。"
},
"create_time": {
"type": "number",
"description": "根消息的发送时间。"
},
"message_server_id": {
"type": "number",
"description": "根消息的服务器消息 ID。"
},
"message_client_id": {
"type": "string",
"description": "根消息的客户端消息 ID。"
}
},
"x-apifox-orders": [
"sender_id",
"receiver_id",
"create_time",
"message_server_id",
"message_client_id"
],
"description": "Thread 根消息对象。"
},
"thread_reply": {
"type": "object",
"properties": {
"sender_id": {
"type": "string",
"description": "被回复消息的发送者。"
},
"receiver_id": {
"type": "string",
"description": "被回复消息的接收者。"
},
"create_time": {
"type": "number",
"description": "被回复消息的发送时间。"
},
"message_server_id": {
"type": "number",
"description": "被回复消息的服务器消息 ID。"
},
"message_client_id": {
"type": "string",
"description": "被回复消息的客户端消息 ID。"
}
},
"x-apifox-orders": [
"sender_id",
"receiver_id",
"create_time",
"message_server_id",
"message_client_id"
],
"description": "被回复的消息对象。"
}
},
"x-apifox-orders": [
"thread_root",
"thread_reply"
],
"description": "Thread 消息配置项。",
"$ref": "#/definitions/139509451"
},
"sender_no_sense": {
"type": "boolean",
"title": "发送方无感知",
"description": "发送方是否无感知,默认为 false。若设置为无感知(true),则消息发送者无该消息的多端、漫游、历史记录等信息。 查询历史消息时可设置是否在历史记录查询结果中包含无感知消息,具体参见分页查询历史消息。 发送者和接收者必须有一方感知,即不能将两者都设置为无感知。",
"default": "false"
},
"receiver_no_sense": {
"type": "boolean",
"title": "接收方无感知",
"description": "接收方是否无感知,默认为 false。若设置为无感知(true),则消息接收者无该消息的多端、漫游、历史记录等信息。 查询历史消息时可设置是否在历史记录查询结果中包含无感知消息,具体参见分页查询历史消息。",
"default": "false"
},
"extension": {
"type": "string",
"description": "开发者扩展字段,JSON 格式,长度上限为 1024 位字符。例如:\"{\"k\":\"v\"}\"",
"title": "开发者扩展字段"
},
"message": {
"type": "object",
"properties": {
"message_client_id": {
"type": "string",
"title": "客户端消息id(不传则自动生成)",
"description": "客户端消息id(不传则自动生成)"
}
},
"x-apifox-orders": [
"01HNSRBA5HQWQYKJ8C5C2WHBBZ",
"message_client_id"
],
"title": "消息体",
"x-apifox-refs": {
"01HNSRBA5HQWQYKJ8C5C2WHBBZ": {
"$ref": "#/definitions/81970145",
"x-apifox-overrides": {
"attachment": {
"type": "object",
"properties": {},
"x-apifox-orders": [],
"description": "非文本消息/提示消息的属性或自定义消息内容,长度上限 5000 位字符。 对于非文本消息/提示消息,该字段必填,每种消息的属性参数见:消息格式示例。",
"title": "多媒体消息内容"
},
"text": {
"type": "string",
"description": "对于文本消息和提示消息,该字段必填,值为消息内容,长度上限 5000 位字符。 对于非文本/提示消息,该字段非必填,值为描述信息,可用于全文关键字搜索历史消息,长度上限 500 位字符。",
"maxLength": 500,
"title": "文本消息"
},
"sub_type": {
"type": "integer",
"description": "自定义消息子类型,大于 0。message_type = 100 时该字段才有效。",
"minimum": 0,
"exclusiveMinimum": 0,
"title": "自定义消息子类型"
},
"message_type": {
"type": "integer",
"description": "消息类型。 0:文本消息 1:图片消息 2:语音消息 3:视频消息 4:地理位置消息 6:文件消息 10:提示消息 100:自定义消息 对于未开通安全通(即易盾反垃圾)功能的应用,自定义消息不会过内容审核。",
"title": "消息类型"
}
},
"required": [
"message_type"
]
}
},
"description": "消息体。"
},
"message_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1GJ1KRDV2WKZJYMV4150C"
],
"title": "消息配置",
"description": "消息配置项。",
"x-apifox-refs": {
"01HNS1GJ1KRDV2WKZJYMV4150C": {
"$ref": "#/definitions/81871495"
}
}
},
"route_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1HHNQC0KHGVJK70HXW0SH"
],
"description": "抄送相关配置项。",
"title": "抄送配置",
"x-apifox-refs": {
"01HNS1HHNQC0KHGVJK70HXW0SH": {
"$ref": "#/definitions/81873802"
}
}
},
"push_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1JHHJQ5DM8VJE69DRJWS9"
],
"description": "推送相关配置项。",
"title": "推送配置",
"x-apifox-refs": {
"01HNS1JHHJQ5DM8VJE69DRJWS9": {
"$ref": "#/definitions/81874011"
}
}
},
"antispam_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNRYHRCV38S3B9R2V8A92FCA"
],
"description": "安全通相关配置项。",
"title": "安全通配置",
"x-apifox-refs": {
"01HNRYHRCV38S3B9R2V8A92FCA": {
"$ref": "#/definitions/81855284"
}
}
},
"p2p_option": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1K8WX52R9S593BZ3RTRF7"
],
"description": "单聊消息功能配置项。",
"title": "单聊消息配置",
"x-apifox-refs": {
"01HNS1K8WX52R9S593BZ3RTRF7": {
"$ref": "#/definitions/81874107"
}
}
},
"team_option": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1KWD9WH314966NXZ9BYJF"
],
"description": "高级群消息功能配置项。",
"x-apifox-refs": {
"01HNS1KWD9WH314966NXZ9BYJF": {
"$ref": "#/definitions/81874148"
}
},
"title": "高级群消息配置"
},
"superteam_option": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1MAVJXR5Q9MV93GMA4DZC"
],
"description": "超大群消息功能配置项。",
"x-apifox-refs": {
"01HNS1MAVJXR5Q9MV93GMA4DZC": {
"$ref": "#/definitions/81874164"
}
},
"title": "超大群消息配置"
},
"robot_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNRYXG18FJK06M1K1VBKBDAQ"
],
"description": "机器人功能配置项。",
"x-apifox-refs": {
"01HNRYXG18FJK06M1K1VBKBDAQ": {
"$ref": "#/definitions/81857819"
}
},
"title": "机器人功能配置"
},
"target_option": {
"type": "object",
"properties": {
"receiver_account_ids": {
"type": "array",
"items": {
"type": "string",
"description": "账号 ID"
},
"title": "群定向消息成员列表,即指定接收群消息的群成员列表。",
"description": "当 inclusive 为 true,当前列表为可见(接收)列表。\n当 inclusive 为 false,当前列表为不可见(不接收)列表。\n列表中不能包含消息发送者,消息发送者默认为可见。\n列表中不能包含非法账号、非群成员账号。\n列表中最多可以传入 100 个用户账号。"
},
"inclusive": {
"type": "boolean",
"title": "是否为可见列表",
"description": "群定向消息成员列表是否为可见列表。默认为 true,即 receiver_account_ids 为可见(接收)列表。\n发送超大群消息时,不能将 inclusive 设置为 false。",
"default": true
},
"visible_to_new_member": {
"type": "boolean",
"default": false,
"description": "新进群成员是否可见该消息。默认为 false,即新进群成员不可以查看该定向消息。若设置为 true,则新进群成员若可以查询该定向消息,可以通过云端历史相关接口查询到该消息。\n当 inclusive 为 true 时,不能同时设置 visible_to_new_member 为 true。即发送定向列表为可见的定向消息时,只能由定向列表中成员接收和查看。\n发送超大群消息时,不能将 visible_to_new_member 设置为 true。",
"title": "新进群成员是否可见该消息"
}
},
"x-apifox-orders": [
"receiver_account_ids",
"inclusive",
"visible_to_new_member"
],
"title": "群定向消息配置项。",
"description": "该功能需要单独开通。"
},
"check_team_member_valid": {
"type": "boolean",
"description": "发送群定向消息时,是否需要验证定向成员的群成员身份。默认为 true,即需要验证群成员身份。",
"title": "是否校验定向成员合法性"
}
},
"x-apifox-orders": [
"sender_no_sense",
"receiver_no_sense",
"extension",
"message",
"message_config",
"route_config",
"push_config",
"antispam_config",
"p2p_option",
"team_option",
"superteam_option",
"robot_config",
"01JFSCQ2KZSC3XXJ3PE5DD5S86",
"target_option",
"check_team_member_valid",
"thread_config"
],
"x-apifox-refs": {
"01JFSCQ2KZSC3XXJ3PE5DD5S86": {
"$ref": "#/definitions/138813602"
}
},
"required": [
"message",
"check_team_member_valid"
]
}curl --location --request POST 'https://open.yunxinapi.com/im/v2/conversations//messages/actions/stream_message' \
--header 'AppKey: ' \
--header 'X-custom-traceid: {% mock '\''uuid'\'' %}' \
--header 'Nonce: ' \
--header 'CurTime: ' \
--header 'CheckSum: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "object",
"properties": {
"thread_config": {
"properties": {
"thread_root": {
"type": "object",
"properties": {
"sender_id": {
"type": "string",
"description": "根消息的发送者。"
},
"receiver_id": {
"type": "string",
"description": "根消息的接收者。"
},
"create_time": {
"type": "number",
"description": "根消息的发送时间。"
},
"message_server_id": {
"type": "number",
"description": "根消息的服务器消息 ID。"
},
"message_client_id": {
"type": "string",
"description": "根消息的客户端消息 ID。"
}
},
"x-apifox-orders": [
"sender_id",
"receiver_id",
"create_time",
"message_server_id",
"message_client_id"
],
"description": "Thread 根消息对象。"
},
"thread_reply": {
"type": "object",
"properties": {
"sender_id": {
"type": "string",
"description": "被回复消息的发送者。"
},
"receiver_id": {
"type": "string",
"description": "被回复消息的接收者。"
},
"create_time": {
"type": "number",
"description": "被回复消息的发送时间。"
},
"message_server_id": {
"type": "number",
"description": "被回复消息的服务器消息 ID。"
},
"message_client_id": {
"type": "string",
"description": "被回复消息的客户端消息 ID。"
}
},
"x-apifox-orders": [
"sender_id",
"receiver_id",
"create_time",
"message_server_id",
"message_client_id"
],
"description": "被回复的消息对象。"
}
},
"x-apifox-orders": [
"thread_root",
"thread_reply"
],
"description": "Thread 消息配置项。",
"$ref": "#/definitions/139509451"
},
"sender_no_sense": {
"type": "boolean",
"title": "发送方无感知",
"description": "发送方是否无感知,默认为 false。若设置为无感知(true),则消息发送者无该消息的多端、漫游、历史记录等信息。 查询历史消息时可设置是否在历史记录查询结果中包含无感知消息,具体参见分页查询历史消息。 发送者和接收者必须有一方感知,即不能将两者都设置为无感知。",
"default": "false"
},
"receiver_no_sense": {
"type": "boolean",
"title": "接收方无感知",
"description": "接收方是否无感知,默认为 false。若设置为无感知(true),则消息接收者无该消息的多端、漫游、历史记录等信息。 查询历史消息时可设置是否在历史记录查询结果中包含无感知消息,具体参见分页查询历史消息。",
"default": "false"
},
"extension": {
"type": "string",
"description": "开发者扩展字段,JSON 格式,长度上限为 1024 位字符。例如:\"{\"k\":\"v\"}\"",
"title": "开发者扩展字段"
},
"message": {
"type": "object",
"properties": {
"message_client_id": {
"type": "string",
"title": "客户端消息id(不传则自动生成)",
"description": "客户端消息id(不传则自动生成)"
}
},
"x-apifox-orders": [
"01HNSRBA5HQWQYKJ8C5C2WHBBZ",
"message_client_id"
],
"title": "消息体",
"x-apifox-refs": {
"01HNSRBA5HQWQYKJ8C5C2WHBBZ": {
"$ref": "#/definitions/81970145",
"x-apifox-overrides": {
"attachment": {
"type": "object",
"properties": {},
"x-apifox-orders": [],
"description": "非文本消息/提示消息的属性或自定义消息内容,长度上限 5000 位字符。 对于非文本消息/提示消息,该字段必填,每种消息的属性参数见:消息格式示例。",
"title": "多媒体消息内容"
},
"text": {
"type": "string",
"description": "对于文本消息和提示消息,该字段必填,值为消息内容,长度上限 5000 位字符。 对于非文本/提示消息,该字段非必填,值为描述信息,可用于全文关键字搜索历史消息,长度上限 500 位字符。",
"maxLength": 500,
"title": "文本消息"
},
"sub_type": {
"type": "integer",
"description": "自定义消息子类型,大于 0。message_type = 100 时该字段才有效。",
"minimum": 0,
"exclusiveMinimum": 0,
"title": "自定义消息子类型"
},
"message_type": {
"type": "integer",
"description": "消息类型。 0:文本消息 1:图片消息 2:语音消息 3:视频消息 4:地理位置消息 6:文件消息 10:提示消息 100:自定义消息 对于未开通安全通(即易盾反垃圾)功能的应用,自定义消息不会过内容审核。",
"title": "消息类型"
}
},
"required": [
"message_type"
]
}
},
"description": "消息体。"
},
"message_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1GJ1KRDV2WKZJYMV4150C"
],
"title": "消息配置",
"description": "消息配置项。",
"x-apifox-refs": {
"01HNS1GJ1KRDV2WKZJYMV4150C": {
"$ref": "#/definitions/81871495"
}
}
},
"route_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1HHNQC0KHGVJK70HXW0SH"
],
"description": "抄送相关配置项。",
"title": "抄送配置",
"x-apifox-refs": {
"01HNS1HHNQC0KHGVJK70HXW0SH": {
"$ref": "#/definitions/81873802"
}
}
},
"push_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1JHHJQ5DM8VJE69DRJWS9"
],
"description": "推送相关配置项。",
"title": "推送配置",
"x-apifox-refs": {
"01HNS1JHHJQ5DM8VJE69DRJWS9": {
"$ref": "#/definitions/81874011"
}
}
},
"antispam_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNRYHRCV38S3B9R2V8A92FCA"
],
"description": "安全通相关配置项。",
"title": "安全通配置",
"x-apifox-refs": {
"01HNRYHRCV38S3B9R2V8A92FCA": {
"$ref": "#/definitions/81855284"
}
}
},
"p2p_option": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1K8WX52R9S593BZ3RTRF7"
],
"description": "单聊消息功能配置项。",
"title": "单聊消息配置",
"x-apifox-refs": {
"01HNS1K8WX52R9S593BZ3RTRF7": {
"$ref": "#/definitions/81874107"
}
}
},
"team_option": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1KWD9WH314966NXZ9BYJF"
],
"description": "高级群消息功能配置项。",
"x-apifox-refs": {
"01HNS1KWD9WH314966NXZ9BYJF": {
"$ref": "#/definitions/81874148"
}
},
"title": "高级群消息配置"
},
"superteam_option": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNS1MAVJXR5Q9MV93GMA4DZC"
],
"description": "超大群消息功能配置项。",
"x-apifox-refs": {
"01HNS1MAVJXR5Q9MV93GMA4DZC": {
"$ref": "#/definitions/81874164"
}
},
"title": "超大群消息配置"
},
"robot_config": {
"type": "object",
"properties": {},
"x-apifox-orders": [
"01HNRYXG18FJK06M1K1VBKBDAQ"
],
"description": "机器人功能配置项。",
"x-apifox-refs": {
"01HNRYXG18FJK06M1K1VBKBDAQ": {
"$ref": "#/definitions/81857819"
}
},
"title": "机器人功能配置"
},
"target_option": {
"type": "object",
"properties": {
"receiver_account_ids": {
"type": "array",
"items": {
"type": "string",
"description": "账号 ID"
},
"title": "群定向消息成员列表,即指定接收群消息的群成员列表。",
"description": "当 inclusive 为 true,当前列表为可见(接收)列表。\n当 inclusive 为 false,当前列表为不可见(不接收)列表。\n列表中不能包含消息发送者,消息发送者默认为可见。\n列表中不能包含非法账号、非群成员账号。\n列表中最多可以传入 100 个用户账号。"
},
"inclusive": {
"type": "boolean",
"title": "是否为可见列表",
"description": "群定向消息成员列表是否为可见列表。默认为 true,即 receiver_account_ids 为可见(接收)列表。\n发送超大群消息时,不能将 inclusive 设置为 false。",
"default": true
},
"visible_to_new_member": {
"type": "boolean",
"default": false,
"description": "新进群成员是否可见该消息。默认为 false,即新进群成员不可以查看该定向消息。若设置为 true,则新进群成员若可以查询该定向消息,可以通过云端历史相关接口查询到该消息。\n当 inclusive 为 true 时,不能同时设置 visible_to_new_member 为 true。即发送定向列表为可见的定向消息时,只能由定向列表中成员接收和查看。\n发送超大群消息时,不能将 visible_to_new_member 设置为 true。",
"title": "新进群成员是否可见该消息"
}
},
"x-apifox-orders": [
"receiver_account_ids",
"inclusive",
"visible_to_new_member"
],
"title": "群定向消息配置项。",
"description": "该功能需要单独开通。"
},
"check_team_member_valid": {
"type": "boolean",
"description": "发送群定向消息时,是否需要验证定向成员的群成员身份。默认为 true,即需要验证群成员身份。",
"title": "是否校验定向成员合法性"
}
},
"x-apifox-orders": [
"sender_no_sense",
"receiver_no_sense",
"extension",
"message",
"message_config",
"route_config",
"push_config",
"antispam_config",
"p2p_option",
"team_option",
"superteam_option",
"robot_config",
"01JFSCQ2KZSC3XXJ3PE5DD5S86",
"target_option",
"check_team_member_valid",
"thread_config"
],
"x-apifox-refs": {
"01JFSCQ2KZSC3XXJ3PE5DD5S86": {
"$ref": "#/definitions/138813602"
}
},
"required": [
"message",
"check_team_member_valid"
]
}'{
"code": 0,
"msg": "string",
"data": {
"message_server_id": 0,
"message_client_id": "string",
"message_type": 0,
"text": "string",
"attachment": {
"ext": "string",
"size": 0,
"name": "string",
"width": 0,
"url": "string",
"md5": "string",
"height": 0
},
"sub_type": 0,
"sender_id": "string",
"conversation_type": 0,
"receiver_id": "string",
"create_time": 0,
"thread_config": {
"thread_root": {
"sender_id": "string",
"receiver_id": "string",
"create_time": 0,
"message_server_id": 0,
"message_client_id": "string"
},
"thread_reply": {
"sender_id": "string",
"receiver_id": "string",
"create_time": 0,
"message_server_id": 0,
"message_client_id": "string"
}
}
}
}