Forms
Update embed settings
Sets restrictions on the form’s public share and embed links. Send them inside an embed_settings object; settings you leave out keep their values.
allowed_domains: array of domain names, such asshop.example.com, that may embed the form. A subdomain of a listed domain is allowed too. An empty array allows every site. Requests that carry noOriginorRefererheader aren’t restricted.password: a password visitors must enter before they can see or submit the form.remove_password: trueremoves it.expires_at: date and time after which the public form returns 410.nullremoves it.max_submissions: stop accepting public submissions once the form has this many completed respondents.nullor 0 removes the limit.require_contact: whentrue, public submissions must include a contact email.
Returns 422 for an invalid domain or date.
PATCH
/
api
/
forms
/
{id}
/
embed_settings
Update embed settings
curl --request PATCH \
--url https://api.fluid.app/api/forms/{id}/embed_settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/forms/{id}/embed_settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/forms/{id}/embed_settings', 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.fluid.app/api/forms/{id}/embed_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.fluid.app/api/forms/{id}/embed_settings"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.fluid.app/api/forms/{id}/embed_settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/forms/{id}/embed_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"form": {
"countries": [
"<string>"
],
"description": "<string>",
"embed_settings": {
"password_protected": true
},
"embed_url": null,
"form_components": null,
"form_redirect": null,
"form_respondents_count": 123,
"form_styles": null,
"form_type": null,
"id": 123,
"public_token": null,
"share_url": null,
"status": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}Authorizations
Bearer token authentication
Path Parameters
ID of the form.
⌘I
Update embed settings
curl --request PATCH \
--url https://api.fluid.app/api/forms/{id}/embed_settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/forms/{id}/embed_settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/forms/{id}/embed_settings', 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.fluid.app/api/forms/{id}/embed_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.fluid.app/api/forms/{id}/embed_settings"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.fluid.app/api/forms/{id}/embed_settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/forms/{id}/embed_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"form": {
"countries": [
"<string>"
],
"description": "<string>",
"embed_settings": {
"password_protected": true
},
"embed_url": null,
"form_components": null,
"form_redirect": null,
"form_respondents_count": 123,
"form_styles": null,
"form_type": null,
"id": 123,
"public_token": null,
"share_url": null,
"status": "<string>",
"title": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}