curl --request PATCH \
--url https://app.formbox.app/api/v1/forms/{formId} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"name": "<string>",
"removeFormboxBranding": true,
"sendEmailNotifications": true,
"emailsToNotify": [
"<string>"
],
"sendRespondentEmailNotifications": true,
"respondentEmailFromName": "<string>",
"respondentEmailSubject": "<string>",
"respondentEmailMessageHTML": "<string>",
"limitResponses": true,
"isClosed": true,
"autoCloseEnabled": true,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": 123,
"useCustomThankYouPage": true,
"tpButtonText": "<string>",
"tpButtonColor": "<string>",
"tpButtonBackgroundColor": "<string>",
"tpBackgroundColor": "<string>",
"tpTextColor": "<string>",
"tpHeader": "<string>",
"tpMessage": "<string>",
"tpButtonUrl": "<string>",
"useCustomRedirect": true,
"customSuccessUrl": "<string>",
"customHoneypot": "<string>",
"googleRecaptchaEnabled": true,
"googleRecaptchaSecretKey": "<string>",
"allowMultipleSubmissions": true,
"seoTitle": "<string>",
"seoDescription": "<string>",
"seoImage": "<string>",
"allowedDomains": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"subtype": "<string>",
"required": true,
"showDescription": true,
"description": "<string>",
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"minValue": 123,
"maxValue": 123,
"ratingCount": 123,
"scaleMin": 123,
"scaleMax": 123,
"minLabel": "<string>",
"maxLabel": "<string>",
"options": [
{
"id": "<string>",
"value": "<string>"
}
],
"logic": {
"rules": [
{
"id": "<string>",
"when": {
"conditions": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"value": "<string>"
}
]
},
"targetFieldId": "<string>",
"targetFieldIds": [
"<string>"
],
"targetPageId": "<string>"
}
]
}
}
],
"allowedCountries": "<string>"
}
'import requests
url = "https://app.formbox.app/api/v1/forms/{formId}"
payload = {
"name": "<string>",
"removeFormboxBranding": True,
"sendEmailNotifications": True,
"emailsToNotify": ["<string>"],
"sendRespondentEmailNotifications": True,
"respondentEmailFromName": "<string>",
"respondentEmailSubject": "<string>",
"respondentEmailMessageHTML": "<string>",
"limitResponses": True,
"isClosed": True,
"autoCloseEnabled": True,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": 123,
"useCustomThankYouPage": True,
"tpButtonText": "<string>",
"tpButtonColor": "<string>",
"tpButtonBackgroundColor": "<string>",
"tpBackgroundColor": "<string>",
"tpTextColor": "<string>",
"tpHeader": "<string>",
"tpMessage": "<string>",
"tpButtonUrl": "<string>",
"useCustomRedirect": True,
"customSuccessUrl": "<string>",
"customHoneypot": "<string>",
"googleRecaptchaEnabled": True,
"googleRecaptchaSecretKey": "<string>",
"allowMultipleSubmissions": True,
"seoTitle": "<string>",
"seoDescription": "<string>",
"seoImage": "<string>",
"allowedDomains": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"subtype": "<string>",
"required": True,
"showDescription": True,
"description": "<string>",
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"minValue": 123,
"maxValue": 123,
"ratingCount": 123,
"scaleMin": 123,
"scaleMax": 123,
"minLabel": "<string>",
"maxLabel": "<string>",
"options": [
{
"id": "<string>",
"value": "<string>"
}
],
"logic": { "rules": [
{
"id": "<string>",
"when": { "conditions": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"value": "<string>"
}
] },
"targetFieldId": "<string>",
"targetFieldIds": ["<string>"],
"targetPageId": "<string>"
}
] }
}
],
"allowedCountries": "<string>"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
removeFormboxBranding: true,
sendEmailNotifications: true,
emailsToNotify: ['<string>'],
sendRespondentEmailNotifications: true,
respondentEmailFromName: '<string>',
respondentEmailSubject: '<string>',
respondentEmailMessageHTML: '<string>',
limitResponses: true,
isClosed: true,
autoCloseEnabled: true,
autoCloseDate: '<string>',
autoCloseTimezone: '<string>',
autoCloseTime: '<string>',
maxResponses: 123,
useCustomThankYouPage: true,
tpButtonText: '<string>',
tpButtonColor: '<string>',
tpButtonBackgroundColor: '<string>',
tpBackgroundColor: '<string>',
tpTextColor: '<string>',
tpHeader: '<string>',
tpMessage: '<string>',
tpButtonUrl: '<string>',
useCustomRedirect: true,
customSuccessUrl: '<string>',
customHoneypot: '<string>',
googleRecaptchaEnabled: true,
googleRecaptchaSecretKey: '<string>',
allowMultipleSubmissions: true,
seoTitle: '<string>',
seoDescription: '<string>',
seoImage: '<string>',
allowedDomains: '<string>',
fields: [
{
id: '<string>',
label: '<string>',
type: '<string>',
subtype: '<string>',
required: true,
showDescription: true,
description: '<string>',
placeholder: '<string>',
minLength: 123,
maxLength: 123,
minValue: 123,
maxValue: 123,
ratingCount: 123,
scaleMin: 123,
scaleMax: 123,
minLabel: '<string>',
maxLabel: '<string>',
options: [{id: '<string>', value: '<string>'}],
logic: {
rules: [
{
id: '<string>',
when: {conditions: [{id: '<string>', sourceFieldId: '<string>', value: '<string>'}]},
targetFieldId: '<string>',
targetFieldIds: ['<string>'],
targetPageId: '<string>'
}
]
}
}
],
allowedCountries: '<string>'
})
};
fetch('https://app.formbox.app/api/v1/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://app.formbox.app/api/v1/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([
'name' => '<string>',
'removeFormboxBranding' => true,
'sendEmailNotifications' => true,
'emailsToNotify' => [
'<string>'
],
'sendRespondentEmailNotifications' => true,
'respondentEmailFromName' => '<string>',
'respondentEmailSubject' => '<string>',
'respondentEmailMessageHTML' => '<string>',
'limitResponses' => true,
'isClosed' => true,
'autoCloseEnabled' => true,
'autoCloseDate' => '<string>',
'autoCloseTimezone' => '<string>',
'autoCloseTime' => '<string>',
'maxResponses' => 123,
'useCustomThankYouPage' => true,
'tpButtonText' => '<string>',
'tpButtonColor' => '<string>',
'tpButtonBackgroundColor' => '<string>',
'tpBackgroundColor' => '<string>',
'tpTextColor' => '<string>',
'tpHeader' => '<string>',
'tpMessage' => '<string>',
'tpButtonUrl' => '<string>',
'useCustomRedirect' => true,
'customSuccessUrl' => '<string>',
'customHoneypot' => '<string>',
'googleRecaptchaEnabled' => true,
'googleRecaptchaSecretKey' => '<string>',
'allowMultipleSubmissions' => true,
'seoTitle' => '<string>',
'seoDescription' => '<string>',
'seoImage' => '<string>',
'allowedDomains' => '<string>',
'fields' => [
[
'id' => '<string>',
'label' => '<string>',
'type' => '<string>',
'subtype' => '<string>',
'required' => true,
'showDescription' => true,
'description' => '<string>',
'placeholder' => '<string>',
'minLength' => 123,
'maxLength' => 123,
'minValue' => 123,
'maxValue' => 123,
'ratingCount' => 123,
'scaleMin' => 123,
'scaleMax' => 123,
'minLabel' => '<string>',
'maxLabel' => '<string>',
'options' => [
[
'id' => '<string>',
'value' => '<string>'
]
],
'logic' => [
'rules' => [
[
'id' => '<string>',
'when' => [
'conditions' => [
[
'id' => '<string>',
'sourceFieldId' => '<string>',
'value' => '<string>'
]
]
],
'targetFieldId' => '<string>',
'targetFieldIds' => [
'<string>'
],
'targetPageId' => '<string>'
]
]
]
]
],
'allowedCountries' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.formbox.app/api/v1/forms/{formId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"removeFormboxBranding\": true,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [\n \"<string>\"\n ],\n \"sendRespondentEmailNotifications\": true,\n \"respondentEmailFromName\": \"<string>\",\n \"respondentEmailSubject\": \"<string>\",\n \"respondentEmailMessageHTML\": \"<string>\",\n \"limitResponses\": true,\n \"isClosed\": true,\n \"autoCloseEnabled\": true,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": 123,\n \"useCustomThankYouPage\": true,\n \"tpButtonText\": \"<string>\",\n \"tpButtonColor\": \"<string>\",\n \"tpButtonBackgroundColor\": \"<string>\",\n \"tpBackgroundColor\": \"<string>\",\n \"tpTextColor\": \"<string>\",\n \"tpHeader\": \"<string>\",\n \"tpMessage\": \"<string>\",\n \"tpButtonUrl\": \"<string>\",\n \"useCustomRedirect\": true,\n \"customSuccessUrl\": \"<string>\",\n \"customHoneypot\": \"<string>\",\n \"googleRecaptchaEnabled\": true,\n \"googleRecaptchaSecretKey\": \"<string>\",\n \"allowMultipleSubmissions\": true,\n \"seoTitle\": \"<string>\",\n \"seoDescription\": \"<string>\",\n \"seoImage\": \"<string>\",\n \"allowedDomains\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"required\": true,\n \"showDescription\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"minValue\": 123,\n \"maxValue\": 123,\n \"ratingCount\": 123,\n \"scaleMin\": 123,\n \"scaleMax\": 123,\n \"minLabel\": \"<string>\",\n \"maxLabel\": \"<string>\",\n \"options\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"logic\": {\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"when\": {\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"sourceFieldId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"targetFieldId\": \"<string>\",\n \"targetFieldIds\": [\n \"<string>\"\n ],\n \"targetPageId\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"allowedCountries\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api-key", "<api-key>")
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://app.formbox.app/api/v1/forms/{formId}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"removeFormboxBranding\": true,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [\n \"<string>\"\n ],\n \"sendRespondentEmailNotifications\": true,\n \"respondentEmailFromName\": \"<string>\",\n \"respondentEmailSubject\": \"<string>\",\n \"respondentEmailMessageHTML\": \"<string>\",\n \"limitResponses\": true,\n \"isClosed\": true,\n \"autoCloseEnabled\": true,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": 123,\n \"useCustomThankYouPage\": true,\n \"tpButtonText\": \"<string>\",\n \"tpButtonColor\": \"<string>\",\n \"tpButtonBackgroundColor\": \"<string>\",\n \"tpBackgroundColor\": \"<string>\",\n \"tpTextColor\": \"<string>\",\n \"tpHeader\": \"<string>\",\n \"tpMessage\": \"<string>\",\n \"tpButtonUrl\": \"<string>\",\n \"useCustomRedirect\": true,\n \"customSuccessUrl\": \"<string>\",\n \"customHoneypot\": \"<string>\",\n \"googleRecaptchaEnabled\": true,\n \"googleRecaptchaSecretKey\": \"<string>\",\n \"allowMultipleSubmissions\": true,\n \"seoTitle\": \"<string>\",\n \"seoDescription\": \"<string>\",\n \"seoImage\": \"<string>\",\n \"allowedDomains\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"required\": true,\n \"showDescription\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"minValue\": 123,\n \"maxValue\": 123,\n \"ratingCount\": 123,\n \"scaleMin\": 123,\n \"scaleMax\": 123,\n \"minLabel\": \"<string>\",\n \"maxLabel\": \"<string>\",\n \"options\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"logic\": {\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"when\": {\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"sourceFieldId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"targetFieldId\": \"<string>\",\n \"targetFieldIds\": [\n \"<string>\"\n ],\n \"targetPageId\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"allowedCountries\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbox.app/api/v1/forms/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"removeFormboxBranding\": true,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [\n \"<string>\"\n ],\n \"sendRespondentEmailNotifications\": true,\n \"respondentEmailFromName\": \"<string>\",\n \"respondentEmailSubject\": \"<string>\",\n \"respondentEmailMessageHTML\": \"<string>\",\n \"limitResponses\": true,\n \"isClosed\": true,\n \"autoCloseEnabled\": true,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": 123,\n \"useCustomThankYouPage\": true,\n \"tpButtonText\": \"<string>\",\n \"tpButtonColor\": \"<string>\",\n \"tpButtonBackgroundColor\": \"<string>\",\n \"tpBackgroundColor\": \"<string>\",\n \"tpTextColor\": \"<string>\",\n \"tpHeader\": \"<string>\",\n \"tpMessage\": \"<string>\",\n \"tpButtonUrl\": \"<string>\",\n \"useCustomRedirect\": true,\n \"customSuccessUrl\": \"<string>\",\n \"customHoneypot\": \"<string>\",\n \"googleRecaptchaEnabled\": true,\n \"googleRecaptchaSecretKey\": \"<string>\",\n \"allowMultipleSubmissions\": true,\n \"seoTitle\": \"<string>\",\n \"seoDescription\": \"<string>\",\n \"seoImage\": \"<string>\",\n \"allowedDomains\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"required\": true,\n \"showDescription\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"minValue\": 123,\n \"maxValue\": 123,\n \"ratingCount\": 123,\n \"scaleMin\": 123,\n \"scaleMax\": 123,\n \"minLabel\": \"<string>\",\n \"maxLabel\": \"<string>\",\n \"options\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"logic\": {\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"when\": {\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"sourceFieldId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"targetFieldId\": \"<string>\",\n \"targetFieldIds\": [\n \"<string>\"\n ],\n \"targetPageId\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"allowedCountries\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"removeFormboxBranding": true,
"sendEmailNotifications": true,
"emailsToNotify": [
"<string>"
],
"submissionStorageDuration": "<string>",
"sendRespondentEmailNotifications": true,
"respondentEmailFromName": "<string>",
"respondentEmailSubject": "<string>",
"respondentEmailMessageHTML": "<string>",
"submitButtonText": "<string>",
"limitResponses": true,
"isClosed": true,
"autoCloseEnabled": true,
"autoCloseDate": "<string>",
"autoCloseTime": "<string>",
"autoCloseTimezone": "<string>",
"maxResponses": 123,
"useCustomRedirect": true,
"customSuccessUrl": "<string>",
"webhookEnabled": true,
"webhookUrl": "<string>",
"customHoneypot": "<string>",
"googleRecaptchaEnabled": true,
"allowedDomains": "<string>",
"allowedCountries": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"type": "endpoint",
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"subtype": "<string>",
"required": true,
"showDescription": true,
"description": "<string>",
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"minValue": 123,
"maxValue": 123,
"ratingCount": 123,
"scaleMin": 123,
"scaleMax": 123,
"minLabel": "<string>",
"maxLabel": "<string>",
"options": [
{
"id": "<string>",
"value": "<string>"
}
],
"logic": {
"rules": [
{
"id": "<string>",
"action": "show_field",
"when": {
"combinator": "all",
"conditions": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"operator": "is_empty",
"value": "<string>"
}
]
},
"targetFieldId": "<string>",
"targetFieldIds": [
"<string>"
],
"targetPageId": "<string>"
}
]
}
}
],
"accentColor": "<string>",
"backgroundColor": "<string>",
"buttonBackgroundColor": "<string>",
"buttonBorderStyle": "full",
"buttonTextColor": "<string>",
"closeMessageDescription": "<string>",
"closeMessageTitle": "<string>",
"headerDescription": "<string>",
"headerImage": "<string>",
"headerTitle": "<string>",
"seoDescription": "<string>",
"seoImage": "<string>",
"seoTitle": "<string>",
"inputBorderStyle": "full",
"logo": "<string>",
"pageMode": "compact",
"saveAnswers": true,
"allowMultipleSubmissions": true,
"showCustomClosedMessage": true,
"textColor": "<string>",
"tpBackgroundColor": "<string>",
"tpButtonColor": "<string>",
"tpButtonText": "<string>",
"tpButtonUrl": "<string>",
"tpHeader": "<string>",
"tpMessage": "<string>",
"tpTextColor": "<string>",
"useCustomThankYouPage": true,
"tpButtonBackgroundColor": "<string>",
"ipBlacklist": "<string>",
"imageCompressionType": [
"webp"
],
"disableEmailDataCensoring": true
}{
"error": {
"code": "unauthorized",
"message": "No API key provided. Pass your API key in the api-key header."
}
}{
"error": {
"code": "forbidden",
"message": "Your API key requires full access scope. Some settings such as respondent email notifications, custom redirects, and auto-close require a paid plan."
}
}{
"error": {
"code": "not_found",
"message": "No form with this ID exists in your organization. Check that the formId is correct and belongs to the organization associated with your API key."
}
}{
"error": {
"code": "unprocessable_entity",
"message": "submissionStorageDuration: Invalid enum value — expected '30' | '60' | '90' | '365' | 'forever' | 'never'."
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Please slow down and try again shortly."
}
}{
"error": {
"code": "internal_server_error",
"message": "An internal server error occurred. Please contact support if the problem persists."
}
}Update a form
Update a form for the authenticated organization.
curl --request PATCH \
--url https://app.formbox.app/api/v1/forms/{formId} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"name": "<string>",
"removeFormboxBranding": true,
"sendEmailNotifications": true,
"emailsToNotify": [
"<string>"
],
"sendRespondentEmailNotifications": true,
"respondentEmailFromName": "<string>",
"respondentEmailSubject": "<string>",
"respondentEmailMessageHTML": "<string>",
"limitResponses": true,
"isClosed": true,
"autoCloseEnabled": true,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": 123,
"useCustomThankYouPage": true,
"tpButtonText": "<string>",
"tpButtonColor": "<string>",
"tpButtonBackgroundColor": "<string>",
"tpBackgroundColor": "<string>",
"tpTextColor": "<string>",
"tpHeader": "<string>",
"tpMessage": "<string>",
"tpButtonUrl": "<string>",
"useCustomRedirect": true,
"customSuccessUrl": "<string>",
"customHoneypot": "<string>",
"googleRecaptchaEnabled": true,
"googleRecaptchaSecretKey": "<string>",
"allowMultipleSubmissions": true,
"seoTitle": "<string>",
"seoDescription": "<string>",
"seoImage": "<string>",
"allowedDomains": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"subtype": "<string>",
"required": true,
"showDescription": true,
"description": "<string>",
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"minValue": 123,
"maxValue": 123,
"ratingCount": 123,
"scaleMin": 123,
"scaleMax": 123,
"minLabel": "<string>",
"maxLabel": "<string>",
"options": [
{
"id": "<string>",
"value": "<string>"
}
],
"logic": {
"rules": [
{
"id": "<string>",
"when": {
"conditions": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"value": "<string>"
}
]
},
"targetFieldId": "<string>",
"targetFieldIds": [
"<string>"
],
"targetPageId": "<string>"
}
]
}
}
],
"allowedCountries": "<string>"
}
'import requests
url = "https://app.formbox.app/api/v1/forms/{formId}"
payload = {
"name": "<string>",
"removeFormboxBranding": True,
"sendEmailNotifications": True,
"emailsToNotify": ["<string>"],
"sendRespondentEmailNotifications": True,
"respondentEmailFromName": "<string>",
"respondentEmailSubject": "<string>",
"respondentEmailMessageHTML": "<string>",
"limitResponses": True,
"isClosed": True,
"autoCloseEnabled": True,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": 123,
"useCustomThankYouPage": True,
"tpButtonText": "<string>",
"tpButtonColor": "<string>",
"tpButtonBackgroundColor": "<string>",
"tpBackgroundColor": "<string>",
"tpTextColor": "<string>",
"tpHeader": "<string>",
"tpMessage": "<string>",
"tpButtonUrl": "<string>",
"useCustomRedirect": True,
"customSuccessUrl": "<string>",
"customHoneypot": "<string>",
"googleRecaptchaEnabled": True,
"googleRecaptchaSecretKey": "<string>",
"allowMultipleSubmissions": True,
"seoTitle": "<string>",
"seoDescription": "<string>",
"seoImage": "<string>",
"allowedDomains": "<string>",
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"subtype": "<string>",
"required": True,
"showDescription": True,
"description": "<string>",
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"minValue": 123,
"maxValue": 123,
"ratingCount": 123,
"scaleMin": 123,
"scaleMax": 123,
"minLabel": "<string>",
"maxLabel": "<string>",
"options": [
{
"id": "<string>",
"value": "<string>"
}
],
"logic": { "rules": [
{
"id": "<string>",
"when": { "conditions": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"value": "<string>"
}
] },
"targetFieldId": "<string>",
"targetFieldIds": ["<string>"],
"targetPageId": "<string>"
}
] }
}
],
"allowedCountries": "<string>"
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
removeFormboxBranding: true,
sendEmailNotifications: true,
emailsToNotify: ['<string>'],
sendRespondentEmailNotifications: true,
respondentEmailFromName: '<string>',
respondentEmailSubject: '<string>',
respondentEmailMessageHTML: '<string>',
limitResponses: true,
isClosed: true,
autoCloseEnabled: true,
autoCloseDate: '<string>',
autoCloseTimezone: '<string>',
autoCloseTime: '<string>',
maxResponses: 123,
useCustomThankYouPage: true,
tpButtonText: '<string>',
tpButtonColor: '<string>',
tpButtonBackgroundColor: '<string>',
tpBackgroundColor: '<string>',
tpTextColor: '<string>',
tpHeader: '<string>',
tpMessage: '<string>',
tpButtonUrl: '<string>',
useCustomRedirect: true,
customSuccessUrl: '<string>',
customHoneypot: '<string>',
googleRecaptchaEnabled: true,
googleRecaptchaSecretKey: '<string>',
allowMultipleSubmissions: true,
seoTitle: '<string>',
seoDescription: '<string>',
seoImage: '<string>',
allowedDomains: '<string>',
fields: [
{
id: '<string>',
label: '<string>',
type: '<string>',
subtype: '<string>',
required: true,
showDescription: true,
description: '<string>',
placeholder: '<string>',
minLength: 123,
maxLength: 123,
minValue: 123,
maxValue: 123,
ratingCount: 123,
scaleMin: 123,
scaleMax: 123,
minLabel: '<string>',
maxLabel: '<string>',
options: [{id: '<string>', value: '<string>'}],
logic: {
rules: [
{
id: '<string>',
when: {conditions: [{id: '<string>', sourceFieldId: '<string>', value: '<string>'}]},
targetFieldId: '<string>',
targetFieldIds: ['<string>'],
targetPageId: '<string>'
}
]
}
}
],
allowedCountries: '<string>'
})
};
fetch('https://app.formbox.app/api/v1/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://app.formbox.app/api/v1/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([
'name' => '<string>',
'removeFormboxBranding' => true,
'sendEmailNotifications' => true,
'emailsToNotify' => [
'<string>'
],
'sendRespondentEmailNotifications' => true,
'respondentEmailFromName' => '<string>',
'respondentEmailSubject' => '<string>',
'respondentEmailMessageHTML' => '<string>',
'limitResponses' => true,
'isClosed' => true,
'autoCloseEnabled' => true,
'autoCloseDate' => '<string>',
'autoCloseTimezone' => '<string>',
'autoCloseTime' => '<string>',
'maxResponses' => 123,
'useCustomThankYouPage' => true,
'tpButtonText' => '<string>',
'tpButtonColor' => '<string>',
'tpButtonBackgroundColor' => '<string>',
'tpBackgroundColor' => '<string>',
'tpTextColor' => '<string>',
'tpHeader' => '<string>',
'tpMessage' => '<string>',
'tpButtonUrl' => '<string>',
'useCustomRedirect' => true,
'customSuccessUrl' => '<string>',
'customHoneypot' => '<string>',
'googleRecaptchaEnabled' => true,
'googleRecaptchaSecretKey' => '<string>',
'allowMultipleSubmissions' => true,
'seoTitle' => '<string>',
'seoDescription' => '<string>',
'seoImage' => '<string>',
'allowedDomains' => '<string>',
'fields' => [
[
'id' => '<string>',
'label' => '<string>',
'type' => '<string>',
'subtype' => '<string>',
'required' => true,
'showDescription' => true,
'description' => '<string>',
'placeholder' => '<string>',
'minLength' => 123,
'maxLength' => 123,
'minValue' => 123,
'maxValue' => 123,
'ratingCount' => 123,
'scaleMin' => 123,
'scaleMax' => 123,
'minLabel' => '<string>',
'maxLabel' => '<string>',
'options' => [
[
'id' => '<string>',
'value' => '<string>'
]
],
'logic' => [
'rules' => [
[
'id' => '<string>',
'when' => [
'conditions' => [
[
'id' => '<string>',
'sourceFieldId' => '<string>',
'value' => '<string>'
]
]
],
'targetFieldId' => '<string>',
'targetFieldIds' => [
'<string>'
],
'targetPageId' => '<string>'
]
]
]
]
],
'allowedCountries' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.formbox.app/api/v1/forms/{formId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"removeFormboxBranding\": true,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [\n \"<string>\"\n ],\n \"sendRespondentEmailNotifications\": true,\n \"respondentEmailFromName\": \"<string>\",\n \"respondentEmailSubject\": \"<string>\",\n \"respondentEmailMessageHTML\": \"<string>\",\n \"limitResponses\": true,\n \"isClosed\": true,\n \"autoCloseEnabled\": true,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": 123,\n \"useCustomThankYouPage\": true,\n \"tpButtonText\": \"<string>\",\n \"tpButtonColor\": \"<string>\",\n \"tpButtonBackgroundColor\": \"<string>\",\n \"tpBackgroundColor\": \"<string>\",\n \"tpTextColor\": \"<string>\",\n \"tpHeader\": \"<string>\",\n \"tpMessage\": \"<string>\",\n \"tpButtonUrl\": \"<string>\",\n \"useCustomRedirect\": true,\n \"customSuccessUrl\": \"<string>\",\n \"customHoneypot\": \"<string>\",\n \"googleRecaptchaEnabled\": true,\n \"googleRecaptchaSecretKey\": \"<string>\",\n \"allowMultipleSubmissions\": true,\n \"seoTitle\": \"<string>\",\n \"seoDescription\": \"<string>\",\n \"seoImage\": \"<string>\",\n \"allowedDomains\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"required\": true,\n \"showDescription\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"minValue\": 123,\n \"maxValue\": 123,\n \"ratingCount\": 123,\n \"scaleMin\": 123,\n \"scaleMax\": 123,\n \"minLabel\": \"<string>\",\n \"maxLabel\": \"<string>\",\n \"options\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"logic\": {\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"when\": {\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"sourceFieldId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"targetFieldId\": \"<string>\",\n \"targetFieldIds\": [\n \"<string>\"\n ],\n \"targetPageId\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"allowedCountries\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("api-key", "<api-key>")
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://app.formbox.app/api/v1/forms/{formId}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"removeFormboxBranding\": true,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [\n \"<string>\"\n ],\n \"sendRespondentEmailNotifications\": true,\n \"respondentEmailFromName\": \"<string>\",\n \"respondentEmailSubject\": \"<string>\",\n \"respondentEmailMessageHTML\": \"<string>\",\n \"limitResponses\": true,\n \"isClosed\": true,\n \"autoCloseEnabled\": true,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": 123,\n \"useCustomThankYouPage\": true,\n \"tpButtonText\": \"<string>\",\n \"tpButtonColor\": \"<string>\",\n \"tpButtonBackgroundColor\": \"<string>\",\n \"tpBackgroundColor\": \"<string>\",\n \"tpTextColor\": \"<string>\",\n \"tpHeader\": \"<string>\",\n \"tpMessage\": \"<string>\",\n \"tpButtonUrl\": \"<string>\",\n \"useCustomRedirect\": true,\n \"customSuccessUrl\": \"<string>\",\n \"customHoneypot\": \"<string>\",\n \"googleRecaptchaEnabled\": true,\n \"googleRecaptchaSecretKey\": \"<string>\",\n \"allowMultipleSubmissions\": true,\n \"seoTitle\": \"<string>\",\n \"seoDescription\": \"<string>\",\n \"seoImage\": \"<string>\",\n \"allowedDomains\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"required\": true,\n \"showDescription\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"minValue\": 123,\n \"maxValue\": 123,\n \"ratingCount\": 123,\n \"scaleMin\": 123,\n \"scaleMax\": 123,\n \"minLabel\": \"<string>\",\n \"maxLabel\": \"<string>\",\n \"options\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"logic\": {\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"when\": {\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"sourceFieldId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"targetFieldId\": \"<string>\",\n \"targetFieldIds\": [\n \"<string>\"\n ],\n \"targetPageId\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"allowedCountries\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbox.app/api/v1/forms/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"removeFormboxBranding\": true,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [\n \"<string>\"\n ],\n \"sendRespondentEmailNotifications\": true,\n \"respondentEmailFromName\": \"<string>\",\n \"respondentEmailSubject\": \"<string>\",\n \"respondentEmailMessageHTML\": \"<string>\",\n \"limitResponses\": true,\n \"isClosed\": true,\n \"autoCloseEnabled\": true,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": 123,\n \"useCustomThankYouPage\": true,\n \"tpButtonText\": \"<string>\",\n \"tpButtonColor\": \"<string>\",\n \"tpButtonBackgroundColor\": \"<string>\",\n \"tpBackgroundColor\": \"<string>\",\n \"tpTextColor\": \"<string>\",\n \"tpHeader\": \"<string>\",\n \"tpMessage\": \"<string>\",\n \"tpButtonUrl\": \"<string>\",\n \"useCustomRedirect\": true,\n \"customSuccessUrl\": \"<string>\",\n \"customHoneypot\": \"<string>\",\n \"googleRecaptchaEnabled\": true,\n \"googleRecaptchaSecretKey\": \"<string>\",\n \"allowMultipleSubmissions\": true,\n \"seoTitle\": \"<string>\",\n \"seoDescription\": \"<string>\",\n \"seoImage\": \"<string>\",\n \"allowedDomains\": \"<string>\",\n \"fields\": [\n {\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"type\": \"<string>\",\n \"subtype\": \"<string>\",\n \"required\": true,\n \"showDescription\": true,\n \"description\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"minValue\": 123,\n \"maxValue\": 123,\n \"ratingCount\": 123,\n \"scaleMin\": 123,\n \"scaleMax\": 123,\n \"minLabel\": \"<string>\",\n \"maxLabel\": \"<string>\",\n \"options\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"logic\": {\n \"rules\": [\n {\n \"id\": \"<string>\",\n \"when\": {\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"sourceFieldId\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n },\n \"targetFieldId\": \"<string>\",\n \"targetFieldIds\": [\n \"<string>\"\n ],\n \"targetPageId\": \"<string>\"\n }\n ]\n }\n }\n ],\n \"allowedCountries\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"organizationId": "<string>",
"removeFormboxBranding": true,
"sendEmailNotifications": true,
"emailsToNotify": [
"<string>"
],
"submissionStorageDuration": "<string>",
"sendRespondentEmailNotifications": true,
"respondentEmailFromName": "<string>",
"respondentEmailSubject": "<string>",
"respondentEmailMessageHTML": "<string>",
"submitButtonText": "<string>",
"limitResponses": true,
"isClosed": true,
"autoCloseEnabled": true,
"autoCloseDate": "<string>",
"autoCloseTime": "<string>",
"autoCloseTimezone": "<string>",
"maxResponses": 123,
"useCustomRedirect": true,
"customSuccessUrl": "<string>",
"webhookEnabled": true,
"webhookUrl": "<string>",
"customHoneypot": "<string>",
"googleRecaptchaEnabled": true,
"allowedDomains": "<string>",
"allowedCountries": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"type": "endpoint",
"fields": [
{
"id": "<string>",
"label": "<string>",
"type": "<string>",
"subtype": "<string>",
"required": true,
"showDescription": true,
"description": "<string>",
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"minValue": 123,
"maxValue": 123,
"ratingCount": 123,
"scaleMin": 123,
"scaleMax": 123,
"minLabel": "<string>",
"maxLabel": "<string>",
"options": [
{
"id": "<string>",
"value": "<string>"
}
],
"logic": {
"rules": [
{
"id": "<string>",
"action": "show_field",
"when": {
"combinator": "all",
"conditions": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"operator": "is_empty",
"value": "<string>"
}
]
},
"targetFieldId": "<string>",
"targetFieldIds": [
"<string>"
],
"targetPageId": "<string>"
}
]
}
}
],
"accentColor": "<string>",
"backgroundColor": "<string>",
"buttonBackgroundColor": "<string>",
"buttonBorderStyle": "full",
"buttonTextColor": "<string>",
"closeMessageDescription": "<string>",
"closeMessageTitle": "<string>",
"headerDescription": "<string>",
"headerImage": "<string>",
"headerTitle": "<string>",
"seoDescription": "<string>",
"seoImage": "<string>",
"seoTitle": "<string>",
"inputBorderStyle": "full",
"logo": "<string>",
"pageMode": "compact",
"saveAnswers": true,
"allowMultipleSubmissions": true,
"showCustomClosedMessage": true,
"textColor": "<string>",
"tpBackgroundColor": "<string>",
"tpButtonColor": "<string>",
"tpButtonText": "<string>",
"tpButtonUrl": "<string>",
"tpHeader": "<string>",
"tpMessage": "<string>",
"tpTextColor": "<string>",
"useCustomThankYouPage": true,
"tpButtonBackgroundColor": "<string>",
"ipBlacklist": "<string>",
"imageCompressionType": [
"webp"
],
"disableEmailDataCensoring": true
}{
"error": {
"code": "unauthorized",
"message": "No API key provided. Pass your API key in the api-key header."
}
}{
"error": {
"code": "forbidden",
"message": "Your API key requires full access scope. Some settings such as respondent email notifications, custom redirects, and auto-close require a paid plan."
}
}{
"error": {
"code": "not_found",
"message": "No form with this ID exists in your organization. Check that the formId is correct and belongs to the organization associated with your API key."
}
}{
"error": {
"code": "unprocessable_entity",
"message": "submissionStorageDuration: Invalid enum value — expected '30' | '60' | '90' | '365' | 'forever' | 'never'."
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Please slow down and try again shortly."
}
}{
"error": {
"code": "internal_server_error",
"message": "An internal server error occurred. Please contact support if the problem persists."
}
}Headers
The API key.
Path Parameters
The unique ID of the form.
"clux0rgak00011..."
Body
endpoint, hosted 30, 60, 90, 365, forever, never 601600Show child attributes
Show child attributes
Response
The updated form.
The unique ID of the form.
The name of the form.
The ID of the organization.
Whether to remove Formbox branding from the form.
Whether to send email notifications for new submissions.
Email addresses to send notifications to.
The duration of the submission storage.
Whether to send respondent email notifications.
From name for respondent email notifications.
Subject for respondent email notifications.
Message for respondent email notifications.
Text for the submit button.
Whether to limit the number of responses for the form.
Is the form closed?
Whether to auto close the form on a specific date.
The date to auto close the form.
The time to auto close the form.
The timezone for the auto close date and time.
Maximum number of responses for the form.
Whether to use a custom redirect URL.
Custom redirect URL for successful submissions.
Whether to enable webhooks.
Webhook URL.
Custom honeypot field name.
Whether to enable Google reCAPTCHA.
Allowed domains for the form.
Allowed countries for the form.
The date the form was created.
The date the form was last updated.
The type of the form. Can be endpoint or hosted.
endpoint, hosted The form fields for hosted forms.
Show child attributes
Show child attributes
The form accent color.
The form background color.
The form button background color.
The form button border style.
full, flat, rounded The form button text color.
Description for the closed message.
Title for the closed message.
Description for the header.
The form header image.
Title for the header.
Description used for social sharing and link previews.
Absolute HTTPS image URL used for social sharing previews.
Title used for social sharing and link previews.
The form input border style.
full, flat, rounded The form logo.
The form page mode.
compact, full Whether answers are saved.
Whether respondents can submit the form again from the success state.
Whether to show a custom closed message.
The form text color.
Background color for the thank you page.
Text color for the thank you page button.
Text for the thank you page button.
URL for the thank you page button.
Header text for the thank you page.
Message text for the thank you page.
Text color for the thank you page.
Whether to use a custom thank you page.
Background color for the thank you page button.
IP blacklist for the form.
The image types used for this form.
webp, jpeg, png Whether to disable email data censoring for submission notifications.