Update an ingress connection¶
Update an ingress connection.
PATCH https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/ingress-connections/{connection_id}
Before you call this API¶
Prepare a personal access token with access to the target workspace and permission for the action. The path workspace must match X-Workspace-ID. Examples use jq. See common information for variables, objects, and states.
Request body¶
curl -X PATCH "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/ingress-connections/$CONNECTION_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
--data-binary "$(jq -n --argjson ASSOCIATION_VERSION "$ASSOCIATION_VERSION" --argjson CONFIG_VERSION "$CONFIG_VERSION" '
{
"expected_association_version": $ASSOCIATION_VERSION,
"expected_config_version": $CONFIG_VERSION,
"enabled": false
}
')"
Submit at least one of enabled, agent_model, or managed_stream. Slack updates accept only app_token/bot_token, Feishu only app_secret, and WeCom only secret. Do not resubmit App ID/Bot ID from the creation object. config_version increases on success. Reread before the next operation.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
association_version from the latest connection details; must be greater than 0. |
|
integer |
Yes |
config_version from the latest connection details; must be greater than 0. |
|
boolean |
No |
Enable or disable; omission retains the value. |
|
string |
No |
Only agent targets support model changes. |
|
object |
No |
Only managed mode supports updating the secrets allowed by the platform. |
Successful response¶
{
"code": 0,
"data": {
"id": "ingress_example",
"workspace_id": "workspace_example",
"target": {
"kind": "agent",
"workspace_id": "workspace_example",
"id": "agent_example"
},
"provider": "slack",
"channel_type": "slack_app",
"receive_mode": "managed_stream",
"agent_model": "model_example",
"association_version": 1,
"connected_by_user_id": "user_example",
"enabled": false,
"account_identity": "slack:app:app_example",
"config_version": 2,
"desired_state": "disabled",
"observed_state": "stopped",
"created_at": "2026-11-11T00:00:00Z",
"updated_at": "2026-11-11T00:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success. |
|
object |
Result object; see common objects for fields. |
Error responses¶
Handle the HTTP status, business result, and error fields as described in errors and environments. On source or version conflicts, read the current state. Do not automatically replace identities, resources, or request IDs and retry.