Update an embedded form
Edit an embedded form’s draft, replace its allowed sites, or set it ACTIVE or PAUSED. Draft edits reach visitors only when published.
curl --request PATCH \
--url https://www.useboom.ai/api/v1/lead-capture/embedded-forms/{formId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft": {},
"allowedOrigins": [
"<string>"
]
}
'import requests
url = "https://www.useboom.ai/api/v1/lead-capture/embedded-forms/{formId}"
payload = {
"draft": {},
"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({draft: {}, allowedOrigins: ['<string>']})
};
fetch('https://www.useboom.ai/api/v1/lead-capture/embedded-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/embedded-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([
'draft' => [
],
'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/embedded-forms/{formId}"
payload := strings.NewReader("{\n \"draft\": {},\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/embedded-forms/{formId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/lead-capture/embedded-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 \"draft\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "PAUSED",
"allowedOrigins": [
"<string>"
],
"installKey": "<string>",
"publishedVersion": 123,
"unpublishedChanges": true,
"updatedAt": "<string>",
"embedTag": "<string>",
"installTag": "<string>",
"draft": {},
"publishIssues": [
"<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_....
Path Parameters
Form id.
1 - 64Body
Any part of the draft, laid over the current one: objects merge, lists (steps, fields, options, endings) are replaced whole, so send the full list. Published keys, types, answer values, the slug and the event name cannot change; publishing refuses that with the reasons.
Show child attributes
Show child attributes
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.
20ACTIVE needs a published version and at least one site.
PAUSED, ACTIVE Response
Success
PAUSED, ACTIVE Public; identifies the form in the embed.
The version visitors get; null until first published.
The draft differs from the published version.
Paste where the form should appear, together with installTag.
The editable config: steps, fields (typed questions with key, options[].value, score, sensitive), endings (with score ranges), consent, hidden, constants and design. Edit it and send it back as draft to lead_capture_embedded_forms_update; lists are replaced whole. Visitors see nothing until lead_capture_embedded_forms_publish.
Show child attributes
Show child attributes
Why the draft cannot be published yet; empty when it can.
Was this page helpful?
curl --request PATCH \
--url https://www.useboom.ai/api/v1/lead-capture/embedded-forms/{formId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft": {},
"allowedOrigins": [
"<string>"
]
}
'import requests
url = "https://www.useboom.ai/api/v1/lead-capture/embedded-forms/{formId}"
payload = {
"draft": {},
"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({draft: {}, allowedOrigins: ['<string>']})
};
fetch('https://www.useboom.ai/api/v1/lead-capture/embedded-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/embedded-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([
'draft' => [
],
'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/embedded-forms/{formId}"
payload := strings.NewReader("{\n \"draft\": {},\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/embedded-forms/{formId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/lead-capture/embedded-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 \"draft\": {},\n \"allowedOrigins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "PAUSED",
"allowedOrigins": [
"<string>"
],
"installKey": "<string>",
"publishedVersion": 123,
"unpublishedChanges": true,
"updatedAt": "<string>",
"embedTag": "<string>",
"installTag": "<string>",
"draft": {},
"publishIssues": [
"<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>"
}
}