curl --request GET \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/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://services-api.talqui.chat/v1/tenants/{tenantID}/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://services-api.talqui.chat/v1/tenants/{tenantID}/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://services-api.talqui.chat/v1/tenants/{tenantID}/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/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": [
{
"campaignChannel": "urn:talqui:whatsapp-gup:0",
"campaignContactAttributes": [
"<unknown>"
],
"campaignContactIDs": [
"<string>"
],
"campaignContactTags": [
"<string>"
],
"campaignID": "<string>",
"campaignInboxID": "<string>",
"campaignMeta": {},
"campaignModelID": "<string>",
"campaignName": "<string>",
"campaignPluginConnectionID": "<string>",
"campaignSessionTags": [
"<string>"
],
"campaignSessionType": "auto",
"campaignStatus": "draft",
"campaignTag": "<string>",
"campaignVariables": "<unknown>",
"canceledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"dispatchAt": "2023-11-07T05:31:56Z",
"organizationID": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"campaignMetrics": {
"pending": 123,
"sended": 123,
"total": 123
}
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123,
"totalPages": 123
}
}{
"data": [
{
"campaignChannel": "urn:talqui:whatsapp-gup:0",
"campaignContactAttributes": [
"<unknown>"
],
"campaignContactIDs": [
"<string>"
],
"campaignContactTags": [
"<string>"
],
"campaignID": "<string>",
"campaignInboxID": "<string>",
"campaignMeta": {},
"campaignModelID": "<string>",
"campaignName": "<string>",
"campaignPluginConnectionID": "<string>",
"campaignSessionTags": [
"<string>"
],
"campaignSessionType": "auto",
"campaignStatus": "draft",
"campaignTag": "<string>",
"campaignVariables": "<unknown>",
"canceledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"dispatchAt": "2023-11-07T05:31:56Z",
"organizationID": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"campaignMetrics": {
"pending": 123,
"sended": 123,
"total": 123
}
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123,
"totalPages": 123
}
}{
"errors": [
{
"error": "MissingTenantIDError",
"error_code": 1001,
"message": "tenantID is required.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "UnauthorizedError",
"error_code": 1003,
"message": "You are not authorized to perform this request.",
"statusCode": 401
}
]
}{
"errors": [
{
"error": "ForbiddenError",
"error_code": 1004,
"message": "You do not have access to this resource.",
"statusCode": 403
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}List campaigns
Lists the tenant’s campaigns with pagination, search and sorting.
Unlike the legacy campaignList.js, meta.totalCount/totalPages are
real aggregate counts — the frontend no longer needs to walk 5 pages of
200 to approximate a total (see acquireCampaignsStats in
talqui-app-web). Returns HTTP 206 instead of 200 when more pages are
available.
curl --request GET \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/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://services-api.talqui.chat/v1/tenants/{tenantID}/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://services-api.talqui.chat/v1/tenants/{tenantID}/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://services-api.talqui.chat/v1/tenants/{tenantID}/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/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": [
{
"campaignChannel": "urn:talqui:whatsapp-gup:0",
"campaignContactAttributes": [
"<unknown>"
],
"campaignContactIDs": [
"<string>"
],
"campaignContactTags": [
"<string>"
],
"campaignID": "<string>",
"campaignInboxID": "<string>",
"campaignMeta": {},
"campaignModelID": "<string>",
"campaignName": "<string>",
"campaignPluginConnectionID": "<string>",
"campaignSessionTags": [
"<string>"
],
"campaignSessionType": "auto",
"campaignStatus": "draft",
"campaignTag": "<string>",
"campaignVariables": "<unknown>",
"canceledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"dispatchAt": "2023-11-07T05:31:56Z",
"organizationID": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"campaignMetrics": {
"pending": 123,
"sended": 123,
"total": 123
}
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123,
"totalPages": 123
}
}{
"data": [
{
"campaignChannel": "urn:talqui:whatsapp-gup:0",
"campaignContactAttributes": [
"<unknown>"
],
"campaignContactIDs": [
"<string>"
],
"campaignContactTags": [
"<string>"
],
"campaignID": "<string>",
"campaignInboxID": "<string>",
"campaignMeta": {},
"campaignModelID": "<string>",
"campaignName": "<string>",
"campaignPluginConnectionID": "<string>",
"campaignSessionTags": [
"<string>"
],
"campaignSessionType": "auto",
"campaignStatus": "draft",
"campaignTag": "<string>",
"campaignVariables": "<unknown>",
"canceledAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"dispatchAt": "2023-11-07T05:31:56Z",
"organizationID": "<string>",
"tenantID": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"campaignMetrics": {
"pending": 123,
"sended": 123,
"total": 123
}
}
],
"meta": {
"count": 123,
"currentPage": 123,
"hasMore": true,
"perPage": 123,
"totalCount": 123,
"totalPages": 123
}
}{
"errors": [
{
"error": "MissingTenantIDError",
"error_code": 1001,
"message": "tenantID is required.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "UnauthorizedError",
"error_code": 1003,
"message": "You are not authorized to perform this request.",
"statusCode": 401
}
]
}{
"errors": [
{
"error": "ForbiddenError",
"error_code": 1004,
"message": "You do not have access to this resource.",
"statusCode": 403
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Authorizations
Behalf of an Operator (default). A JWT issued by Talqui Core when an operator signs in, scoped to every tenant that operator belongs to. Send as Authorization: Bearer <jwt-token>.
Path Parameters
Query Parameters
1-indexed page number to fetch.
1 <= x <= 9007199254740991Number of campaigns per page (max 200).
1 <= x <= 200Field to sort results by.
createdAt, campaignID Sort direction: -1 for descending, 1 for ascending.
-9007199254740991 <= x <= 9007199254740991Free-text search against the campaign name.
JSON-encoded object of additional field filters.