URL:
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:
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 |
NAME | DESCRIPTION | TYPE |
---|---|---|
id_campaing | Corresponds to the campaign identification number | String |
name_campaing | Campaign name | String |
$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;
curl --location --globoff 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=create_campaign&type_campaign={{type_campaign}}' \
--header 'wolkvox_server: {{wolkvox_server}}' \
--header 'wolkvox-token: {{wolkvox-token}}' \
--header 'Content-Type: application/json' \
--data '{
"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}}"
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"campaign_name\": \"{{campaign_name}}\",\r\n \"campaign_description\": \"{{campaign_description}}\",\r\n \"start_time\": \"{{start_time}}\",\r\n \"end_time\": \"{{end_time}}\",\r\n \"skill_id\": \"{{skill_id}}\",\r\n \"opt1\": \"{{opt1}}\",\r\n \"opt2\": \"{{opt2}}\",\r\n \"opt3\": \"{{opt3}}\",\r\n \"opt4\": \"{{opt4}}\",\r\n \"opt5\": \"{{opt5}}\",\r\n \"opt6\": \"{{opt6}}\",\r\n \"opt7\": \"{{opt7}}\",\r\n \"opt8\": \"{{opt8}}\",\r\n \"opt9\": \"{{opt9}}\",\r\n \"opt10\": \"{{opt10}}\",\r\n \"opt11\": \"{{opt11}}\",\r\n \"opt12\": \"{{opt12}}\",\r\n \"enable_edition\": \"{{enable_edition}}\"\r\n}");
Request request = new Request.Builder()
.url("https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=create_campaign&type_campaign={{type_campaign}}")
.method("POST", body)
.addHeader("wolkvox_server", "{{wolkvox_server}}")
.addHeader("wolkvox-token", "{{wolkvox-token}}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
import requests
import json
url = "https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=create_campaign&type_campaign={{type_campaign}}"
payload = json.dumps({
"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}}"
})
headers = {
'wolkvox_server': '{{wolkvox_server}}',
'wolkvox-token': '{{wolkvox-token}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
{
"code": 201,
"error": null,
"msg": "The # campaign_id has been created successfully",
"data": [
{
"id_campaign": "",
"name_campaign": ""
}
]
}
Sao Paulo +55 (11) 521 75 933
Santiago de Chile +56 (2) 240 533 89
Medellín +57 (604) 322 98 80
Ciudad de Guatemala +502 (2) 3141344
Ciudad de México +52 (55) 8526 36 34
Copyright © 2023 MICROSYSLABS. 1820 N Corporate Lakes Blvd, unit 205. Weston, FL 33326
COLOMBIA
Medellín +57 (4) 322 98 80
Bogotá +57 (1) 381 90 40
Cali +57 (2) 891 28 46
Barranquilla +57 (5) 316 10 34
ARGENTINA
Buenos Aires +54 (11) 5217 5933
SPAIN
Madrid +34 (910) 601 691
MEXICO
Ciudad de México +52 (55) 8526 36 34
BRASIL
Brasilia +55 (61) 9836 4127
São Paulo +55 (12) 9811 155 83
UNITED STATES
New York +1 (914) 373 71 36
DOMINICAN REPUBLIC
Santo Domingo +1 (829) 249 69 68
CHILE
Santiago de Chile +56 (2) 240 533 89
GUATEMALA
Ciudad de Guatemala +502 (2) 314 1344
PERU
Lima +51 (1) 644 91 39
Copyright © 2023 MICROSYSLABS S.A.S.
Cra 30 # 4A – 45 Of. 205 Ed. FOREVER W&L, Medellín, Colombia