Create a Lead Capture pop-up
Create a pop-up, PAUSED, optionally from a template. Then add prizes and codes with lead_capture_forms_update, and set it ACTIVE there once lead_capture_forms_get shows no liveIssues. Visitors see nothing until it is ACTIVE and the install tag is on an allowed site.
curl --request POST \
--url https://www.useboom.ai/api/v1/lead-capture/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"allowedOrigins": [
"<string>"
]
}
'import requests
url = "https://www.useboom.ai/api/v1/lead-capture/forms"
payload = {
"name": "<string>",
"allowedOrigins": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', allowedOrigins: ['<string>']})
};
fetch('https://www.useboom.ai/api/v1/lead-capture/forms', 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://www.useboom.ai/api/v1/lead-capture/forms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'allowedOrigins' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.useboom.ai/api/v1/lead-capture/forms"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.useboom.ai/api/v1/lead-capture/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/lead-capture/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "PAUSED",
"game": "<string>",
"allowedOrigins": [
"<string>"
],
"installKey": "<string>",
"updatedAt": "<string>",
"installTag": "<string>",
"buttonTag": "<string>",
"config": {},
"liveIssues": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Organization API key, sent as Authorization: Bearer boom_org_....
Body
Internal name, unique in the organization. Not shown to visitors.
1 - 80A finished starting point: look, image, words and game. bold_coupon, warm_newsletter (email only), midnight and editorial (a yes/no screen, the code sent by message) have no game; wheel, cards, plinko and scratch are games and need prizes before going live.
bold_coupon, warm_newsletter, midnight, editorial, wheel, cards, plinko, scratch Every site the pop-up may open on, as bare origins such as https://www.example.com. Matching is exact: https://example.com does not cover https://www.example.com.
20Response
Success
ACTIVE shows it to visitors on the allowed sites; it is refused, with the reasons, until the pop-up is ready (at least one site, a prize per game, consent text for a phone).
PAUSED, ACTIVE The game, or none for a plain form.
Public; identifies the pop-up in the install tag.
ISO timestamp.
The script tag to paste at the end of the page body.
A button that opens the pop-up when clicked, whatever its trigger; with the trigger set to click it is the only way it opens. The install tag must be on the page too.
The full design, copy, fields, trigger, game and prizes. Send any part of it back as config to lead_capture_forms_update. Text fields are { "en": "…", "es": "…", "pt": "…" }; en is required. If the stored settings could no longer be read, this shows the defaults and liveIssues says so; a patch then starts from the defaults.
Show child attributes
Show child attributes
Why it could not go live as it stands, one field: reason per line. Empty when it is ready.
Was this page helpful?
curl --request POST \
--url https://www.useboom.ai/api/v1/lead-capture/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"allowedOrigins": [
"<string>"
]
}
'import requests
url = "https://www.useboom.ai/api/v1/lead-capture/forms"
payload = {
"name": "<string>",
"allowedOrigins": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', allowedOrigins: ['<string>']})
};
fetch('https://www.useboom.ai/api/v1/lead-capture/forms', 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://www.useboom.ai/api/v1/lead-capture/forms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'allowedOrigins' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.useboom.ai/api/v1/lead-capture/forms"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.useboom.ai/api/v1/lead-capture/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/lead-capture/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "PAUSED",
"game": "<string>",
"allowedOrigins": [
"<string>"
],
"installKey": "<string>",
"updatedAt": "<string>",
"installTag": "<string>",
"buttonTag": "<string>",
"config": {},
"liveIssues": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}