Update a Lead Capture pop-up
Change a pop-up: restyle it with a template, edit any part of its config (design, copy, fields, trigger, game, prizes and codes), replace its allowed sites, or set it ACTIVE or PAUSED. A live pop-up must stay ready, so a change that would break it is refused with the reasons. Visitors see a change within about five minutes.
curl --request PATCH \
--url https://www.useboom.ai/api/v1/lead-capture/forms/{formId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {},
"allowedOrigins": [
"<string>"
]
}
'import requests
url = "https://www.useboom.ai/api/v1/lead-capture/forms/{formId}"
payload = {
"config": {},
"allowedOrigins": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({config: {}, allowedOrigins: ['<string>']})
};
fetch('https://www.useboom.ai/api/v1/lead-capture/forms/{formId}', 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/{formId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
],
'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/{formId}"
payload := strings.NewReader("{\n \"config\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://www.useboom.ai/api/v1/lead-capture/forms/{formId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/lead-capture/forms/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {},\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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Body
Any part of the config from lead_capture_forms_get, merged into the current one: objects merge key by key, while a list (such as prizes) or a plain value replaces what was there. A field the config does not have is refused, so check the spelling. Example: { "copy": { "headline": { "en": "Spin to win", "es": "Gira y gana" } }, "prizes": [{ "id": "p10", "label": { "en": "10% off" }, "code": "SAVE10", "weight": 90 }, { "id": "p50", "label": { "en": "50% off" }, "code": "SAVE50", "weight": 10 }] }. A prize's weight is its chance as a percentage, to two decimals (0.1 is 1 in 1,000, 0 is shown but never won); a live pop-up's must total 100.
Show child attributes
Show child attributes
Response
Success
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. flow.order is form-first (details, then the game) or play-first (the game, then details to claim the prize; needs a game). 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
Was this page helpful?
curl --request PATCH \
--url https://www.useboom.ai/api/v1/lead-capture/forms/{formId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {},
"allowedOrigins": [
"<string>"
]
}
'import requests
url = "https://www.useboom.ai/api/v1/lead-capture/forms/{formId}"
payload = {
"config": {},
"allowedOrigins": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({config: {}, allowedOrigins: ['<string>']})
};
fetch('https://www.useboom.ai/api/v1/lead-capture/forms/{formId}', 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/{formId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
],
'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/{formId}"
payload := strings.NewReader("{\n \"config\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://www.useboom.ai/api/v1/lead-capture/forms/{formId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/lead-capture/forms/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {},\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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}