CreateAiCallTask

Updated at:

Creates a voice call task.

Operation description

Before creating a voice call task, use an agent to perform a test call to ensure that the results meet your requirements.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

TaskName

string

Yes

The name of the task. The name must be unique within the same account.

Test task

AgentId

string

No

The code of the online agent.

1180**************

VirtualNumber

string

No

The service instance used for outbound calls.

032712122*****

StartType

string

Yes

The start method. Valid values:

  • IMMEDIATE: Starts immediately.

  • SCHEDULE: Starts at a scheduled time.

SCHEDULE

MissCallRetry

boolean

No

Specifies whether to enable retry. Valid values:

  • true: Yes.

  • false (default): No.

false

CallRetryReason

array

No

The list of reasons for retrying failed calls.

string

No

The specific reason for retry. Valid values:

  • CALL_REJECTED: The call is rejected.

  • USER_BUSY: The callee is busy.

  • SUSPEND: The number is suspended.

  • INVALID_NUMBER: The number is invalid.

  • POWERED_OFF: The phone is powered off.

  • NETWORK_BUSY: The network is busy.

  • NO_ANSWER: There is no answer.

CALL_REJECTED

CallRetryTimes

integer

No

The number of retries. The maximum value is 3.

2

CallRetryInterval

integer

No

The retry interval. Unit: minutes. The maximum value is 720.

32

CallTime

array

Yes

The list of callable time periods.

string

No

The callable time period. Format:

{"startTime":"09:00:00","endTime":"10:00:00"}

startTime specifies the start time, and endTime specifies the end time. Outbound call scheduling is initiated only within this time period. Otherwise, the system waits until the next schedulable time period.

Note
  • Based on carrier policies, the final execution time is subject to platform scheduling. You can view the restricted calling periods for numbers in Real Number Management.

{"startTime":"09:00:00","endTime":"10:00:00"}

CallableTime

array

No

The list of callable time periods. Each element is represented as a JSON string that contains startTime and endTime.

string

No

The callable time period. It is represented as a JSON string that contains startTime and endTime.

{"startTime":"00:00:00","endTime":"23:59:00"}

CallDay

array

Yes

The list of callable days.

string

No

The callable day. Valid values:

  • MONDAY: Monday.

  • TUESDAY: Tuesday.

  • WEDNESDAY: Wednesday.

  • THURSDAY: Thursday.

  • FRIDAY: Friday.

  • SATURDAY: Saturday.

  • SUNDAY: Sunday.

MONDAY

TaskStartTime

integer

No

The preset start time of the task. The value is a timestamp in milliseconds. This parameter is valid and required only when the StartType parameter is set to SCHEDULE. The task automatically starts at the time specified by this parameter.

12313123133

TaskCps

integer

No

The task concurrency. The maximum value is 500.

75

Source

integer

No

The creation source. Valid values:

  • 0: Created by an agent.

  • 1: Created by an engine.

0

ApplicationCode

string

No

The application code. This parameter is used when the creation source is engine creation.

025****C98

PhoneType

integer

No

The number type. This parameter is used when the creation source is engine creation. Valid values:

  • 0: Alibaba Cloud number.

  • 1: Customer-provided line.

0

LineEncoding

string

No

The line encoding.

JILIANG_***_***_NET

LinePhoneNum

string

No

The customer-provided line number.

152****3120

CallExpireType

integer

No

The validity period type for outbound calls. Valid values:

  • 0: Permanently valid.

  • 1: Valid for a specified period after import.

  • 2: Valid until a specified time.

0

CallExpireMinutes

integer

No

The expiration duration for outbound call details. Unit: minutes.

10

CallExpireDate

string

No

The expiration date for outbound call details, which is the specific cutoff time. Format: YYYY-MM-DD HH:mm:ss.

2026-07-30 20:00:20

Response elements

Element

Type

Description

Example

object

AccessDeniedDetail

string

The detailed reasons for access denial.

None

Message

string

The status code description.

Success

RequestId

string

The request ID.

8C93B345-F702-5449-BA7E-7D110D4BF798

Data

integer

The task ID.

1213123123*****

Code

string

The request status code.

OK

Success

boolean

Indicates whether the API call is successful. Valid values:

  • true: Successful.

  • false: Failed.

true

Examples

Success response

JSON format

{
  "AccessDeniedDetail": "None",
  "Message": "Success",
  "RequestId": "8C93B345-F702-5449-BA7E-7D110D4BF798",
  "Data": 0,
  "Code": "OK",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.