Get Opt-in Prompts
curl --request GET \
--url https://api.aimtell.com/prod/prompts/{idSite} \
--header 'X-Authorization-Api-Key: <api-key>'import requests
url = "https://api.aimtell.com/prod/prompts/{idSite}"
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/prompts/{idSite}', 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/prompts/{idSite}",
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/prompts/{idSite}"
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/prompts/{idSite}")
.header("X-Authorization-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/prompts/{idSite}")
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": 123,
"uid": "12abcd3456e7",
"idSite": 147,
"name": "Prompt 1",
"header_text": "Want updates?",
"header_text_color": "#000000",
"body_text": "Get the latest and greatest",
"body_text_color": "#000000",
"cancel_button_text": "Not for me",
"cancel_button_text_color": "#4e99cf",
"cancel_button_color": "#ffffff",
"approve_button_text": "Yes, please",
"approve_button_text_color": "#4e99cf",
"approve_button_color": "#ffffff",
"active": 1,
"icon_url": "https://cdn.aimtell.io/user/uploads/147-1588184063.png",
"prompt_color": null,
"prompt_type": 3,
"prompt_position": null,
"prompt_sticky": 0,
"createdAt": "2020-04-29 18:13:33",
"updatedAt": "2020-07-28 18:39:51"
},
{
"id": 234,
"uid": "12abcd3456e7",
"idSite": 20599,
"name": "Safari Prompt",
"header_text": "Hi there!",
"header_text_color": "#000000",
"body_text": "Would you like to receive notifications on deals and sales?",
"body_text_color": "#000000",
"cancel_button_text": "No, thanks",
"cancel_button_text_color": "#4e99cf",
"cancel_button_color": "#ffffff",
"approve_button_text": "Yes, please!",
"approve_button_text_color": "#4e99cf",
"approve_button_color": "#ffffff",
"active": 1,
"icon_url": "https://cdn.aimtell.io/user/uploads/siteicons.aimtell.com/icon_147_1588190286.png",
"prompt_color": null,
"prompt_type": 3,
"prompt_position": null,
"prompt_sticky": 0,
"createdAt": "2020-06-01 14:45:55",
"updatedAt": "2020-06-01 14:46:29"
},
{
"id": 456,
"uid": "12abcd3456e7",
"idSite": 147,
"name": "Prompt 2",
"header_text": "",
"header_text_color": "#000000",
"body_text": "Would you like to receive the latest updates?",
"body_text_color": "#000000",
"cancel_button_text": "No, thanks",
"cancel_button_text_color": "#4e99cf",
"cancel_button_color": "#ffffff",
"approve_button_text": "Yes, please!",
"approve_button_text_color": "#4e99cf",
"approve_button_color": "#ffffff",
"active": 1,
"icon_url": "https://cdn.aimtell.io/user/uploads/siteicons.aimtell.com/icon_147_1588190286.png",
"prompt_color": null,
"prompt_type": 1,
"prompt_position": null,
"prompt_sticky": 0,
"createdAt": "2020-07-15 16:46:18",
"updatedAt": "2020-07-22 19:26:52"
}
]{
"result": "error",
"message": "Invalid token.",
"error_code": 71831
}Prompts
Get Opt-in Prompts
Fetches all opt-in prompts for a website
GET
/
prod
/
prompts
/
{idSite}
Get Opt-in Prompts
curl --request GET \
--url https://api.aimtell.com/prod/prompts/{idSite} \
--header 'X-Authorization-Api-Key: <api-key>'import requests
url = "https://api.aimtell.com/prod/prompts/{idSite}"
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/prompts/{idSite}', 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/prompts/{idSite}",
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/prompts/{idSite}"
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/prompts/{idSite}")
.header("X-Authorization-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aimtell.com/prod/prompts/{idSite}")
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": 123,
"uid": "12abcd3456e7",
"idSite": 147,
"name": "Prompt 1",
"header_text": "Want updates?",
"header_text_color": "#000000",
"body_text": "Get the latest and greatest",
"body_text_color": "#000000",
"cancel_button_text": "Not for me",
"cancel_button_text_color": "#4e99cf",
"cancel_button_color": "#ffffff",
"approve_button_text": "Yes, please",
"approve_button_text_color": "#4e99cf",
"approve_button_color": "#ffffff",
"active": 1,
"icon_url": "https://cdn.aimtell.io/user/uploads/147-1588184063.png",
"prompt_color": null,
"prompt_type": 3,
"prompt_position": null,
"prompt_sticky": 0,
"createdAt": "2020-04-29 18:13:33",
"updatedAt": "2020-07-28 18:39:51"
},
{
"id": 234,
"uid": "12abcd3456e7",
"idSite": 20599,
"name": "Safari Prompt",
"header_text": "Hi there!",
"header_text_color": "#000000",
"body_text": "Would you like to receive notifications on deals and sales?",
"body_text_color": "#000000",
"cancel_button_text": "No, thanks",
"cancel_button_text_color": "#4e99cf",
"cancel_button_color": "#ffffff",
"approve_button_text": "Yes, please!",
"approve_button_text_color": "#4e99cf",
"approve_button_color": "#ffffff",
"active": 1,
"icon_url": "https://cdn.aimtell.io/user/uploads/siteicons.aimtell.com/icon_147_1588190286.png",
"prompt_color": null,
"prompt_type": 3,
"prompt_position": null,
"prompt_sticky": 0,
"createdAt": "2020-06-01 14:45:55",
"updatedAt": "2020-06-01 14:46:29"
},
{
"id": 456,
"uid": "12abcd3456e7",
"idSite": 147,
"name": "Prompt 2",
"header_text": "",
"header_text_color": "#000000",
"body_text": "Would you like to receive the latest updates?",
"body_text_color": "#000000",
"cancel_button_text": "No, thanks",
"cancel_button_text_color": "#4e99cf",
"cancel_button_color": "#ffffff",
"approve_button_text": "Yes, please!",
"approve_button_text_color": "#4e99cf",
"approve_button_color": "#ffffff",
"active": 1,
"icon_url": "https://cdn.aimtell.io/user/uploads/siteicons.aimtell.com/icon_147_1588190286.png",
"prompt_color": null,
"prompt_type": 1,
"prompt_position": null,
"prompt_sticky": 0,
"createdAt": "2020-07-15 16:46:18",
"updatedAt": "2020-07-22 19:26:52"
}
]{
"result": "error",
"message": "Invalid token.",
"error_code": 71831
}Authorizations
Path Parameters
Website ID
Response
200
Example:
123
Example:
"12abcd3456e7"
Example:
147
Example:
"Prompt 1"
Example:
"Want updates?"
Example:
"#000000"
Example:
"Get the latest and greatest"
Example:
"#000000"
Example:
"Not for me"
Example:
"#4e99cf"
Example:
"#ffffff"
Example:
"Yes, please"
Example:
"#4e99cf"
Example:
"#ffffff"
Example:
1
Example:
"https://cdn.aimtell.io/user/uploads/147-1588184063.png"
Example:
3
Example:
0
Example:
"2020-04-29 18:13:33"
Example:
"2020-07-28 18:39:51"
⌘I

