Create a form
Creates a form. Send the fields inside a form object; title is required. A new form is a draft unless you set status. Set form_type to post_purchase or general: pre_purchase is retired and returns 422. Send form_components to create the form’s elements in the same request. Creating a form sends the form_created webhook event. A form created as active has no public token until you call Generate a public token.
curl --request POST \
--url https://api.fluid.app/api/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"form": {
"title": "Enrollment - Canada",
"description": "Tax and payout details we need before we can pay your commissions in Canada.",
"form_type": "post_purchase",
"status": "draft",
"country_ids": [
39
],
"form_components": "[{\"element_type\":\"input\",\"puck_type\":\"legal_name\",\"label\":\"Legal name\",\"placeholder\":\"As it appears on your tax return\",\"required\":true,\"sensitive_info\":false,\"is_form_field\":true},{\"element_type\":\"input\",\"puck_type\":\"date_of_birth\",\"label\":\"Date of birth\",\"placeholder\":\"MM/DD/YYYY\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"short_text_entry\",\"puck_type\":\"short_text_entry\",\"label\":\"Social Insurance Number (SIN)\",\"placeholder\":\"123 456 789\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"multiple_choice_entry\",\"puck_type\":\"multiple_choice_entry\",\"label\":\"How did you hear about Dunder Mifflin?\",\"required\":false,\"sensitive_info\":false,\"is_form_field\":true,\"multiple_choice_options\":[{\"label\":\"Social media\"},{\"label\":\"A friend or family member\"},{\"label\":\"A rep\"},{\"label\":\"Search\"},{\"label\":\"An event\"},{\"label\":\"Other\"}]}]"
}
}
'import requests
url = "https://api.fluid.app/api/forms"
payload = { "form": {
"title": "Enrollment - Canada",
"description": "Tax and payout details we need before we can pay your commissions in Canada.",
"form_type": "post_purchase",
"status": "draft",
"country_ids": [39],
"form_components": "[{\"element_type\":\"input\",\"puck_type\":\"legal_name\",\"label\":\"Legal name\",\"placeholder\":\"As it appears on your tax return\",\"required\":true,\"sensitive_info\":false,\"is_form_field\":true},{\"element_type\":\"input\",\"puck_type\":\"date_of_birth\",\"label\":\"Date of birth\",\"placeholder\":\"MM/DD/YYYY\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"short_text_entry\",\"puck_type\":\"short_text_entry\",\"label\":\"Social Insurance Number (SIN)\",\"placeholder\":\"123 456 789\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"multiple_choice_entry\",\"puck_type\":\"multiple_choice_entry\",\"label\":\"How did you hear about Dunder Mifflin?\",\"required\":false,\"sensitive_info\":false,\"is_form_field\":true,\"multiple_choice_options\":[{\"label\":\"Social media\"},{\"label\":\"A friend or family member\"},{\"label\":\"A rep\"},{\"label\":\"Search\"},{\"label\":\"An event\"},{\"label\":\"Other\"}]}]"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
form: {
title: 'Enrollment - Canada',
description: 'Tax and payout details we need before we can pay your commissions in Canada.',
form_type: 'post_purchase',
status: 'draft',
country_ids: [39],
form_components: '[{"element_type":"input","puck_type":"legal_name","label":"Legal name","placeholder":"As it appears on your tax return","required":true,"sensitive_info":false,"is_form_field":true},{"element_type":"input","puck_type":"date_of_birth","label":"Date of birth","placeholder":"MM/DD/YYYY","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"short_text_entry","puck_type":"short_text_entry","label":"Social Insurance Number (SIN)","placeholder":"123 456 789","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"multiple_choice_entry","puck_type":"multiple_choice_entry","label":"How did you hear about Dunder Mifflin?","required":false,"sensitive_info":false,"is_form_field":true,"multiple_choice_options":[{"label":"Social media"},{"label":"A friend or family member"},{"label":"A rep"},{"label":"Search"},{"label":"An event"},{"label":"Other"}]}]'
}
})
};
fetch('https://api.fluid.app/api/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://api.fluid.app/api/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([
'form' => [
'title' => 'Enrollment - Canada',
'description' => 'Tax and payout details we need before we can pay your commissions in Canada.',
'form_type' => 'post_purchase',
'status' => 'draft',
'country_ids' => [
39
],
'form_components' => '[{"element_type":"input","puck_type":"legal_name","label":"Legal name","placeholder":"As it appears on your tax return","required":true,"sensitive_info":false,"is_form_field":true},{"element_type":"input","puck_type":"date_of_birth","label":"Date of birth","placeholder":"MM/DD/YYYY","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"short_text_entry","puck_type":"short_text_entry","label":"Social Insurance Number (SIN)","placeholder":"123 456 789","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"multiple_choice_entry","puck_type":"multiple_choice_entry","label":"How did you hear about Dunder Mifflin?","required":false,"sensitive_info":false,"is_form_field":true,"multiple_choice_options":[{"label":"Social media"},{"label":"A friend or family member"},{"label":"A rep"},{"label":"Search"},{"label":"An event"},{"label":"Other"}]}]'
]
]),
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://api.fluid.app/api/forms"
payload := strings.NewReader("{\n \"form\": {\n \"title\": \"Enrollment - Canada\",\n \"description\": \"Tax and payout details we need before we can pay your commissions in Canada.\",\n \"form_type\": \"post_purchase\",\n \"status\": \"draft\",\n \"country_ids\": [\n 39\n ],\n \"form_components\": \"[{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"legal_name\\\",\\\"label\\\":\\\"Legal name\\\",\\\"placeholder\\\":\\\"As it appears on your tax return\\\",\\\"required\\\":true,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"date_of_birth\\\",\\\"label\\\":\\\"Date of birth\\\",\\\"placeholder\\\":\\\"MM/DD/YYYY\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"short_text_entry\\\",\\\"puck_type\\\":\\\"short_text_entry\\\",\\\"label\\\":\\\"Social Insurance Number (SIN)\\\",\\\"placeholder\\\":\\\"123 456 789\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"multiple_choice_entry\\\",\\\"puck_type\\\":\\\"multiple_choice_entry\\\",\\\"label\\\":\\\"How did you hear about Dunder Mifflin?\\\",\\\"required\\\":false,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true,\\\"multiple_choice_options\\\":[{\\\"label\\\":\\\"Social media\\\"},{\\\"label\\\":\\\"A friend or family member\\\"},{\\\"label\\\":\\\"A rep\\\"},{\\\"label\\\":\\\"Search\\\"},{\\\"label\\\":\\\"An event\\\"},{\\\"label\\\":\\\"Other\\\"}]}]\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluid.app/api/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"form\": {\n \"title\": \"Enrollment - Canada\",\n \"description\": \"Tax and payout details we need before we can pay your commissions in Canada.\",\n \"form_type\": \"post_purchase\",\n \"status\": \"draft\",\n \"country_ids\": [\n 39\n ],\n \"form_components\": \"[{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"legal_name\\\",\\\"label\\\":\\\"Legal name\\\",\\\"placeholder\\\":\\\"As it appears on your tax return\\\",\\\"required\\\":true,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"date_of_birth\\\",\\\"label\\\":\\\"Date of birth\\\",\\\"placeholder\\\":\\\"MM/DD/YYYY\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"short_text_entry\\\",\\\"puck_type\\\":\\\"short_text_entry\\\",\\\"label\\\":\\\"Social Insurance Number (SIN)\\\",\\\"placeholder\\\":\\\"123 456 789\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"multiple_choice_entry\\\",\\\"puck_type\\\":\\\"multiple_choice_entry\\\",\\\"label\\\":\\\"How did you hear about Dunder Mifflin?\\\",\\\"required\\\":false,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true,\\\"multiple_choice_options\\\":[{\\\"label\\\":\\\"Social media\\\"},{\\\"label\\\":\\\"A friend or family member\\\"},{\\\"label\\\":\\\"A rep\\\"},{\\\"label\\\":\\\"Search\\\"},{\\\"label\\\":\\\"An event\\\"},{\\\"label\\\":\\\"Other\\\"}]}]\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"form\": {\n \"title\": \"Enrollment - Canada\",\n \"description\": \"Tax and payout details we need before we can pay your commissions in Canada.\",\n \"form_type\": \"post_purchase\",\n \"status\": \"draft\",\n \"country_ids\": [\n 39\n ],\n \"form_components\": \"[{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"legal_name\\\",\\\"label\\\":\\\"Legal name\\\",\\\"placeholder\\\":\\\"As it appears on your tax return\\\",\\\"required\\\":true,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"date_of_birth\\\",\\\"label\\\":\\\"Date of birth\\\",\\\"placeholder\\\":\\\"MM/DD/YYYY\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"short_text_entry\\\",\\\"puck_type\\\":\\\"short_text_entry\\\",\\\"label\\\":\\\"Social Insurance Number (SIN)\\\",\\\"placeholder\\\":\\\"123 456 789\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"multiple_choice_entry\\\",\\\"puck_type\\\":\\\"multiple_choice_entry\\\",\\\"label\\\":\\\"How did you hear about Dunder Mifflin?\\\",\\\"required\\\":false,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true,\\\"multiple_choice_options\\\":[{\\\"label\\\":\\\"Social media\\\"},{\\\"label\\\":\\\"A friend or family member\\\"},{\\\"label\\\":\\\"A rep\\\"},{\\\"label\\\":\\\"Search\\\"},{\\\"label\\\":\\\"An event\\\"},{\\\"label\\\":\\\"Other\\\"}]}]\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Form created successfully",
"form": {
"id": 4136,
"title": "Enrollment - Canada",
"status": "draft",
"description": "Tax and payout details we need before we can pay your commissions in Canada.",
"form_type": "post_purchase",
"form_redirect": null,
"updated_at": "2026-10-07T15:04:12Z",
"form_components": "[{\"element_type\":\"input\",\"puck_type\":\"legal_name\",\"label\":\"Legal name\",\"placeholder\":\"As it appears on your tax return\",\"required\":true,\"sensitive_info\":false,\"is_form_field\":true,\"id\":18321},{\"element_type\":\"input\",\"puck_type\":\"date_of_birth\",\"label\":\"Date of birth\",\"placeholder\":\"MM/DD/YYYY\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true,\"id\":18322},{\"element_type\":\"short_text_entry\",\"puck_type\":\"short_text_entry\",\"label\":\"Social Insurance Number (SIN)\",\"placeholder\":\"123 456 789\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true,\"id\":18323},{\"element_type\":\"multiple_choice_entry\",\"puck_type\":\"multiple_choice_entry\",\"label\":\"How did you hear about Dunder Mifflin?\",\"required\":false,\"sensitive_info\":false,\"is_form_field\":true,\"multiple_choice_options\":[{\"label\":\"Social media\"},{\"label\":\"A friend or family member\"},{\"label\":\"A rep\"},{\"label\":\"Search\"},{\"label\":\"An event\"},{\"label\":\"Other\"}],\"id\":18324}]",
"countries": [
{
"id": 39,
"name": "Canada",
"iso": "CA"
}
],
"form_styles": null,
"form_respondents_count": 0,
"public_token": null,
"embed_settings": {
"password_protected": false
},
"embed_url": null,
"share_url": null
},
"meta": {
"request_id": "8a2f61c4-7e0d-4d19-b5a3-2c9e84f1d067",
"timestamp": "2026-10-07T15:04:12Z"
}
}Headers
Optional client-chosen key, 1 to 255 characters with at least one that is not whitespace; a blank key answers 422. A retry of the same request with the same key from the same company answers with the record the first request created instead of creating another, even when the first response was lost. The same key sent with a different request, or by a different user or credential, answers 422.
1 - 255\SBody
The new form. Send its fields inside a form object, for example {"form": {"title": "Enrollment details", "form_type": "post_purchase"}}. The server reads only the form object. It takes the same fields as Update a form, and title is required.
curl --request POST \
--url https://api.fluid.app/api/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"form": {
"title": "Enrollment - Canada",
"description": "Tax and payout details we need before we can pay your commissions in Canada.",
"form_type": "post_purchase",
"status": "draft",
"country_ids": [
39
],
"form_components": "[{\"element_type\":\"input\",\"puck_type\":\"legal_name\",\"label\":\"Legal name\",\"placeholder\":\"As it appears on your tax return\",\"required\":true,\"sensitive_info\":false,\"is_form_field\":true},{\"element_type\":\"input\",\"puck_type\":\"date_of_birth\",\"label\":\"Date of birth\",\"placeholder\":\"MM/DD/YYYY\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"short_text_entry\",\"puck_type\":\"short_text_entry\",\"label\":\"Social Insurance Number (SIN)\",\"placeholder\":\"123 456 789\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"multiple_choice_entry\",\"puck_type\":\"multiple_choice_entry\",\"label\":\"How did you hear about Dunder Mifflin?\",\"required\":false,\"sensitive_info\":false,\"is_form_field\":true,\"multiple_choice_options\":[{\"label\":\"Social media\"},{\"label\":\"A friend or family member\"},{\"label\":\"A rep\"},{\"label\":\"Search\"},{\"label\":\"An event\"},{\"label\":\"Other\"}]}]"
}
}
'import requests
url = "https://api.fluid.app/api/forms"
payload = { "form": {
"title": "Enrollment - Canada",
"description": "Tax and payout details we need before we can pay your commissions in Canada.",
"form_type": "post_purchase",
"status": "draft",
"country_ids": [39],
"form_components": "[{\"element_type\":\"input\",\"puck_type\":\"legal_name\",\"label\":\"Legal name\",\"placeholder\":\"As it appears on your tax return\",\"required\":true,\"sensitive_info\":false,\"is_form_field\":true},{\"element_type\":\"input\",\"puck_type\":\"date_of_birth\",\"label\":\"Date of birth\",\"placeholder\":\"MM/DD/YYYY\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"short_text_entry\",\"puck_type\":\"short_text_entry\",\"label\":\"Social Insurance Number (SIN)\",\"placeholder\":\"123 456 789\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true},{\"element_type\":\"multiple_choice_entry\",\"puck_type\":\"multiple_choice_entry\",\"label\":\"How did you hear about Dunder Mifflin?\",\"required\":false,\"sensitive_info\":false,\"is_form_field\":true,\"multiple_choice_options\":[{\"label\":\"Social media\"},{\"label\":\"A friend or family member\"},{\"label\":\"A rep\"},{\"label\":\"Search\"},{\"label\":\"An event\"},{\"label\":\"Other\"}]}]"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
form: {
title: 'Enrollment - Canada',
description: 'Tax and payout details we need before we can pay your commissions in Canada.',
form_type: 'post_purchase',
status: 'draft',
country_ids: [39],
form_components: '[{"element_type":"input","puck_type":"legal_name","label":"Legal name","placeholder":"As it appears on your tax return","required":true,"sensitive_info":false,"is_form_field":true},{"element_type":"input","puck_type":"date_of_birth","label":"Date of birth","placeholder":"MM/DD/YYYY","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"short_text_entry","puck_type":"short_text_entry","label":"Social Insurance Number (SIN)","placeholder":"123 456 789","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"multiple_choice_entry","puck_type":"multiple_choice_entry","label":"How did you hear about Dunder Mifflin?","required":false,"sensitive_info":false,"is_form_field":true,"multiple_choice_options":[{"label":"Social media"},{"label":"A friend or family member"},{"label":"A rep"},{"label":"Search"},{"label":"An event"},{"label":"Other"}]}]'
}
})
};
fetch('https://api.fluid.app/api/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://api.fluid.app/api/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([
'form' => [
'title' => 'Enrollment - Canada',
'description' => 'Tax and payout details we need before we can pay your commissions in Canada.',
'form_type' => 'post_purchase',
'status' => 'draft',
'country_ids' => [
39
],
'form_components' => '[{"element_type":"input","puck_type":"legal_name","label":"Legal name","placeholder":"As it appears on your tax return","required":true,"sensitive_info":false,"is_form_field":true},{"element_type":"input","puck_type":"date_of_birth","label":"Date of birth","placeholder":"MM/DD/YYYY","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"short_text_entry","puck_type":"short_text_entry","label":"Social Insurance Number (SIN)","placeholder":"123 456 789","required":true,"sensitive_info":true,"is_form_field":true},{"element_type":"multiple_choice_entry","puck_type":"multiple_choice_entry","label":"How did you hear about Dunder Mifflin?","required":false,"sensitive_info":false,"is_form_field":true,"multiple_choice_options":[{"label":"Social media"},{"label":"A friend or family member"},{"label":"A rep"},{"label":"Search"},{"label":"An event"},{"label":"Other"}]}]'
]
]),
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://api.fluid.app/api/forms"
payload := strings.NewReader("{\n \"form\": {\n \"title\": \"Enrollment - Canada\",\n \"description\": \"Tax and payout details we need before we can pay your commissions in Canada.\",\n \"form_type\": \"post_purchase\",\n \"status\": \"draft\",\n \"country_ids\": [\n 39\n ],\n \"form_components\": \"[{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"legal_name\\\",\\\"label\\\":\\\"Legal name\\\",\\\"placeholder\\\":\\\"As it appears on your tax return\\\",\\\"required\\\":true,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"date_of_birth\\\",\\\"label\\\":\\\"Date of birth\\\",\\\"placeholder\\\":\\\"MM/DD/YYYY\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"short_text_entry\\\",\\\"puck_type\\\":\\\"short_text_entry\\\",\\\"label\\\":\\\"Social Insurance Number (SIN)\\\",\\\"placeholder\\\":\\\"123 456 789\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"multiple_choice_entry\\\",\\\"puck_type\\\":\\\"multiple_choice_entry\\\",\\\"label\\\":\\\"How did you hear about Dunder Mifflin?\\\",\\\"required\\\":false,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true,\\\"multiple_choice_options\\\":[{\\\"label\\\":\\\"Social media\\\"},{\\\"label\\\":\\\"A friend or family member\\\"},{\\\"label\\\":\\\"A rep\\\"},{\\\"label\\\":\\\"Search\\\"},{\\\"label\\\":\\\"An event\\\"},{\\\"label\\\":\\\"Other\\\"}]}]\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.fluid.app/api/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"form\": {\n \"title\": \"Enrollment - Canada\",\n \"description\": \"Tax and payout details we need before we can pay your commissions in Canada.\",\n \"form_type\": \"post_purchase\",\n \"status\": \"draft\",\n \"country_ids\": [\n 39\n ],\n \"form_components\": \"[{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"legal_name\\\",\\\"label\\\":\\\"Legal name\\\",\\\"placeholder\\\":\\\"As it appears on your tax return\\\",\\\"required\\\":true,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"date_of_birth\\\",\\\"label\\\":\\\"Date of birth\\\",\\\"placeholder\\\":\\\"MM/DD/YYYY\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"short_text_entry\\\",\\\"puck_type\\\":\\\"short_text_entry\\\",\\\"label\\\":\\\"Social Insurance Number (SIN)\\\",\\\"placeholder\\\":\\\"123 456 789\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"multiple_choice_entry\\\",\\\"puck_type\\\":\\\"multiple_choice_entry\\\",\\\"label\\\":\\\"How did you hear about Dunder Mifflin?\\\",\\\"required\\\":false,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true,\\\"multiple_choice_options\\\":[{\\\"label\\\":\\\"Social media\\\"},{\\\"label\\\":\\\"A friend or family member\\\"},{\\\"label\\\":\\\"A rep\\\"},{\\\"label\\\":\\\"Search\\\"},{\\\"label\\\":\\\"An event\\\"},{\\\"label\\\":\\\"Other\\\"}]}]\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/forms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"form\": {\n \"title\": \"Enrollment - Canada\",\n \"description\": \"Tax and payout details we need before we can pay your commissions in Canada.\",\n \"form_type\": \"post_purchase\",\n \"status\": \"draft\",\n \"country_ids\": [\n 39\n ],\n \"form_components\": \"[{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"legal_name\\\",\\\"label\\\":\\\"Legal name\\\",\\\"placeholder\\\":\\\"As it appears on your tax return\\\",\\\"required\\\":true,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"input\\\",\\\"puck_type\\\":\\\"date_of_birth\\\",\\\"label\\\":\\\"Date of birth\\\",\\\"placeholder\\\":\\\"MM/DD/YYYY\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"short_text_entry\\\",\\\"puck_type\\\":\\\"short_text_entry\\\",\\\"label\\\":\\\"Social Insurance Number (SIN)\\\",\\\"placeholder\\\":\\\"123 456 789\\\",\\\"required\\\":true,\\\"sensitive_info\\\":true,\\\"is_form_field\\\":true},{\\\"element_type\\\":\\\"multiple_choice_entry\\\",\\\"puck_type\\\":\\\"multiple_choice_entry\\\",\\\"label\\\":\\\"How did you hear about Dunder Mifflin?\\\",\\\"required\\\":false,\\\"sensitive_info\\\":false,\\\"is_form_field\\\":true,\\\"multiple_choice_options\\\":[{\\\"label\\\":\\\"Social media\\\"},{\\\"label\\\":\\\"A friend or family member\\\"},{\\\"label\\\":\\\"A rep\\\"},{\\\"label\\\":\\\"Search\\\"},{\\\"label\\\":\\\"An event\\\"},{\\\"label\\\":\\\"Other\\\"}]}]\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Form created successfully",
"form": {
"id": 4136,
"title": "Enrollment - Canada",
"status": "draft",
"description": "Tax and payout details we need before we can pay your commissions in Canada.",
"form_type": "post_purchase",
"form_redirect": null,
"updated_at": "2026-10-07T15:04:12Z",
"form_components": "[{\"element_type\":\"input\",\"puck_type\":\"legal_name\",\"label\":\"Legal name\",\"placeholder\":\"As it appears on your tax return\",\"required\":true,\"sensitive_info\":false,\"is_form_field\":true,\"id\":18321},{\"element_type\":\"input\",\"puck_type\":\"date_of_birth\",\"label\":\"Date of birth\",\"placeholder\":\"MM/DD/YYYY\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true,\"id\":18322},{\"element_type\":\"short_text_entry\",\"puck_type\":\"short_text_entry\",\"label\":\"Social Insurance Number (SIN)\",\"placeholder\":\"123 456 789\",\"required\":true,\"sensitive_info\":true,\"is_form_field\":true,\"id\":18323},{\"element_type\":\"multiple_choice_entry\",\"puck_type\":\"multiple_choice_entry\",\"label\":\"How did you hear about Dunder Mifflin?\",\"required\":false,\"sensitive_info\":false,\"is_form_field\":true,\"multiple_choice_options\":[{\"label\":\"Social media\"},{\"label\":\"A friend or family member\"},{\"label\":\"A rep\"},{\"label\":\"Search\"},{\"label\":\"An event\"},{\"label\":\"Other\"}],\"id\":18324}]",
"countries": [
{
"id": 39,
"name": "Canada",
"iso": "CA"
}
],
"form_styles": null,
"form_respondents_count": 0,
"public_token": null,
"embed_settings": {
"password_protected": false
},
"embed_url": null,
"share_url": null
},
"meta": {
"request_id": "8a2f61c4-7e0d-4d19-b5a3-2c9e84f1d067",
"timestamp": "2026-10-07T15:04:12Z"
}
}