CreateAiCallTask

更新时间:
复制 MD 格式

Creates a call task.

Operation description

Before creating a call task, make a test call with an agent to ensure 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. It must be unique within an account.

测试任务

AgentId

string

Yes

The ID of a published agent.

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

VirtualNumber

string

Yes

The service instance used for outbound calls.

032712122*****

StartType

string

Yes

The startup mode. Valid values:

  • IMMEDIATE: Starts the task immediately.

  • SCHEDULE: Starts the task at a scheduled time.

Valid values:

  • SCHEDULE :
  • IMMEDIATE :

SCHEDULE

MissCallRetry

boolean

No

Specifies whether to enable retry. Valid values:

  • true: Enables retry.

  • false (default): Disables retry.

false

CallRetryReason

array

No

The failure reasons that trigger a retry.

string

No

The specific reason for the retry. Valid values:

  • CALL_REJECTED: Call rejection.

  • USER_BUSY: User busy.

  • SUSPEND: Suspended service.

  • INVALID_NUMBER: Invalid number.

  • POWERED_OFF: Powered off.

  • NETWORK_BUSY: Network busy.

  • NO_ANSWER: No answer.

Valid values:

  • CALL_REJECTED :
  • USER_BUSY :
  • SUSPEND :
  • INVALID_NUMBER :
  • POWERED_OFF :
  • NETWORK_BUSY :
  • NO_ANSWER :

CALL_REJECTED

CallRetryTimes

integer

No

The number of retries. The maximum value is 3.

2

CallRetryInterval

integer

No

The retry interval, in minutes. The maximum value is 720.

32

CallTime

array

Yes

The list of callable time periods.

string

No

The callable time period, in the following JSON format:

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

The system makes outbound calls only during this period. If the current time is outside the specified period, the system waits for the next callable period.

Note
  • In compliance with carrier policies, the actual execution time is subject to platform scheduling. You can view the restricted calling periods for your numbers in Real Number Management.

{"startTime":"09:00:00","endTime":"10:00: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.

Valid values:

  • WEDNESDAY :
  • MONDAY :
  • THURSDAY :
  • SUNDAY :
  • TUESDAY :
  • FRIDAY :
  • SATURDAY :

MONDAY

TaskStartTime

integer

No

The scheduled start time for the task, specified as a timestamp in milliseconds. This parameter is required and applies only when StartType is set to SCHEDULE.

12313123133

TaskCps

integer

No

The task concurrency. The maximum value is 500.

75

Response elements

Element

Type

Description

Example

object

AccessDeniedDetail

string

The detailed reason for the access denial.

None

Message

string

The response message.

成功

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 succeeded.

  • true: The call succeeded.

  • false: The call failed.

true

Examples

Success response

JSON format

{
  "AccessDeniedDetail": "None",
  "Message": "成功",
  "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.