curl --request POST \
--url https://app.formbox.app/api/v1/forms \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"name": "<string>",
"type": "endpoint",
"removeFormboxBranding": false,
"sendEmailNotifications": true,
"emailsToNotify": [],
"submissionStorageDuration": "365",
"sendRespondentEmailNotifications": false,
"respondentEmailFromName": "",
"respondentEmailSubject": "",
"respondentEmailMessageHTML": "",
"limitResponses": false,
"isClosed": false,
"autoCloseEnabled": false,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": null,
"useCustomThankYouPage": false,
"tpButtonText": "",
"tpButtonColor": "#030712",
"tpButtonBackgroundColor": "#f3f4f6",
"tpBackgroundColor": "#ffffff",
"tpTextColor": "#030712",
"tpHeader": "",
"tpMessage": "",
"tpButtonUrl": "",
"useCustomRedirect": false,
"customSuccessUrl": "",
"customHoneypot": "",
"googleRecaptchaEnabled": false,
"googleRecaptchaSecretKey": "",
"saveAnswers": true,
"allowMultipleSubmissions": true,
"allowedDomains": "",
"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>"
}
]
}
}
]
}
'import requests
url = "https://app.formbox.app/api/v1/forms"
payload = {
"name": "<string>",
"type": "endpoint",
"removeFormboxBranding": False,
"sendEmailNotifications": True,
"emailsToNotify": [],
"submissionStorageDuration": "365",
"sendRespondentEmailNotifications": False,
"respondentEmailFromName": "",
"respondentEmailSubject": "",
"respondentEmailMessageHTML": "",
"limitResponses": False,
"isClosed": False,
"autoCloseEnabled": False,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": None,
"useCustomThankYouPage": False,
"tpButtonText": "",
"tpButtonColor": "#030712",
"tpButtonBackgroundColor": "#f3f4f6",
"tpBackgroundColor": "#ffffff",
"tpTextColor": "#030712",
"tpHeader": "",
"tpMessage": "",
"tpButtonUrl": "",
"useCustomRedirect": False,
"customSuccessUrl": "",
"customHoneypot": "",
"googleRecaptchaEnabled": False,
"googleRecaptchaSecretKey": "",
"saveAnswers": True,
"allowMultipleSubmissions": True,
"allowedDomains": "",
"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>"
}
] }
}
]
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
type: 'endpoint',
removeFormboxBranding: false,
sendEmailNotifications: true,
emailsToNotify: [],
submissionStorageDuration: '365',
sendRespondentEmailNotifications: false,
respondentEmailFromName: '',
respondentEmailSubject: '',
respondentEmailMessageHTML: '',
limitResponses: false,
isClosed: false,
autoCloseEnabled: false,
autoCloseDate: '<string>',
autoCloseTimezone: '<string>',
autoCloseTime: '<string>',
maxResponses: null,
useCustomThankYouPage: false,
tpButtonText: '',
tpButtonColor: '#030712',
tpButtonBackgroundColor: '#f3f4f6',
tpBackgroundColor: '#ffffff',
tpTextColor: '#030712',
tpHeader: '',
tpMessage: '',
tpButtonUrl: '',
useCustomRedirect: false,
customSuccessUrl: '',
customHoneypot: '',
googleRecaptchaEnabled: false,
googleRecaptchaSecretKey: '',
saveAnswers: true,
allowMultipleSubmissions: true,
allowedDomains: '',
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>'
}
]
}
}
]
})
};
fetch('https://app.formbox.app/api/v1/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://app.formbox.app/api/v1/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>',
'type' => 'endpoint',
'removeFormboxBranding' => false,
'sendEmailNotifications' => true,
'emailsToNotify' => [
],
'submissionStorageDuration' => '365',
'sendRespondentEmailNotifications' => false,
'respondentEmailFromName' => '',
'respondentEmailSubject' => '',
'respondentEmailMessageHTML' => '',
'limitResponses' => false,
'isClosed' => false,
'autoCloseEnabled' => false,
'autoCloseDate' => '<string>',
'autoCloseTimezone' => '<string>',
'autoCloseTime' => '<string>',
'maxResponses' => null,
'useCustomThankYouPage' => false,
'tpButtonText' => '',
'tpButtonColor' => '#030712',
'tpButtonBackgroundColor' => '#f3f4f6',
'tpBackgroundColor' => '#ffffff',
'tpTextColor' => '#030712',
'tpHeader' => '',
'tpMessage' => '',
'tpButtonUrl' => '',
'useCustomRedirect' => false,
'customSuccessUrl' => '',
'customHoneypot' => '',
'googleRecaptchaEnabled' => false,
'googleRecaptchaSecretKey' => '',
'saveAnswers' => true,
'allowMultipleSubmissions' => true,
'allowedDomains' => '',
'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>'
]
]
]
]
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"endpoint\",\n \"removeFormboxBranding\": false,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [],\n \"submissionStorageDuration\": \"365\",\n \"sendRespondentEmailNotifications\": false,\n \"respondentEmailFromName\": \"\",\n \"respondentEmailSubject\": \"\",\n \"respondentEmailMessageHTML\": \"\",\n \"limitResponses\": false,\n \"isClosed\": false,\n \"autoCloseEnabled\": false,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": null,\n \"useCustomThankYouPage\": false,\n \"tpButtonText\": \"\",\n \"tpButtonColor\": \"#030712\",\n \"tpButtonBackgroundColor\": \"#f3f4f6\",\n \"tpBackgroundColor\": \"#ffffff\",\n \"tpTextColor\": \"#030712\",\n \"tpHeader\": \"\",\n \"tpMessage\": \"\",\n \"tpButtonUrl\": \"\",\n \"useCustomRedirect\": false,\n \"customSuccessUrl\": \"\",\n \"customHoneypot\": \"\",\n \"googleRecaptchaEnabled\": false,\n \"googleRecaptchaSecretKey\": \"\",\n \"saveAnswers\": true,\n \"allowMultipleSubmissions\": true,\n \"allowedDomains\": \"\",\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}")
req, _ := http.NewRequest("POST", 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.post("https://app.formbox.app/api/v1/forms")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"endpoint\",\n \"removeFormboxBranding\": false,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [],\n \"submissionStorageDuration\": \"365\",\n \"sendRespondentEmailNotifications\": false,\n \"respondentEmailFromName\": \"\",\n \"respondentEmailSubject\": \"\",\n \"respondentEmailMessageHTML\": \"\",\n \"limitResponses\": false,\n \"isClosed\": false,\n \"autoCloseEnabled\": false,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": null,\n \"useCustomThankYouPage\": false,\n \"tpButtonText\": \"\",\n \"tpButtonColor\": \"#030712\",\n \"tpButtonBackgroundColor\": \"#f3f4f6\",\n \"tpBackgroundColor\": \"#ffffff\",\n \"tpTextColor\": \"#030712\",\n \"tpHeader\": \"\",\n \"tpMessage\": \"\",\n \"tpButtonUrl\": \"\",\n \"useCustomRedirect\": false,\n \"customSuccessUrl\": \"\",\n \"customHoneypot\": \"\",\n \"googleRecaptchaEnabled\": false,\n \"googleRecaptchaSecretKey\": \"\",\n \"saveAnswers\": true,\n \"allowMultipleSubmissions\": true,\n \"allowedDomains\": \"\",\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbox.app/api/v1/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"endpoint\",\n \"removeFormboxBranding\": false,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [],\n \"submissionStorageDuration\": \"365\",\n \"sendRespondentEmailNotifications\": false,\n \"respondentEmailFromName\": \"\",\n \"respondentEmailSubject\": \"\",\n \"respondentEmailMessageHTML\": \"\",\n \"limitResponses\": false,\n \"isClosed\": false,\n \"autoCloseEnabled\": false,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": null,\n \"useCustomThankYouPage\": false,\n \"tpButtonText\": \"\",\n \"tpButtonColor\": \"#030712\",\n \"tpButtonBackgroundColor\": \"#f3f4f6\",\n \"tpBackgroundColor\": \"#ffffff\",\n \"tpTextColor\": \"#030712\",\n \"tpHeader\": \"\",\n \"tpMessage\": \"\",\n \"tpButtonUrl\": \"\",\n \"useCustomRedirect\": false,\n \"customSuccessUrl\": \"\",\n \"customHoneypot\": \"\",\n \"googleRecaptchaEnabled\": false,\n \"googleRecaptchaSecretKey\": \"\",\n \"saveAnswers\": true,\n \"allowMultipleSubmissions\": true,\n \"allowedDomains\": \"\",\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}"
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": "unprocessable_entity",
"message": "name: Required. type: Invalid enum value — expected 'endpoint' | 'hosted'."
}
}{
"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."
}
}Create a new form
Create a new form for the authenticated organization.
curl --request POST \
--url https://app.formbox.app/api/v1/forms \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"name": "<string>",
"type": "endpoint",
"removeFormboxBranding": false,
"sendEmailNotifications": true,
"emailsToNotify": [],
"submissionStorageDuration": "365",
"sendRespondentEmailNotifications": false,
"respondentEmailFromName": "",
"respondentEmailSubject": "",
"respondentEmailMessageHTML": "",
"limitResponses": false,
"isClosed": false,
"autoCloseEnabled": false,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": null,
"useCustomThankYouPage": false,
"tpButtonText": "",
"tpButtonColor": "#030712",
"tpButtonBackgroundColor": "#f3f4f6",
"tpBackgroundColor": "#ffffff",
"tpTextColor": "#030712",
"tpHeader": "",
"tpMessage": "",
"tpButtonUrl": "",
"useCustomRedirect": false,
"customSuccessUrl": "",
"customHoneypot": "",
"googleRecaptchaEnabled": false,
"googleRecaptchaSecretKey": "",
"saveAnswers": true,
"allowMultipleSubmissions": true,
"allowedDomains": "",
"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>"
}
]
}
}
]
}
'import requests
url = "https://app.formbox.app/api/v1/forms"
payload = {
"name": "<string>",
"type": "endpoint",
"removeFormboxBranding": False,
"sendEmailNotifications": True,
"emailsToNotify": [],
"submissionStorageDuration": "365",
"sendRespondentEmailNotifications": False,
"respondentEmailFromName": "",
"respondentEmailSubject": "",
"respondentEmailMessageHTML": "",
"limitResponses": False,
"isClosed": False,
"autoCloseEnabled": False,
"autoCloseDate": "<string>",
"autoCloseTimezone": "<string>",
"autoCloseTime": "<string>",
"maxResponses": None,
"useCustomThankYouPage": False,
"tpButtonText": "",
"tpButtonColor": "#030712",
"tpButtonBackgroundColor": "#f3f4f6",
"tpBackgroundColor": "#ffffff",
"tpTextColor": "#030712",
"tpHeader": "",
"tpMessage": "",
"tpButtonUrl": "",
"useCustomRedirect": False,
"customSuccessUrl": "",
"customHoneypot": "",
"googleRecaptchaEnabled": False,
"googleRecaptchaSecretKey": "",
"saveAnswers": True,
"allowMultipleSubmissions": True,
"allowedDomains": "",
"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>"
}
] }
}
]
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
type: 'endpoint',
removeFormboxBranding: false,
sendEmailNotifications: true,
emailsToNotify: [],
submissionStorageDuration: '365',
sendRespondentEmailNotifications: false,
respondentEmailFromName: '',
respondentEmailSubject: '',
respondentEmailMessageHTML: '',
limitResponses: false,
isClosed: false,
autoCloseEnabled: false,
autoCloseDate: '<string>',
autoCloseTimezone: '<string>',
autoCloseTime: '<string>',
maxResponses: null,
useCustomThankYouPage: false,
tpButtonText: '',
tpButtonColor: '#030712',
tpButtonBackgroundColor: '#f3f4f6',
tpBackgroundColor: '#ffffff',
tpTextColor: '#030712',
tpHeader: '',
tpMessage: '',
tpButtonUrl: '',
useCustomRedirect: false,
customSuccessUrl: '',
customHoneypot: '',
googleRecaptchaEnabled: false,
googleRecaptchaSecretKey: '',
saveAnswers: true,
allowMultipleSubmissions: true,
allowedDomains: '',
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>'
}
]
}
}
]
})
};
fetch('https://app.formbox.app/api/v1/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://app.formbox.app/api/v1/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>',
'type' => 'endpoint',
'removeFormboxBranding' => false,
'sendEmailNotifications' => true,
'emailsToNotify' => [
],
'submissionStorageDuration' => '365',
'sendRespondentEmailNotifications' => false,
'respondentEmailFromName' => '',
'respondentEmailSubject' => '',
'respondentEmailMessageHTML' => '',
'limitResponses' => false,
'isClosed' => false,
'autoCloseEnabled' => false,
'autoCloseDate' => '<string>',
'autoCloseTimezone' => '<string>',
'autoCloseTime' => '<string>',
'maxResponses' => null,
'useCustomThankYouPage' => false,
'tpButtonText' => '',
'tpButtonColor' => '#030712',
'tpButtonBackgroundColor' => '#f3f4f6',
'tpBackgroundColor' => '#ffffff',
'tpTextColor' => '#030712',
'tpHeader' => '',
'tpMessage' => '',
'tpButtonUrl' => '',
'useCustomRedirect' => false,
'customSuccessUrl' => '',
'customHoneypot' => '',
'googleRecaptchaEnabled' => false,
'googleRecaptchaSecretKey' => '',
'saveAnswers' => true,
'allowMultipleSubmissions' => true,
'allowedDomains' => '',
'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>'
]
]
]
]
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"endpoint\",\n \"removeFormboxBranding\": false,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [],\n \"submissionStorageDuration\": \"365\",\n \"sendRespondentEmailNotifications\": false,\n \"respondentEmailFromName\": \"\",\n \"respondentEmailSubject\": \"\",\n \"respondentEmailMessageHTML\": \"\",\n \"limitResponses\": false,\n \"isClosed\": false,\n \"autoCloseEnabled\": false,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": null,\n \"useCustomThankYouPage\": false,\n \"tpButtonText\": \"\",\n \"tpButtonColor\": \"#030712\",\n \"tpButtonBackgroundColor\": \"#f3f4f6\",\n \"tpBackgroundColor\": \"#ffffff\",\n \"tpTextColor\": \"#030712\",\n \"tpHeader\": \"\",\n \"tpMessage\": \"\",\n \"tpButtonUrl\": \"\",\n \"useCustomRedirect\": false,\n \"customSuccessUrl\": \"\",\n \"customHoneypot\": \"\",\n \"googleRecaptchaEnabled\": false,\n \"googleRecaptchaSecretKey\": \"\",\n \"saveAnswers\": true,\n \"allowMultipleSubmissions\": true,\n \"allowedDomains\": \"\",\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}")
req, _ := http.NewRequest("POST", 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.post("https://app.formbox.app/api/v1/forms")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"type\": \"endpoint\",\n \"removeFormboxBranding\": false,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [],\n \"submissionStorageDuration\": \"365\",\n \"sendRespondentEmailNotifications\": false,\n \"respondentEmailFromName\": \"\",\n \"respondentEmailSubject\": \"\",\n \"respondentEmailMessageHTML\": \"\",\n \"limitResponses\": false,\n \"isClosed\": false,\n \"autoCloseEnabled\": false,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": null,\n \"useCustomThankYouPage\": false,\n \"tpButtonText\": \"\",\n \"tpButtonColor\": \"#030712\",\n \"tpButtonBackgroundColor\": \"#f3f4f6\",\n \"tpBackgroundColor\": \"#ffffff\",\n \"tpTextColor\": \"#030712\",\n \"tpHeader\": \"\",\n \"tpMessage\": \"\",\n \"tpButtonUrl\": \"\",\n \"useCustomRedirect\": false,\n \"customSuccessUrl\": \"\",\n \"customHoneypot\": \"\",\n \"googleRecaptchaEnabled\": false,\n \"googleRecaptchaSecretKey\": \"\",\n \"saveAnswers\": true,\n \"allowMultipleSubmissions\": true,\n \"allowedDomains\": \"\",\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbox.app/api/v1/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"type\": \"endpoint\",\n \"removeFormboxBranding\": false,\n \"sendEmailNotifications\": true,\n \"emailsToNotify\": [],\n \"submissionStorageDuration\": \"365\",\n \"sendRespondentEmailNotifications\": false,\n \"respondentEmailFromName\": \"\",\n \"respondentEmailSubject\": \"\",\n \"respondentEmailMessageHTML\": \"\",\n \"limitResponses\": false,\n \"isClosed\": false,\n \"autoCloseEnabled\": false,\n \"autoCloseDate\": \"<string>\",\n \"autoCloseTimezone\": \"<string>\",\n \"autoCloseTime\": \"<string>\",\n \"maxResponses\": null,\n \"useCustomThankYouPage\": false,\n \"tpButtonText\": \"\",\n \"tpButtonColor\": \"#030712\",\n \"tpButtonBackgroundColor\": \"#f3f4f6\",\n \"tpBackgroundColor\": \"#ffffff\",\n \"tpTextColor\": \"#030712\",\n \"tpHeader\": \"\",\n \"tpMessage\": \"\",\n \"tpButtonUrl\": \"\",\n \"useCustomRedirect\": false,\n \"customSuccessUrl\": \"\",\n \"customHoneypot\": \"\",\n \"googleRecaptchaEnabled\": false,\n \"googleRecaptchaSecretKey\": \"\",\n \"saveAnswers\": true,\n \"allowMultipleSubmissions\": true,\n \"allowedDomains\": \"\",\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}"
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": "unprocessable_entity",
"message": "name: Required. type: Invalid enum value — expected 'endpoint' | 'hosted'."
}
}{
"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.
Body
1endpoint, hosted 30, 60, 90, 365, forever, never Show child attributes
Show child attributes
Response
The newly created 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.