CreateTask

Updated at:

Create an Artificial Intelligence Cloud Call Service robot outbound calling job.

Operation description

  • You can invoke this API to create a job, or create one in the Artificial Intelligence Cloud Call Service console > Outbound Robot (Standard Edition) > Task Management by clicking Create Job.

  • After invoking this API, the Data field in the response contains the unique job ID of the robot outbound calling task.

Queries per second (QPS) limits

  • Per-user invocation frequency: No rate limiting.

  • API frequency: 500 queries per second (QPS).

Note

If the total invocations from multiple users exceed the API frequency limit, throttling will be triggered.

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:CreateTask

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TaskName

string

Yes

Task Name. Supports Chinese and English characters. Length: 0 to 30 characters.

测试任务

RobotId

string

Yes

ID of the specified robot (script ID), indicating which robot script to use for initiating calls.

You can obtain the script ID on the Script Management page in the console.

12****

Caller

string

Yes

Outbound caller number.

Note

The number must be a purchased number. Separate multiple numbers with commas (,).

0571****5678,0571****5679

CallString

string

No

Call string (callee information and parameter list). Valid values:

  • LIST: 05715678****,05715679****

  • JSON: {"ParamNames":["name","age"],"CalleeList":[{"Callee":"1810000****","Params":["Zhang San","20"]},{"Callee":"1810001****","Params":["Li Si","21"]}]}. In this example, ParamNames represents the List of Parameter Names; Params represents the List of parameter values.

Note
  • The order of the Parameter Name List and the parameter value List must correspond.

  • A maximum of 1 000 callee numbers is allowed.

{"ParamNames":["name","age"],"CalleeList":[{"Callee":"1810000****","Params":["张三","20"]},{"Callee":"1810001****","Params":["李四","21"]}]}

CallStringType

string

Yes

Call string type. Valid values:

  • LIST

  • JSON

JSON

RetryFlag

integer

No

Whether to enable automatic retry. Valid values:

  • 1: Retry.

  • 0: No retry.

1

RetryCount

integer

No

Retry Count.

2

RetryInterval

integer

No

Retry interval. Unit: minute. Must be greater than 1.

2

RetryStatusCode

string

No

Call statuses that require redialing. Separate multiple statuses with commas (,). Valid values:

  • 200010: Power off

  • 200011: Service suspended

  • 200002: Busy

  • 200012: Call failed

  • 200005: Unable to connect

  • 200003: No acknowledgement

200010,200011

StartNow

boolean

No

Indicates whether to start immediately.

  • true: Yes.

  • false: No.

是

WorkTimeList

string

Yes

List of working hours (accurate to the minute).

10:00-12:00,13:00-14:00

WorkDay

string

Yes

Work day. Valid values:

  • 1: Monday.

  • 2: Tuesday.

  • 3: Wednesday.

  • 4: Thursday.

  • 5: Friday.

  • 6: Saturday.

  • 7: Sunday.

1

SeatCount

string

Yes

Concurrency (number of agents).

3

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Request ID.

EE338D98-9BD3-4413-B165

Message

string

Description of the status code.

OK

Data

integer

Unique job ID of the robot outbound calling task.

12****

Code

string

Request status code. A return value of "OK" indicates that the request succeeded.

OK

Success

boolean

Indicates whether the API call succeeded.

  • true: Succeeded.

  • false: Failed.

true

Examples

Success response

JSON format

{
  "RequestId": "EE338D98-9BD3-4413-B165",
  "Message": "OK",
  "Data": 0,
  "Code": "OK",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 PermissionInsufficient Insufficient permissions. Please contact the Alibaba Cloud account administrator.
400 ParameterError The parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.