All Products
Search
Document Center

ApsaraMQ for RocketMQ:CreateAgentConversation

Last Updated:Nov 02, 2026

Creates an agent diagnostic session.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:CreateAgentConversation

create

*All Resource

*

None None

Request syntax

POST /api/v1/conversations HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The create session request.

{"projectId":"rocketmq-diagnosis","title":"Message accumulation troubleshooting"}

clientToken

string

Yes

The client token that ensures idempotence. If you use the same token and parameters within 24 hours, the system returns the result of the first request. If you use the same token but different parameters, the system returns a conflict error. Reuse the token for retries, and use a new token for new operations.

conversation-request-001

title

string

No

The session title.

Message accumulation troubleshooting

initialMessage

object

No

The optional initial message. If specified, the system creates the session and immediately starts the first round of diagnosis.

messageType

string

No

The special message type. Set this parameter to ticket_request to request the agent to draft a ticket. For common issues and draft corrections, omit this parameter. The ticket is submitted after frontend review.

ticket_request

ticketRequestId

string

No

The unique identifier of the ticket request. This parameter must be used together with messageType. The value must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-).

ticket-request-example-001

message

string

Yes

The initial diagnostic message. You must specify at least one of message and images.

Troubleshoot the cause of message accumulation for the instance

clientContext

string

No

The supplementary context from the client.

The alert occurred at 10:00

images

array<object>

No

The images sent with the initial message. You can send up to two images. The recommended maximum size for each original image is 2 MiB.

object

No

mediaType

string

Yes

The media type of the image.

image/png

dataBase64

string

Yes

The Base64-encoded data of the image, excluding the data URL prefix.

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVR4nGNgAAIAAAUAAXpeqz8AAAAASUVORK5CYII=

Response elements

Element

Type

Description

Example

object

id

string

The session ID.

0198c8a91f4d7f01a3c21e97

conversationId

string

The resource ID of the diagnostic conversation, which is the same as the session ID.

0198c8a91f4d7f01a3c21e97

title

string

The session title.

Message accumulation troubleshooting

scenarioId

string

The diagnostic scenario ID.

diagnosis

currentRunStatus

string

The current execution status.

running

createdAt

string

The creation time.

2026-08-19T12:00:00.000Z

updatedAt

string

The update time.

2026-08-19T12:00:00.000Z

runId

string

The ID of the run started by the initial message. This parameter is not returned if initialMessage is not specified.

0198c8a91f4d7f01a3c21e98

Examples

Success response

JSON format

{
  "id": "0198c8a91f4d7f01a3c21e97",
  "conversationId": "0198c8a91f4d7f01a3c21e97",
  "title": "Message accumulation troubleshooting",
  "scenarioId": "diagnosis",
  "currentRunStatus": "running",
  "createdAt": "2026-08-19T12:00:00.000Z",
  "updatedAt": "2026-08-19T12:00:00.000Z",
  "runId": "0198c8a91f4d7f01a3c21e98"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.