Get All API Push Campaigns
curl --request GET \
--url https://api.aimtell.com/prod/api-campaigns/{id} \
--header 'X-Authorization-Api-Key: <api-key>'import requests
url = "https://api.aimtell.com/prod/api-campaigns/{id}"
headers = {"X-Authorization-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Authorization-Api-Key': '<api-key>'}};
fetch('https://api.aimtell.com/prod/api-campaigns/{id}', 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://api.aimtell.com/prod/api-campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Authorization-Api-Key: <api-key>"
],
]);
$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://api.aimtell.com/prod/api-campaigns/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Authorization-Api-Key", "<api-key>")
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.aimtell.com/prod/api-campaigns/{id}")
.header("X-Authorization-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/api-campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Authorization-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 33677790,
"objectId": "5baa724fd38f2",
"owner_uid": "76cedd11b19e",
"campaignId": null,
"title": "Hey there",
"body": "Nice push",
"link": "google.com",
"idSite": 2459,
"customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_2459_1532715035.jpg",
"customImage": "",
"segmentId": null,
"alias": null,
"uids": "03a131fb-ca3e-0147-d846-c986c8d1bdb8",
"processed": 1,
"response": "{\"result\":\"success\",\"count\":1,\"bounced\":0}",
"createdAt": "2018-09-25 17:37:19",
"updatedAt": "2018-09-25 17:37:21"
},
{
"id": 33677791,
"objectId": "5baa72502ea9d",
"owner_uid": "76cedd11b19e",
"campaignId": null,
"title": "Wow",
"body": "That's awesome man",
"link": "google.com",
"idSite": 2459,
"customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_2459_1532715035.jpg",
"customImage": "",
"segmentId": null,
"alias": null,
"uids": "03a131fb-ca3e-0147-d846-c986c8d1bdb8",
"processed": 1,
"response": "{\"result\":\"success\",\"count\":1,\"bounced\":0}",
"createdAt": "2018-09-25 17:37:20",
"updatedAt": "2018-09-25 17:37:21"
}
]{
"result": "error",
"message": "Invalid token.",
"error_code": 71831
}API Campaigns
Get All API Push Campaigns
Fetches All API Push Campaigns
GET
/
prod
/
api-campaigns
/
{id}
Get All API Push Campaigns
curl --request GET \
--url https://api.aimtell.com/prod/api-campaigns/{id} \
--header 'X-Authorization-Api-Key: <api-key>'import requests
url = "https://api.aimtell.com/prod/api-campaigns/{id}"
headers = {"X-Authorization-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Authorization-Api-Key': '<api-key>'}};
fetch('https://api.aimtell.com/prod/api-campaigns/{id}', 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://api.aimtell.com/prod/api-campaigns/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Authorization-Api-Key: <api-key>"
],
]);
$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://api.aimtell.com/prod/api-campaigns/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Authorization-Api-Key", "<api-key>")
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.aimtell.com/prod/api-campaigns/{id}")
.header("X-Authorization-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/api-campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Authorization-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 33677790,
"objectId": "5baa724fd38f2",
"owner_uid": "76cedd11b19e",
"campaignId": null,
"title": "Hey there",
"body": "Nice push",
"link": "google.com",
"idSite": 2459,
"customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_2459_1532715035.jpg",
"customImage": "",
"segmentId": null,
"alias": null,
"uids": "03a131fb-ca3e-0147-d846-c986c8d1bdb8",
"processed": 1,
"response": "{\"result\":\"success\",\"count\":1,\"bounced\":0}",
"createdAt": "2018-09-25 17:37:19",
"updatedAt": "2018-09-25 17:37:21"
},
{
"id": 33677791,
"objectId": "5baa72502ea9d",
"owner_uid": "76cedd11b19e",
"campaignId": null,
"title": "Wow",
"body": "That's awesome man",
"link": "google.com",
"idSite": 2459,
"customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_2459_1532715035.jpg",
"customImage": "",
"segmentId": null,
"alias": null,
"uids": "03a131fb-ca3e-0147-d846-c986c8d1bdb8",
"processed": 1,
"response": "{\"result\":\"success\",\"count\":1,\"bounced\":0}",
"createdAt": "2018-09-25 17:37:20",
"updatedAt": "2018-09-25 17:37:21"
}
]{
"result": "error",
"message": "Invalid token.",
"error_code": 71831
}⌘I

