fbpx
Search
Close this search box.
Search
Close this search box.

< / >

APIs Campaign

4. Campaign creation En

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.
REQUEST
NAME DESCRIPTION TYPE
type_campaign (URL) Type of campaign (Preview / Predictive) String
campaign_name Campaign name String
campaign_description Description of the campaign String
start_time Campaign start time String
end_time Final hour of the campaign String
skill_id Refers to the numerical identification of the skill String
opt# Additional field where you enter additional campaign information String
enable_edition Yes or no to enable campaign editing String
RESPONSE
NAME DESCRIPTION TYPE
id_campaing Corresponds to the campaign identification number String
name_campaing Campaign name String
Posibles códigos de respuesta
				
					$curl = curl_init();

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

Hacemos uso de cookies, si continúas navegando asumiremos que estás de acuerdo. Puede leer más sobre el uso de cookies en nuestras políticas de privacidad y tratamiento de datos personales

Hacemos uso de cookies, si continúas navegando asumiremos que estás de acuerdo. Puede leer más sobre el uso de cookies en nuestras políticas de privacidad y tratamiento de datos personales