Import Speed Dial Numbers
Import speed dial numbers from a CSV file.
Steps to import speed dial numbers
- Prepare a CSV file containing the speed dial numbers
- Import the CSV file using the interface
Request URL
POST {base_url}/{api_path}/speed_dial/import?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| file | Yes | File | The CSV file containing the speed dial numbers to import. |
| format | Yes | String | The format of the file to import. Valid value:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| file | String | The name of the CSV file. This field is returned only if any records fail to import. |
| download_resource_url | String | The download URL of the file containing the records that failed to import. This field is returned only if any records fail to import. |
Example
Request example
POST /openapi/v1.0/speed_dial/import?access_token=KHlhDSbuZ75OsFLDUbZHdkE5cIQEcIlK HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
------ExampleBoundary
Content-Disposition: form-data; name="file"; filename="speed_dial.csv"
Content-Type: text/csv
Speed Dial Number,Phone Number,Remark
1,1000,Test
------ExampleBoundary
Content-Disposition: form-data; name="format"
csv
------ExampleBoundary--
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}