curl --request POST \
--url https://{baseUrl}/ipbox/api/addResultadoLigacao \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data descricao=descricao \
--data fila=fila \
--data acao=acao \
--data tempoAgendamento=tempoAgendamento \
--data fichaPreenchida=fichaPreenchida \
--data 'whatsTexto=<string>' \
--data smsTexto=smsTexto \
--data lote=lote \
--data postUrl=postUrl \
--data postUrlEncode=postUrlEncode \
--data atualizarResultadoExistente=atualizarResultadoExistenteimport requests
url = "https://{baseUrl}/ipbox/api/addResultadoLigacao"
payload = {
"descricao": "descricao",
"fila": "fila",
"acao": "acao",
"tempoAgendamento": "tempoAgendamento",
"fichaPreenchida": "fichaPreenchida",
"whatsTexto": "<string>",
"smsTexto": "smsTexto",
"lote": "lote",
"postUrl": "postUrl",
"postUrlEncode": "postUrlEncode",
"atualizarResultadoExistente": "atualizarResultadoExistente"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
descricao: 'descricao',
fila: 'fila',
acao: 'acao',
tempoAgendamento: 'tempoAgendamento',
fichaPreenchida: 'fichaPreenchida',
whatsTexto: '<string>',
smsTexto: 'smsTexto',
lote: 'lote',
postUrl: 'postUrl',
postUrlEncode: 'postUrlEncode',
atualizarResultadoExistente: 'atualizarResultadoExistente'
})
};
fetch('https://{baseUrl}/ipbox/api/addResultadoLigacao', 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://{baseUrl}/ipbox/api/addResultadoLigacao",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{baseUrl}/ipbox/api/addResultadoLigacao"
payload := strings.NewReader("descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{baseUrl}/ipbox/api/addResultadoLigacao")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/addResultadoLigacao")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 42
}
}addResultadoLigacao
Cadastra um novo resultado de ligação para uma fila.
curl --request POST \
--url https://{baseUrl}/ipbox/api/addResultadoLigacao \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data descricao=descricao \
--data fila=fila \
--data acao=acao \
--data tempoAgendamento=tempoAgendamento \
--data fichaPreenchida=fichaPreenchida \
--data 'whatsTexto=<string>' \
--data smsTexto=smsTexto \
--data lote=lote \
--data postUrl=postUrl \
--data postUrlEncode=postUrlEncode \
--data atualizarResultadoExistente=atualizarResultadoExistenteimport requests
url = "https://{baseUrl}/ipbox/api/addResultadoLigacao"
payload = {
"descricao": "descricao",
"fila": "fila",
"acao": "acao",
"tempoAgendamento": "tempoAgendamento",
"fichaPreenchida": "fichaPreenchida",
"whatsTexto": "<string>",
"smsTexto": "smsTexto",
"lote": "lote",
"postUrl": "postUrl",
"postUrlEncode": "postUrlEncode",
"atualizarResultadoExistente": "atualizarResultadoExistente"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
descricao: 'descricao',
fila: 'fila',
acao: 'acao',
tempoAgendamento: 'tempoAgendamento',
fichaPreenchida: 'fichaPreenchida',
whatsTexto: '<string>',
smsTexto: 'smsTexto',
lote: 'lote',
postUrl: 'postUrl',
postUrlEncode: 'postUrlEncode',
atualizarResultadoExistente: 'atualizarResultadoExistente'
})
};
fetch('https://{baseUrl}/ipbox/api/addResultadoLigacao', 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://{baseUrl}/ipbox/api/addResultadoLigacao",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{baseUrl}/ipbox/api/addResultadoLigacao"
payload := strings.NewReader("descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{baseUrl}/ipbox/api/addResultadoLigacao")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/addResultadoLigacao")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "descricao=descricao&fila=fila&acao=acao&tempoAgendamento=tempoAgendamento&fichaPreenchida=fichaPreenchida&whatsTexto=%3Cstring%3E&smsTexto=smsTexto&lote=lote&postUrl=postUrl&postUrlEncode=postUrlEncode&atualizarResultadoExistente=atualizarResultadoExistente"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": 42
}
}Authorizations
Token gerado em IPBoX > API > Token. Aceita o token puro, ou com prefixo Bearer / Basic.
Body
[Obrigatório] Descrição/nome do resultado de ligação
"descricao"
[Obrigatório] ID ou descrição da fila
"fila"
[Obrigatório para filas ativas; opcional para receptivas] Código ou descrição da ação do resultado (ex.: FINALIZAR, RETORNO, MOVE_LOTE — os valores válidos dependem do tipo da fila).
"acao"
[Opcional] Tempo (segundos) usado quando a ação envolve agendamento/retorno. Default: 0.
"tempoAgendamento"
[Opcional] "Y"/"N" — se a ficha do prospect deve estar preenchida para aplicar este resultado. Default: N.
"fichaPreenchida"
[Opcional] Id ou descrição de um texto de WhatsApp (cadastrado em SMS/Textos) a ser enviado quando este resultado for aplicado. Requer que o envio de WhatsApp pelo agente esteja habilitado no sistema (ATIVAR_ENVIO_WHATSAPP_AGENTE) — caso contrário este parâmetro é ignorado.
[Opcional] Id ou descrição de um texto de SMS (cadastrado em SMS/Textos) a ser enviado quando este resultado for aplicado.
"smsTexto"
[Obrigatório apenas quando acao=MOVE_LOTE] Id ou descrição do lote de destino.
"lote"
[Opcional] URL a ser chamada (postback) quando este resultado for aplicado a uma ligação.
"postUrl"
[Opcional] "Y"/"N" — se os dados enviados ao postUrl devem ser URL-encoded. Default: Y.
"postUrlEncode"
[Opcional] "Y"/"N" — se "Y" e já existir um resultado com a mesma descrição+fila, atualiza-o em vez de retornar erro de duplicidade. Default: N.
"atualizarResultadoExistente"
