cURL
curl -X GET \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns \
-H 'Authorization: Bearer {{TOKEN}}'var request = require("request");
var options = { method: 'GET',
url: 'https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns',
headers:
{ Authorization: 'Bearer {{TOKEN}}' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});<?php
$request = new HttpRequest();
$request->setUrl('https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Bearer {{TOKEN}}'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}import requests
url = "https://api.sakari.io/v1/accounts/{accountId}/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sakari.io/v1/accounts/{accountId}/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://api.sakari.io/v1/accounts/{accountId}/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sakari.io/v1/accounts/{accountId}/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{
"success": true,
"pagination": {
"limit": 123,
"offset": 123,
"hasNext": true
},
"data": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"fieldMappings": [
{
"attribute": "<string>",
"column": "<string>",
"mandatory": true
}
],
"filters": {
"list": {
"id": "<string>",
"name": "<string>",
"source": {
"id": "<string>",
"integration": "<string>",
"lastSynced": "<string>"
},
"keyword": "<string>",
"doubleOptIn": {
"enabled": true,
"prompt": "<string>"
},
"filter": {
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"list": "<string>",
"valid": true,
"invalid": true,
"blocked": true,
"unblocked": true,
"optIn": true
},
"optInConfirmation": "<string>"
},
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"tags": [
{
"tag": "<string>",
"visible": true
}
]
},
"media": [
{
"url": "<string>",
"type": "<string>",
"name": "<string>",
"filename": "<string>"
}
],
"phoneNumberFilter": {
"group": {
"id": "<string>"
}
},
"schedule": {
"timezone": "<string>",
"cron": "<string>"
},
"nextExecution": "<string>",
"reporting": {
"destination": "<string>",
"when": "<string>",
"delay": "<string>",
"unit": "<string>"
},
"template": "<string>",
"trigger": {
"code": "<string>",
"name": "<string>"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"paused": "<string>",
"lastJob": {
"id": "<string>",
"submitted": 123,
"status": "<string>",
"price": 123,
"failures": 123,
"invalid": [
{}
],
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
}
}
}
]
}{
"success": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
}
}{
"success": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
}
}campaigns
Fetch campaigns
GET
/
v1
/
accounts
/
{accountId}
/
campaigns
cURL
curl -X GET \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns \
-H 'Authorization: Bearer {{TOKEN}}'var request = require("request");
var options = { method: 'GET',
url: 'https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns',
headers:
{ Authorization: 'Bearer {{TOKEN}}' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});<?php
$request = new HttpRequest();
$request->setUrl('https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/campaigns');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Bearer {{TOKEN}}'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}import requests
url = "https://api.sakari.io/v1/accounts/{accountId}/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sakari.io/v1/accounts/{accountId}/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://api.sakari.io/v1/accounts/{accountId}/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sakari.io/v1/accounts/{accountId}/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{
"success": true,
"pagination": {
"limit": 123,
"offset": 123,
"hasNext": true
},
"data": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"fieldMappings": [
{
"attribute": "<string>",
"column": "<string>",
"mandatory": true
}
],
"filters": {
"list": {
"id": "<string>",
"name": "<string>",
"source": {
"id": "<string>",
"integration": "<string>",
"lastSynced": "<string>"
},
"keyword": "<string>",
"doubleOptIn": {
"enabled": true,
"prompt": "<string>"
},
"filter": {
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"list": "<string>",
"valid": true,
"invalid": true,
"blocked": true,
"unblocked": true,
"optIn": true
},
"optInConfirmation": "<string>"
},
"q": "<string>",
"attributes": [
{
"attribute": "<string>",
"comparator": "<string>",
"value": [
"<string>"
]
}
],
"tags": [
{
"tag": "<string>",
"visible": true
}
]
},
"media": [
{
"url": "<string>",
"type": "<string>",
"name": "<string>",
"filename": "<string>"
}
],
"phoneNumberFilter": {
"group": {
"id": "<string>"
}
},
"schedule": {
"timezone": "<string>",
"cron": "<string>"
},
"nextExecution": "<string>",
"reporting": {
"destination": "<string>",
"when": "<string>",
"delay": "<string>",
"unit": "<string>"
},
"template": "<string>",
"trigger": {
"code": "<string>",
"name": "<string>"
},
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"updated": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
},
"paused": "<string>",
"lastJob": {
"id": "<string>",
"submitted": 123,
"status": "<string>",
"price": 123,
"failures": 123,
"invalid": [
{}
],
"created": {
"at": "2023-11-07T05:31:56Z",
"by": {
"id": "<string>",
"name": "Joe Bloggs",
"firstName": "Joe",
"lastName": "Bloggs",
"email": "joe@bloggs.com",
"source": "<string>",
"subSource": "<string>"
}
}
}
}
]
}{
"success": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
}
}{
"success": true,
"error": {
"code": "CONT-010",
"description": "Contact has requested no further communication"
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Account to apply operations to
Query Parameters
Results to skip when paginating through a result set
Required range:
x >= 0Maximum number of results to return
Required range:
1 <= x <= 100Filter by name or part of
⌘I