Update Workflow Type

Last Updated on : 2026-02-26 09:16:25download

Based on the device ID, update the workflow type of the specified agent role.

API address

PUT: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/role-workflow

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringpathtrueThe ID of the specified device.

Description of body

Parameter nameTypeINRequiredDescription
bind_role_typeIntegerbodytrueThe type of role to bind. Valid values:
  • 0: Custom role
  • 1: Template-based role
  • 2: Single role (There is no role, and data is at the agent level)
When role_id has a value, this parameter value must be passed.
role_idStringbodytrueThe ID of the specified role.
workflowStringbodytrueThe workflow type. Valid values:
  • asr-llm-tts: Voice input, large model processing, and then voice return
  • asr-llm: Voice input, large model processing, and then text return

Return parameter

Parameter nameTypeDescription
resultbooleanIndicates whether the operation is successful.

Request example

PUT: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/role-workflow
{
  "device_id": "6c3585ebfe301b40a8u***",
  "role_id": "94300***",
  "bind_role_type": 1,
  "workflow": "asr-llm-tts"
}

Return example

{
    "tid": "6fa034fc1a6d11f0a8212220de940dcb",
    "result": true,
    "t": 1744771778112,
    "success": true
}

Error code

For more information, see error code.