JSON API » bulk » bulk/campaigns/create
Creates a new bulk campaign.
Input parameters
Requires authentication and the administrator role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
name | String | Name. | Yes | |
dtype | String | Destination type. | Yes | |
dnumber | String | Destination number. | Yes | |
attempts | Integer | Number of times to try each destination. | No | 1 |
callerid | String | Callerid to send. | No | Empty string. |
customer | Integer | ID of customer to create in. | No | Customer of authentication user. |
description | String | Description. | No | Empty string. |
enabled | Integer | 1 to start calls if possible, 0 not to. | No | 1 |
machine | String | What to do if an answering machine is detected. Empty string to disable detection, "failed" to mark the destination failed, "retry" to retry later, "success" to mark the destination as successful. | No | "failed". |
maximum | Integer | The maximum concurrent calls to make. | No | 1 |
owner | Integer | ID of owner. 0 for none. | No | 0 |
recordgroup | Integer | ID of record group. 0 for none. | No | 0 |
retry | Integer | How many seconds to retry after. | No | 3600 |
success | String | "answer" to consider a destination successful on answer, "key" to consider it successful when a key is pressed. | No | "answer" |
timegroup | Integer | ID of time group. 0 for none. | No | 0 |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
For each type, only some of the matching fields are used. See the web interface to determine which.
Responses
Code | Description |
---|---|
200 | Success. |
201 | Input passed validation. Only returned if validation=1. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan does not allow this. |
Data returned
The ID of the created campaign.
Example: With required parameters
http://enswitch.example.com/api/json/bulk/campaigns/create/?auth_username=user;auth_password=password;name=example;dtype=mailbox;dnumber=1234{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123 } }
Change history
Version | Changes |
---|---|
3.13 | Function added. |