Help Center/ Cognitive Engagement Center/ API Reference/ Agent Workbench Interface Reference/ Agent Bidirectional Calls/ Creating a Voice Outbound Call (V1.0.0) (createVoiceNotification)
Updated on 2023-09-27 GMT+08:00

Creating a Voice Outbound Call (V1.0.0) (createVoiceNotification)

Scenario

This interface is invoked to create a voice outbound call.

Method

POST

URI

https://Domain name/apiaccess/rest/voiceNotification/v1/createVoiceNotification (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

X-APP-Key

String

No

App key, which is the user ID.

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

called

String

Yes

Called number of an outbound call.

Length limit: string (32)

2

voiceContent

String

Yes

Voice ID.

Length limit: string (1024)

3

callBackUrl

String

No

Callback URL.

Length limit: string (256)

The IP address and port number, or domain name of the callback URL must have been added to the mobile agent callback URL trustlist by the system administrator.

4

callerPresent

String

No

CLIP number on the user side.

Length limit: string (32)

5

priority

String

No

Playback priority of a voice notification.

The value is an integer ranging from 1 to 9. The default value is 9. A smaller value indicates a higher priority.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

retCode

String

No

Result code. The value 0 indicates success, and other values indicate failure.

1.2

retMsg

String

No

Failure cause.

1.3

result

Object

No

Result content.

1.3.1

callSerialNo

String

No

Call SN.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

Request header:

x-app-key:9******************************3  
Authorization:Bearer 9******************************7  

Request parameters:

{
	"called": "8899",
	"voiceContent": "100001",
	"callerPresent": "2222201",
	"callBackUrl": "http://xx.xx.xx.xx:8800/callbackTest"
}
Response parameters:
{
	"retMsg": "Created successfully.",
	"retCode": "0",
        "result": {"callSerialNo": "1308434073450058757"}
}