Crear campaña
curl --request POST \
--url https://admintest.inceptia.ai/api/v2/create_campaign/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": 116,
"name": "Campaña de Prueba",
"description": "Descripción de la campaña de prueba.",
"start_date": "2022-01-31",
"call_from": "09:00",
"call_to": "21:00",
"dialing_type": "HORIZONTAL_VERTICAL",
"closes_eod": false,
"min_phone_priority": 0,
"max_phone_priority": 1,
"max_calls_per_case": 3
}
'import requests
url = "https://admintest.inceptia.ai/api/v2/create_campaign/"
payload = {
"client_id": 116,
"name": "Campaña de Prueba",
"description": "Descripción de la campaña de prueba.",
"start_date": "2022-01-31",
"call_from": "09:00",
"call_to": "21:00",
"dialing_type": "HORIZONTAL_VERTICAL",
"closes_eod": False,
"min_phone_priority": 0,
"max_phone_priority": 1,
"max_calls_per_case": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 116,
name: 'Campaña de Prueba',
description: 'Descripción de la campaña de prueba.',
start_date: '2022-01-31',
call_from: '09:00',
call_to: '21:00',
dialing_type: 'HORIZONTAL_VERTICAL',
closes_eod: false,
min_phone_priority: 0,
max_phone_priority: 1,
max_calls_per_case: 3
})
};
fetch('https://admintest.inceptia.ai/api/v2/create_campaign/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admintest.inceptia.ai/api/v2/create_campaign/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 116,
'name' => 'Campaña de Prueba',
'description' => 'Descripción de la campaña de prueba.',
'start_date' => '2022-01-31',
'call_from' => '09:00',
'call_to' => '21:00',
'dialing_type' => 'HORIZONTAL_VERTICAL',
'closes_eod' => false,
'min_phone_priority' => 0,
'max_phone_priority' => 1,
'max_calls_per_case' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://admintest.inceptia.ai/api/v2/create_campaign/"
payload := strings.NewReader("{\n \"client_id\": 116,\n \"name\": \"Campaña de Prueba\",\n \"description\": \"Descripción de la campaña de prueba.\",\n \"start_date\": \"2022-01-31\",\n \"call_from\": \"09:00\",\n \"call_to\": \"21:00\",\n \"dialing_type\": \"HORIZONTAL_VERTICAL\",\n \"closes_eod\": false,\n \"min_phone_priority\": 0,\n \"max_phone_priority\": 1,\n \"max_calls_per_case\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://admintest.inceptia.ai/api/v2/create_campaign/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": 116,\n \"name\": \"Campaña de Prueba\",\n \"description\": \"Descripción de la campaña de prueba.\",\n \"start_date\": \"2022-01-31\",\n \"call_from\": \"09:00\",\n \"call_to\": \"21:00\",\n \"dialing_type\": \"HORIZONTAL_VERTICAL\",\n \"closes_eod\": false,\n \"min_phone_priority\": 0,\n \"max_phone_priority\": 1,\n \"max_calls_per_case\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admintest.inceptia.ai/api/v2/create_campaign/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": 116,\n \"name\": \"Campaña de Prueba\",\n \"description\": \"Descripción de la campaña de prueba.\",\n \"start_date\": \"2022-01-31\",\n \"call_from\": \"09:00\",\n \"call_to\": \"21:00\",\n \"dialing_type\": \"HORIZONTAL_VERTICAL\",\n \"closes_eod\": false,\n \"min_phone_priority\": 0,\n \"max_phone_priority\": 1,\n \"max_calls_per_case\": 3\n}"
response = http.request(request)
puts response.read_body{
"id": 12345,
"name": "Campaña de prueba",
"description": "Descripción de la campaña de prueba.",
"bot": 116,
"conversation_type": "OUTBOUND_VOICE",
"closes_eod": false,
"params": {
"call_from": "09:00:00",
"call_to": "21:00:00",
"max_calls_per_case": 3,
"dialing_type": "HORIZONTAL_VERTICAL",
"workers": 1,
"max_phone_priority": 1,
"min_phone_priority": 0,
"start_date": "2022-01-31"
},
"case_stats": {
"q_loaded_cases": 0,
"q_filtered_cases": 0,
"q_resting_cases": 0,
"q_final_cases": 0
},
"metrics": {
"status": "PAUSED",
"percentage_completed": 0,
"percentage_called": 0,
"success_rate": "0.00%",
"contactability_rate": 0,
"bot_duration": null,
"hours": 0
},
"created_at": "2025-10-22T10:00:00Z"
}{
"token": "El token es inválido o ha expirado"
}Campanhas
Criar campanha
Crea una campaña en el Bot Manager.
Todas las campañas se crean en estado PAUSED; luego, al cargar casos con el endpoint correspondiente, la campaña se actualiza automáticamente a ONGOING.
Para una performance óptima se recomienda configurar ventana horaria y límites.
POST
/
api
/
v2
/
create_campaign
/
Crear campaña
curl --request POST \
--url https://admintest.inceptia.ai/api/v2/create_campaign/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": 116,
"name": "Campaña de Prueba",
"description": "Descripción de la campaña de prueba.",
"start_date": "2022-01-31",
"call_from": "09:00",
"call_to": "21:00",
"dialing_type": "HORIZONTAL_VERTICAL",
"closes_eod": false,
"min_phone_priority": 0,
"max_phone_priority": 1,
"max_calls_per_case": 3
}
'import requests
url = "https://admintest.inceptia.ai/api/v2/create_campaign/"
payload = {
"client_id": 116,
"name": "Campaña de Prueba",
"description": "Descripción de la campaña de prueba.",
"start_date": "2022-01-31",
"call_from": "09:00",
"call_to": "21:00",
"dialing_type": "HORIZONTAL_VERTICAL",
"closes_eod": False,
"min_phone_priority": 0,
"max_phone_priority": 1,
"max_calls_per_case": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 116,
name: 'Campaña de Prueba',
description: 'Descripción de la campaña de prueba.',
start_date: '2022-01-31',
call_from: '09:00',
call_to: '21:00',
dialing_type: 'HORIZONTAL_VERTICAL',
closes_eod: false,
min_phone_priority: 0,
max_phone_priority: 1,
max_calls_per_case: 3
})
};
fetch('https://admintest.inceptia.ai/api/v2/create_campaign/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admintest.inceptia.ai/api/v2/create_campaign/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 116,
'name' => 'Campaña de Prueba',
'description' => 'Descripción de la campaña de prueba.',
'start_date' => '2022-01-31',
'call_from' => '09:00',
'call_to' => '21:00',
'dialing_type' => 'HORIZONTAL_VERTICAL',
'closes_eod' => false,
'min_phone_priority' => 0,
'max_phone_priority' => 1,
'max_calls_per_case' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://admintest.inceptia.ai/api/v2/create_campaign/"
payload := strings.NewReader("{\n \"client_id\": 116,\n \"name\": \"Campaña de Prueba\",\n \"description\": \"Descripción de la campaña de prueba.\",\n \"start_date\": \"2022-01-31\",\n \"call_from\": \"09:00\",\n \"call_to\": \"21:00\",\n \"dialing_type\": \"HORIZONTAL_VERTICAL\",\n \"closes_eod\": false,\n \"min_phone_priority\": 0,\n \"max_phone_priority\": 1,\n \"max_calls_per_case\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://admintest.inceptia.ai/api/v2/create_campaign/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": 116,\n \"name\": \"Campaña de Prueba\",\n \"description\": \"Descripción de la campaña de prueba.\",\n \"start_date\": \"2022-01-31\",\n \"call_from\": \"09:00\",\n \"call_to\": \"21:00\",\n \"dialing_type\": \"HORIZONTAL_VERTICAL\",\n \"closes_eod\": false,\n \"min_phone_priority\": 0,\n \"max_phone_priority\": 1,\n \"max_calls_per_case\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admintest.inceptia.ai/api/v2/create_campaign/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": 116,\n \"name\": \"Campaña de Prueba\",\n \"description\": \"Descripción de la campaña de prueba.\",\n \"start_date\": \"2022-01-31\",\n \"call_from\": \"09:00\",\n \"call_to\": \"21:00\",\n \"dialing_type\": \"HORIZONTAL_VERTICAL\",\n \"closes_eod\": false,\n \"min_phone_priority\": 0,\n \"max_phone_priority\": 1,\n \"max_calls_per_case\": 3\n}"
response = http.request(request)
puts response.read_body{
"id": 12345,
"name": "Campaña de prueba",
"description": "Descripción de la campaña de prueba.",
"bot": 116,
"conversation_type": "OUTBOUND_VOICE",
"closes_eod": false,
"params": {
"call_from": "09:00:00",
"call_to": "21:00:00",
"max_calls_per_case": 3,
"dialing_type": "HORIZONTAL_VERTICAL",
"workers": 1,
"max_phone_priority": 1,
"min_phone_priority": 0,
"start_date": "2022-01-31"
},
"case_stats": {
"q_loaded_cases": 0,
"q_filtered_cases": 0,
"q_resting_cases": 0,
"q_final_cases": 0
},
"metrics": {
"status": "PAUSED",
"percentage_completed": 0,
"percentage_called": 0,
"success_rate": "0.00%",
"contactability_rate": 0,
"bot_duration": null,
"hours": 0
},
"created_at": "2025-10-22T10:00:00Z"
}{
"token": "El token es inválido o ha expirado"
}Autorizações
Corpo
application/json