Campanhas
List all campaigns
GET
/
v1
/
campaigns
List all campaigns
curl --request GET \
--url https://api4.kinbox.com.br/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api4.kinbox.com.br/v1/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api4.kinbox.com.br/v1/campaigns', 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://api4.kinbox.com.br/v1/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api4.kinbox.com.br/v1/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api4.kinbox.com.br/v1/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"channelId": "<string>",
"channelIds": [
"<string>"
],
"operatorId": "<string>",
"operatorName": "<string>",
"businessHoursId": "<string>",
"normalizeBrazilPhoneNumbers": true,
"scheduledTo": "<string>",
"nextScheduledTo": "<string>",
"originalScheduledTo": "<string>",
"finishedAtPrediction": "<string>",
"leadsAssetUrl": "<string>",
"message": "<string>",
"textRaw": "<string>",
"assetsUrls": [
"<string>"
],
"active": true,
"shouldCreateConversation": false,
"chunksCount": 123,
"leadsCount": 123,
"secondsBetweenMessages": 123,
"secondsBetweenChunks": 123,
"trackAllChannels": true,
"trackMaxHours": 96,
"chunkSize": 123,
"template": {},
"progress": 123,
"resultCounts": {
"sent": 123,
"received": 123,
"read": 123,
"answered": 123,
"chunksExecuted": 123,
"byChunkId": {}
},
"messagesProcessed": 123,
"lastMessageProcessedAt": "2023-11-07T05:31:56Z",
"healthCheckData": {
"messagesProcessed": 123,
"lastMessageProcessedAt": "2023-11-07T05:31:56Z",
"healthCheckExecutions": 123,
"jobId": "<string>",
"chunkId": "<string>",
"nextHealthCheckAt": "2023-11-07T05:31:56Z",
"lastHealthCheckAt": "2023-11-07T05:31:56Z"
}
}
],
"nextCursor": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
A limit on the number of objects to be returned. Limit can range between 1 and 100.
A cursor for use in pagination. The cursor is the id of the last object returned in the previous request.
⌘I
List all campaigns
curl --request GET \
--url https://api4.kinbox.com.br/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api4.kinbox.com.br/v1/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api4.kinbox.com.br/v1/campaigns', 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://api4.kinbox.com.br/v1/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api4.kinbox.com.br/v1/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api4.kinbox.com.br/v1/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api4.kinbox.com.br/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"name": "<string>",
"channelId": "<string>",
"channelIds": [
"<string>"
],
"operatorId": "<string>",
"operatorName": "<string>",
"businessHoursId": "<string>",
"normalizeBrazilPhoneNumbers": true,
"scheduledTo": "<string>",
"nextScheduledTo": "<string>",
"originalScheduledTo": "<string>",
"finishedAtPrediction": "<string>",
"leadsAssetUrl": "<string>",
"message": "<string>",
"textRaw": "<string>",
"assetsUrls": [
"<string>"
],
"active": true,
"shouldCreateConversation": false,
"chunksCount": 123,
"leadsCount": 123,
"secondsBetweenMessages": 123,
"secondsBetweenChunks": 123,
"trackAllChannels": true,
"trackMaxHours": 96,
"chunkSize": 123,
"template": {},
"progress": 123,
"resultCounts": {
"sent": 123,
"received": 123,
"read": 123,
"answered": 123,
"chunksExecuted": 123,
"byChunkId": {}
},
"messagesProcessed": 123,
"lastMessageProcessedAt": "2023-11-07T05:31:56Z",
"healthCheckData": {
"messagesProcessed": 123,
"lastMessageProcessedAt": "2023-11-07T05:31:56Z",
"healthCheckExecutions": 123,
"jobId": "<string>",
"chunkId": "<string>",
"nextHealthCheckAt": "2023-11-07T05:31:56Z",
"lastHealthCheckAt": "2023-11-07T05:31:56Z"
}
}
],
"nextCursor": {}
}