JSON API » bulk » bulk/campaigns/create

Creates a new bulk campaign.

Input parameters

Requires authentication and the administrator role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
nameStringName.Yes
dtypeStringDestination type.Yes
dnumberStringDestination number.Yes
attemptsIntegerNumber of times to try each destination.No1
calleridStringCallerid to send.NoEmpty string.
customerIntegerID of customer to create in.NoCustomer of authentication user.
descriptionStringDescription.NoEmpty string.
enabledInteger1 to start calls if possible, 0 not to.No1
machineStringWhat 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".
maximumIntegerThe maximum concurrent calls to make.No1
ownerIntegerID of owner. 0 for none.No0
recordgroupIntegerID of record group. 0 for none.No0
retryIntegerHow many seconds to retry after.No3600
successString"answer" to consider a destination successful on answer, "key" to consider it successful when a key is pressed.No"answer"
timegroupIntegerID of time group. 0 for none.No0
validationInteger1 to validate input then return, 0 for full action.No0

For each type, only some of the matching fields are used. See the web interface to determine which.

Responses

CodeDescription
200Success.
201Input passed validation. Only returned if validation=1.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your 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

VersionChanges
3.13Function added.