CancelAiCallDetails

Updated at:

This operation cancels calls from a call task. You cannot cancel a call if its detail record is already in the pending call queue or is in progress.

Operation description

  • Use this operation to cancel calls. Alternatively, you can manually cancel calls in the console by navigating to Call Task Management > Manage > Execution Records > Pending.

  • Before calling this operation, ensure you have created a call task and imported callee data.

  • If you have not created a call task, you can create one and import callee data on the Call Task Management page. You can also call the CreateAiCallTask and ImportTaskNumberDatas operations.

  • Canceling a call task may affect your business. Please proceed with caution.

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

aiccs:CancelAiCallDetails

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TaskId

string

Yes

The task ID. You can view the task ID on the Call Task Management page or obtain it by calling the QueryAiCallTaskPage operation.

138************

DetailIdList

array

No

A list of detail IDs. If you specify this parameter, BatchId and PhoneNumbers are ignored.

string

No

The detail ID. You can find the detail ID in the upper-left corner of the page after you navigate to Call Task Management > Details > Execution Record > Completed > Call Details, or obtain it by calling the QueryAiCallDetailPage API.

12131231*****

BatchId

string

No

The batch ID. This ID is returned when you import callee data. You can find the task batch ID on the Call Task Management>Details>Execution Record page, or use the import batch ID that is returned by the ImportTaskNumberDatas API operation. If DetailIdList is specified, this parameter is invalid.

4253331213*****

PhoneNumbers

array

No

A list of phone numbers. This parameter takes effect only when BatchId is also specified.

string

No

The phone number of the call that you want to cancel. This must be a phone number from the imported callee data.

180*******

Response elements

Element

Type

Description

Example

object

AccessDeniedDetail

string

The detailed reason why the access was denied.

None

Message

string

The message returned for the request.

成功

RequestId

string

The request ID.

46C98E28-9239-5D95-AC76-648B8FD4889A

Data

object

The returned data.

TotalCount

integer

The total number of items.

50

FailedDetails

object

Details about the failed cancellations. This is a map where the key is the failed detail ID or phone number, and the value is the reason for the failure.

{ "176********": "明细记录当前状态不可取消" }

FailedCount

integer

The number of calls that could not be canceled.

75

SucceedCount

integer

The number of calls that were successfully canceled.

81

ResultCode

string

The result code of the cancellation. Valid values:

  • ALL_FAILED: All cancellations failed.

  • ALL_SUCCEED: All cancellations succeeded.

  • PART_FAILED: Some cancellations failed.

Valid values:

  • ALL_FAILED :
  • ALL_SUCCEED :
  • PART_FAILED :

PART_FAILED

Code

string

The status code.

OK

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request succeeded.

  • false: The request failed.

false

Examples

Success response

JSON format

{
  "AccessDeniedDetail": "None",
  "Message": "成功",
  "RequestId": "46C98E28-9239-5D95-AC76-648B8FD4889A",
  "Data": {
    "TotalCount": 50,
    "FailedDetails": {
      "176********": "明细记录当前状态不可取消"
    },
    "FailedCount": 75,
    "SucceedCount": 81,
    "ResultCode": "PART_FAILED"
  },
  "Code": "OK",
  "Success": false
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.