Connects a DingTalk, WeCom, Feishu or Slack bot to an agent. The integration is enabled at once and starts in status pending. DingTalk, Feishu and Slack credentials are verified with the platform before anything is saved (an access-token exchange or auth.test — no message is sent); WeCom credentials are checked by connecting, so follow status with Get IM Integration. A bot can be connected only once. You also need write access to read_write_project_id and search access to each read-only project.
Permission required:workspace:integration_manage on workspace_id
When you set read_write_project_id: project:mem_add on read_write_project_id
When you set read_only_project_ids: project:mem_search on read_only_project_ids
Headers
string
Optional. Retrying with the same value replays the first result instead of creating a second integration. Credential values are not compared.
Request Body
string
required
Agent that answers messages sent to the bot
string
required
IM platform. Must be enabled on this deployment. One of: dingtalk, wecom, feishu, slack.
object
required
Write-only. dingtalk: appKey + appSecret; feishu: appId + appSecret; slack: botToken + appToken; wecom: botId + secret. DingTalk, Feishu and Slack credentials are verified with the platform before saving.
Show Integration Credentials object
string
Feishu: App ID. Identifies the bot; cannot change after creation.
string
DingTalk: Client ID (AppKey). Identifies the bot; cannot change after creation.
IM platform. One of: dingtalk, wecom, feishu, slack.
integer
Creation time, Unix seconds
boolean
Whether credentials are stored. Credentials themselves are write-only and never returned.
integer
Maximum messages this integration handles per day; 0 = unlimited
array
Open-data datasets the agent may use
boolean
Whether the integration should be connected
string
The bot’s identifier on the IM platform (DingTalk Client ID, Feishu App ID, WeCom Bot ID, Slack team:bot-user). Not a secret.
string
Identifier of the integration
string
Display name
array
Additional projects searched (read only)
string
Project that memories extracted from IM conversations are written to
object
Channel-specific settings
Show Integration Settings object
string
DingTalk only: AI card template id. Set it to stream replies into an interactive card; omit or send "" to reply with plain messages.
string
Connection state. pending right after a create or a credential change until the first connection attempt; poll Get IM Integration to follow it. One of: pending, connected, error, disabled.
integer
Last update time, Unix seconds
string
Workspace the integration belongs to. Fixed at creation.
string
Short normalized reason when status is error, for display (Chinese, the console’s wording; it may change). Never contains the platform’s raw response. Use status_error_code in programs.
string
Stable reason code, present whenever status_error is. credentials_invalid: the platform rejected the credentials (fix them); subscribe_rejected: WeCom refused the subscription — wrong credentials or the platform’s rate limit, retried automatically; preempted: another connection took over the bot, usually the same bot connected from another environment; timeout / disconnected / connection_aborted / connection_failed: connection problems, retried automatically; dependency_unavailable: a service this deployment depends on is down, retried automatically; dependency_misconfigured: this deployment lacks something the channel needs (WeCom needs Redis) — contact the operator; internal_error: a fault on our side; unknown: the reason was recorded before codes existed, and is replaced on the next connection attempt. New codes may be added; treat an unrecognised one like connection_failed.