AssignJobsAsync

Updated at:

Asynchronously creates outbound jobs.

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

outboundbot:AssignJobsAsync

create

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the instance.

12f3dd08-0c55-44ce-9b64-e69d35ed3a76

JobGroupId

string

Yes

The ID of the job group.

d004cfd2-6a81-491c-83c6-cbe186620c95

StrategyJson

string

No

A JSON string that defines the job group execution strategy. This object has the following properties:

  • repeatBy

Specifies the repetition frequency. Valid values include Once (does not repeat), Day (repeats daily), Week (repeats weekly), and Month (repeats monthly).

  • startTime

The start time of the execution strategy.

  • endTime

The end time of the execution strategy.

  • workingTime

The time range during which outbound calls can be made.

  • maxAttemptsPerDay

The maximum number of daily call attempts for a single phone number.

  • minAttemptInterval

The minimum interval between retry attempts, in minutes.

  • routingStrategy

The routing strategy for calling numbers. Valid values: None (not specified), LocalFirst (prioritizes numbers in the same city), and LocalProvinceFirst (prioritizes numbers in the same province).

  • repeatDays

The days on which the job repeats. If repeatBy is set to Week, valid values are 0 for Sunday and 1 to 6 for Monday to Saturday. If repeatBy is set to Month, valid values are 1 to 31. If a specified day does not exist in a given month (e.g., February 30), the job is skipped for that month.

  • repeatable

Specifies whether to enable recurring jobs. Valid values: true and false.

{"maxAttemptsPerDay":"3","minAttemptInterval":"10","routingStrategy":"LocalProvinceFirst","repeatDays":["1","2","3"],"workingTime":[{"beginTime":"10:00:00","endTime":"11:00:00"},{"beginTime":"14:00:00","endTime":"15:00:00"}],"repeatable":true,"endTime":1707494400000,"startTime":1706976000000,"repeatBy":"Week"}

CallingNumber

array

No

The list of calling numbers to be displayed to callees.

Note

If you omit this parameter, the system uses all available calling numbers by default.

string

No

A calling number.

4008013260

JobsJson

array

Yes

A JSON array containing job data. For the required format, see the example.

Each JSON object in the array represents a job for a single contact.

string

Yes

A JSON object representing a single job. This object contains the following properties:

  • key: The name of the custom variable.

  • value: The value of the custom variable.

contacts: (Required) A list containing the contact information for the callee.

  • phoneNumber: (Required) The phone number of the callee. If number encryption is required, provide the encrypted phone number.

  • referenceId: (Required) A user-defined unique identifier for the contact. This ID helps prevent duplicate entries.

  • role: (Optional) The contact's role. If unspecified, no role is assigned.

  • honorific: (Optional) The contact's honorific (e.g., Mr., Ms.).

  • name: (Optional) The contact's name.

  • encryptedAesKey: (Optional) The encrypted AES key. Use this when number encryption is enabled.

{ "extras": [{ "value": "测试", "key": "测试" }, { "key": "ServiceId", "value": null }, { "key": "TenantId", "value": null }], "contacts": [{ "phoneNumber": "134*******", "name": "张三", "referenceId": "C01", "role": "客户1", "honorific": "老张" }] }

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The request ID.

254EB995-DEDF-48A4-9101-9CA5B72FFBCC

HttpStatusCode

integer

The HTTP status code.

200

Success

boolean

Indicates whether the request was successful.

true

Code

string

The API status code.

OK

Message

string

The API response message.

Success

AsyncTaskId

string

The asynchronous task ID.

12f3dd08-0c55-44ce-9b64-e69d35ed3a76

Examples

Success response

JSON format

{
  "RequestId": "254EB995-DEDF-48A4-9101-9CA5B72FFBCC",
  "HttpStatusCode": 200,
  "Success": true,
  "Code": "OK",
  "Message": "Success",
  "AsyncTaskId": "12f3dd08-0c55-44ce-9b64-e69d35ed3a76"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.