Search
Close this search box.

< / >

APIs Campaign

4. Campaign creation

URL:

https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=create_campaign&type_campaign={{type_campaign}}

Description:

With this API it is possible to create preview or predictive campaigns in wolkvox manager from external platforms.

Benefit:

Use this API to be more efficient in the process of creating preview or predictive campaigns, in case you have an external platform where they provide the necessary information.

How it works:

  • The consumption of this API is done by POST method.
  • In the json the parameters are added according to the operation or process to be performed.
  • To consume this API you must replace in the url {{{wolkvox_server}} by the nomenclature of the server of the operation.
  • The wolkvox-token header must be used to make use of the authorization token.
  • Note that the same token cannot be consumed simultaneously, so you can schedule the next API to be consumed when the result of the previous one is successful.
  • Limit of records that can be downloaded per consumption: 60,000 records.
  • Limit of records that can be uploaded per consumption: 10,000 records.
  • Limit of days queried in dates: 31 days.
  • Limit of result weight: 256 MB.
  • API consumption time limit: 60 seconds.
  • Concurrent consumption limit of a token: 2 simultaneous requests.
  • Daily limit of tokens: Number of licenses multiplied by 1000 daily tokens.

Request

NAME DESCRIPTION TYPE
type_campaign (URL) Campaign type. This field can take the values “preview” or “predictive”. String
campaign_name Campaign name String
campaign_description Description of the campaign String
start_time Campaign start time in the format {{hhiiss}}. This field only applies to “predictive” type campaigns as “preview” campaigns do not have a runtime. String
end_time End time of the campaign in the format {{hhiiss}}. This field only applies to “predictive” type campaigns since “preview” type campaigns do not have runtime. String
skill_id Refers to the numerical identification of the skill String
opt# Additional field where you enter additional campaign information String
amd This optional field (for predictive campaigns) allows you to specify the AMD (Answering Machine Detection) configuration based on the target country where the customers uploaded to the campaign are located. The available options are: “ARG”, “CHL”, “COL”, “CRI”, “ECU”, “ESP”, “GTM”, “HND”, “ITA”, “MEX”, “NIC”, “PAN” and “PER”. If this field is not defined, the campaign will be created with default AMD. String
enable_edition Allows enabling campaign editing, this field accepts the values “yes” and “no”. String

Response

NAME DESCRIPTION TYPE
id_campaing Corresponds to the campaign identification number String
name_campaing Campaign name String
Possible response codes
				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=create_campaign&type_campaign={{type_campaign}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "campaign_name": "{{campaign_name}}",
    "campaign_description": "{{campaign_description}}",
    "start_time": "{{start_time}}",
    "end_time": "{{end_time}}",
    "skill_id": "{{skill_id}}",
    "opt1": "{{opt1}}",
    "opt2": "{{opt2}}",
    "opt3": "{{opt3}}",
    "opt4": "{{opt4}}",
    "opt5": "{{opt5}}",
    "opt6": "{{opt6}}",
    "opt7": "{{opt7}}",
    "opt8": "{{opt8}}",
    "opt9": "{{opt9}}",
    "opt10": "{{opt10}}",
    "opt11": "{{opt11}}",
    "opt12": "opt12",
    "enable_edition": "{{enable_edition}}"
}',
  CURLOPT_HTTPHEADER => array(
    'wolkvox_server: {{wolkvox_server}}',
    'wolkvox-token: {{wolkvox-token}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

				
			

RESPONSE

				
					{
    "code": 201,
    "error": null,
    "msg": "The # campaign_id has been created successfully",
    "data": [
        {
            "id_campaign": "",
            "name_campaign": ""
        }
    ]
}
				
			
We use cookies, if you continue browsing we will assume that you agree. You can read more about the use of cookies in our privacy policies and treatment of personal data