Create a form
Creates a form and returns it with its endpoint URL.
Send name (required) and any of the configuration blocks. Excluded configuration blocks return defaults in the response. If you try to configure something your plan does not include, the request is refused and no form gets created.
curl --request POST \
--url https://api.formcarry.com/v1/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Contact form",
"active": true,
"folder_id": "<string>",
"storage": {
"store_submissions": true
},
"spam": {
"protection": true,
"captcha": {
"secret_key": "<string>"
}
},
"self_email_notification": {
"enabled": true,
"recipients": [
"me@company.com"
],
"include_spam": true,
"subject": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": {
"html": "<string>"
},
"sender": {
"server_id": "<string>",
"name": "<string>",
"email": "<string>"
}
},
"auto_response": {
"enabled": true,
"subject": "<string>",
"from_name": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": {
"message": "<string>",
"html": "<string>"
}
},
"after_submit": {
"page": {
"headline": "Thank you!",
"message": "We have received your submission",
"logo_url": "https://example.com/thanks",
"logo_dark_url": "https://example.com/thanks",
"primary_color": "#0f766e",
"secondary_color": "#f0fdfa",
"return_button": {
"text": "<string>",
"url": "https://example.com/thanks"
},
"download_button": {
"text": "<string>",
"url": "https://example.com/thanks"
}
},
"redirect": {
"success_url": "https://example.com/thanks",
"fail_url": "https://example.com/thanks",
"append_submission_to_url": true
}
},
"validation": {
"enabled": true,
"rules": [
{
"field": "email",
"checks": [
{
"value": "<string>",
"message": "<string>"
}
]
}
]
},
"team_id": "64b000000000000000000001"
}
'import requests
url = "https://api.formcarry.com/v1/forms"
payload = {
"name": "Contact form",
"active": True,
"folder_id": "<string>",
"storage": { "store_submissions": True },
"spam": {
"protection": True,
"captcha": { "secret_key": "<string>" }
},
"self_email_notification": {
"enabled": True,
"recipients": ["me@company.com"],
"include_spam": True,
"subject": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": { "html": "<string>" },
"sender": {
"server_id": "<string>",
"name": "<string>",
"email": "<string>"
}
},
"auto_response": {
"enabled": True,
"subject": "<string>",
"from_name": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": {
"message": "<string>",
"html": "<string>"
}
},
"after_submit": {
"page": {
"headline": "Thank you!",
"message": "We have received your submission",
"logo_url": "https://example.com/thanks",
"logo_dark_url": "https://example.com/thanks",
"primary_color": "#0f766e",
"secondary_color": "#f0fdfa",
"return_button": {
"text": "<string>",
"url": "https://example.com/thanks"
},
"download_button": {
"text": "<string>",
"url": "https://example.com/thanks"
}
},
"redirect": {
"success_url": "https://example.com/thanks",
"fail_url": "https://example.com/thanks",
"append_submission_to_url": True
}
},
"validation": {
"enabled": True,
"rules": [
{
"field": "email",
"checks": [
{
"value": "<string>",
"message": "<string>"
}
]
}
]
},
"team_id": "64b000000000000000000001"
}
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({
name: 'Contact form',
active: true,
folder_id: '<string>',
storage: {store_submissions: true},
spam: {protection: true, captcha: {secret_key: '<string>'}},
self_email_notification: {
enabled: true,
recipients: ['me@company.com'],
include_spam: true,
subject: '<string>',
logo_url: 'https://example.com/logo.png',
logo_height: 208,
template: {html: '<string>'},
sender: {server_id: '<string>', name: '<string>', email: '<string>'}
},
auto_response: {
enabled: true,
subject: '<string>',
from_name: '<string>',
logo_url: 'https://example.com/logo.png',
logo_height: 208,
template: {message: '<string>', html: '<string>'}
},
after_submit: {
page: {
headline: 'Thank you!',
message: 'We have received your submission',
logo_url: 'https://example.com/thanks',
logo_dark_url: 'https://example.com/thanks',
primary_color: '#0f766e',
secondary_color: '#f0fdfa',
return_button: {text: '<string>', url: 'https://example.com/thanks'},
download_button: {text: '<string>', url: 'https://example.com/thanks'}
},
redirect: {
success_url: 'https://example.com/thanks',
fail_url: 'https://example.com/thanks',
append_submission_to_url: true
}
},
validation: {
enabled: true,
rules: [{field: 'email', checks: [{value: '<string>', message: '<string>'}]}]
},
team_id: '64b000000000000000000001'
})
};
fetch('https://api.formcarry.com/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://api.formcarry.com/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' => 'Contact form',
'active' => true,
'folder_id' => '<string>',
'storage' => [
'store_submissions' => true
],
'spam' => [
'protection' => true,
'captcha' => [
'secret_key' => '<string>'
]
],
'self_email_notification' => [
'enabled' => true,
'recipients' => [
'me@company.com'
],
'include_spam' => true,
'subject' => '<string>',
'logo_url' => 'https://example.com/logo.png',
'logo_height' => 208,
'template' => [
'html' => '<string>'
],
'sender' => [
'server_id' => '<string>',
'name' => '<string>',
'email' => '<string>'
]
],
'auto_response' => [
'enabled' => true,
'subject' => '<string>',
'from_name' => '<string>',
'logo_url' => 'https://example.com/logo.png',
'logo_height' => 208,
'template' => [
'message' => '<string>',
'html' => '<string>'
]
],
'after_submit' => [
'page' => [
'headline' => 'Thank you!',
'message' => 'We have received your submission',
'logo_url' => 'https://example.com/thanks',
'logo_dark_url' => 'https://example.com/thanks',
'primary_color' => '#0f766e',
'secondary_color' => '#f0fdfa',
'return_button' => [
'text' => '<string>',
'url' => 'https://example.com/thanks'
],
'download_button' => [
'text' => '<string>',
'url' => 'https://example.com/thanks'
]
],
'redirect' => [
'success_url' => 'https://example.com/thanks',
'fail_url' => 'https://example.com/thanks',
'append_submission_to_url' => true
]
],
'validation' => [
'enabled' => true,
'rules' => [
[
'field' => 'email',
'checks' => [
[
'value' => '<string>',
'message' => '<string>'
]
]
]
]
],
'team_id' => '64b000000000000000000001'
]),
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.formcarry.com/v1/forms"
payload := strings.NewReader("{\n \"name\": \"Contact form\",\n \"active\": true,\n \"folder_id\": \"<string>\",\n \"storage\": {\n \"store_submissions\": true\n },\n \"spam\": {\n \"protection\": true,\n \"captcha\": {\n \"secret_key\": \"<string>\"\n }\n },\n \"self_email_notification\": {\n \"enabled\": true,\n \"recipients\": [\n \"me@company.com\"\n ],\n \"include_spam\": true,\n \"subject\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"html\": \"<string>\"\n },\n \"sender\": {\n \"server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"auto_response\": {\n \"enabled\": true,\n \"subject\": \"<string>\",\n \"from_name\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"message\": \"<string>\",\n \"html\": \"<string>\"\n }\n },\n \"after_submit\": {\n \"page\": {\n \"headline\": \"Thank you!\",\n \"message\": \"We have received your submission\",\n \"logo_url\": \"https://example.com/thanks\",\n \"logo_dark_url\": \"https://example.com/thanks\",\n \"primary_color\": \"#0f766e\",\n \"secondary_color\": \"#f0fdfa\",\n \"return_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n },\n \"download_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n }\n },\n \"redirect\": {\n \"success_url\": \"https://example.com/thanks\",\n \"fail_url\": \"https://example.com/thanks\",\n \"append_submission_to_url\": true\n }\n },\n \"validation\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"field\": \"email\",\n \"checks\": [\n {\n \"value\": \"<string>\",\n \"message\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"team_id\": \"64b000000000000000000001\"\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.formcarry.com/v1/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Contact form\",\n \"active\": true,\n \"folder_id\": \"<string>\",\n \"storage\": {\n \"store_submissions\": true\n },\n \"spam\": {\n \"protection\": true,\n \"captcha\": {\n \"secret_key\": \"<string>\"\n }\n },\n \"self_email_notification\": {\n \"enabled\": true,\n \"recipients\": [\n \"me@company.com\"\n ],\n \"include_spam\": true,\n \"subject\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"html\": \"<string>\"\n },\n \"sender\": {\n \"server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"auto_response\": {\n \"enabled\": true,\n \"subject\": \"<string>\",\n \"from_name\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"message\": \"<string>\",\n \"html\": \"<string>\"\n }\n },\n \"after_submit\": {\n \"page\": {\n \"headline\": \"Thank you!\",\n \"message\": \"We have received your submission\",\n \"logo_url\": \"https://example.com/thanks\",\n \"logo_dark_url\": \"https://example.com/thanks\",\n \"primary_color\": \"#0f766e\",\n \"secondary_color\": \"#f0fdfa\",\n \"return_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n },\n \"download_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n }\n },\n \"redirect\": {\n \"success_url\": \"https://example.com/thanks\",\n \"fail_url\": \"https://example.com/thanks\",\n \"append_submission_to_url\": true\n }\n },\n \"validation\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"field\": \"email\",\n \"checks\": [\n {\n \"value\": \"<string>\",\n \"message\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"team_id\": \"64b000000000000000000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.formcarry.com/v1/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 \"name\": \"Contact form\",\n \"active\": true,\n \"folder_id\": \"<string>\",\n \"storage\": {\n \"store_submissions\": true\n },\n \"spam\": {\n \"protection\": true,\n \"captcha\": {\n \"secret_key\": \"<string>\"\n }\n },\n \"self_email_notification\": {\n \"enabled\": true,\n \"recipients\": [\n \"me@company.com\"\n ],\n \"include_spam\": true,\n \"subject\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"html\": \"<string>\"\n },\n \"sender\": {\n \"server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"auto_response\": {\n \"enabled\": true,\n \"subject\": \"<string>\",\n \"from_name\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"message\": \"<string>\",\n \"html\": \"<string>\"\n }\n },\n \"after_submit\": {\n \"page\": {\n \"headline\": \"Thank you!\",\n \"message\": \"We have received your submission\",\n \"logo_url\": \"https://example.com/thanks\",\n \"logo_dark_url\": \"https://example.com/thanks\",\n \"primary_color\": \"#0f766e\",\n \"secondary_color\": \"#f0fdfa\",\n \"return_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n },\n \"download_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n }\n },\n \"redirect\": {\n \"success_url\": \"https://example.com/thanks\",\n \"fail_url\": \"https://example.com/thanks\",\n \"append_submission_to_url\": true\n }\n },\n \"validation\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"field\": \"email\",\n \"checks\": [\n {\n \"value\": \"<string>\",\n \"message\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"team_id\": \"64b000000000000000000001\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
128"Contact form"
Inactive forms reject submissions.
The folder the form is filed in. null for no folder.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The email you get on every submission.
Show child attributes
Show child attributes
The email the person who submitted receives.
Show child attributes
Show child attributes
What the visitor sees after submitting.
Show child attributes
Show child attributes
Rules a submission must pass.
Show child attributes
Show child attributes
Team that owns the new form. Required when the credential covers several teams (OAuth connections).
"64b000000000000000000001"
Response
"AbC123xyz"
"Contact form"
Where your HTML form posts.
"https://formcarry.com/s/AbC123xyz"
Inactive forms reject submissions.
"🚀"
The folder the form is filed in, or null for none.
"2026-01-15T10:00:00.000Z"
When the newest submission arrived, or null before the first.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Managed at /v1/forms/{form_id}/webhooks; one per form for now.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.formcarry.com/v1/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Contact form",
"active": true,
"folder_id": "<string>",
"storage": {
"store_submissions": true
},
"spam": {
"protection": true,
"captcha": {
"secret_key": "<string>"
}
},
"self_email_notification": {
"enabled": true,
"recipients": [
"me@company.com"
],
"include_spam": true,
"subject": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": {
"html": "<string>"
},
"sender": {
"server_id": "<string>",
"name": "<string>",
"email": "<string>"
}
},
"auto_response": {
"enabled": true,
"subject": "<string>",
"from_name": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": {
"message": "<string>",
"html": "<string>"
}
},
"after_submit": {
"page": {
"headline": "Thank you!",
"message": "We have received your submission",
"logo_url": "https://example.com/thanks",
"logo_dark_url": "https://example.com/thanks",
"primary_color": "#0f766e",
"secondary_color": "#f0fdfa",
"return_button": {
"text": "<string>",
"url": "https://example.com/thanks"
},
"download_button": {
"text": "<string>",
"url": "https://example.com/thanks"
}
},
"redirect": {
"success_url": "https://example.com/thanks",
"fail_url": "https://example.com/thanks",
"append_submission_to_url": true
}
},
"validation": {
"enabled": true,
"rules": [
{
"field": "email",
"checks": [
{
"value": "<string>",
"message": "<string>"
}
]
}
]
},
"team_id": "64b000000000000000000001"
}
'import requests
url = "https://api.formcarry.com/v1/forms"
payload = {
"name": "Contact form",
"active": True,
"folder_id": "<string>",
"storage": { "store_submissions": True },
"spam": {
"protection": True,
"captcha": { "secret_key": "<string>" }
},
"self_email_notification": {
"enabled": True,
"recipients": ["me@company.com"],
"include_spam": True,
"subject": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": { "html": "<string>" },
"sender": {
"server_id": "<string>",
"name": "<string>",
"email": "<string>"
}
},
"auto_response": {
"enabled": True,
"subject": "<string>",
"from_name": "<string>",
"logo_url": "https://example.com/logo.png",
"logo_height": 208,
"template": {
"message": "<string>",
"html": "<string>"
}
},
"after_submit": {
"page": {
"headline": "Thank you!",
"message": "We have received your submission",
"logo_url": "https://example.com/thanks",
"logo_dark_url": "https://example.com/thanks",
"primary_color": "#0f766e",
"secondary_color": "#f0fdfa",
"return_button": {
"text": "<string>",
"url": "https://example.com/thanks"
},
"download_button": {
"text": "<string>",
"url": "https://example.com/thanks"
}
},
"redirect": {
"success_url": "https://example.com/thanks",
"fail_url": "https://example.com/thanks",
"append_submission_to_url": True
}
},
"validation": {
"enabled": True,
"rules": [
{
"field": "email",
"checks": [
{
"value": "<string>",
"message": "<string>"
}
]
}
]
},
"team_id": "64b000000000000000000001"
}
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({
name: 'Contact form',
active: true,
folder_id: '<string>',
storage: {store_submissions: true},
spam: {protection: true, captcha: {secret_key: '<string>'}},
self_email_notification: {
enabled: true,
recipients: ['me@company.com'],
include_spam: true,
subject: '<string>',
logo_url: 'https://example.com/logo.png',
logo_height: 208,
template: {html: '<string>'},
sender: {server_id: '<string>', name: '<string>', email: '<string>'}
},
auto_response: {
enabled: true,
subject: '<string>',
from_name: '<string>',
logo_url: 'https://example.com/logo.png',
logo_height: 208,
template: {message: '<string>', html: '<string>'}
},
after_submit: {
page: {
headline: 'Thank you!',
message: 'We have received your submission',
logo_url: 'https://example.com/thanks',
logo_dark_url: 'https://example.com/thanks',
primary_color: '#0f766e',
secondary_color: '#f0fdfa',
return_button: {text: '<string>', url: 'https://example.com/thanks'},
download_button: {text: '<string>', url: 'https://example.com/thanks'}
},
redirect: {
success_url: 'https://example.com/thanks',
fail_url: 'https://example.com/thanks',
append_submission_to_url: true
}
},
validation: {
enabled: true,
rules: [{field: 'email', checks: [{value: '<string>', message: '<string>'}]}]
},
team_id: '64b000000000000000000001'
})
};
fetch('https://api.formcarry.com/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://api.formcarry.com/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' => 'Contact form',
'active' => true,
'folder_id' => '<string>',
'storage' => [
'store_submissions' => true
],
'spam' => [
'protection' => true,
'captcha' => [
'secret_key' => '<string>'
]
],
'self_email_notification' => [
'enabled' => true,
'recipients' => [
'me@company.com'
],
'include_spam' => true,
'subject' => '<string>',
'logo_url' => 'https://example.com/logo.png',
'logo_height' => 208,
'template' => [
'html' => '<string>'
],
'sender' => [
'server_id' => '<string>',
'name' => '<string>',
'email' => '<string>'
]
],
'auto_response' => [
'enabled' => true,
'subject' => '<string>',
'from_name' => '<string>',
'logo_url' => 'https://example.com/logo.png',
'logo_height' => 208,
'template' => [
'message' => '<string>',
'html' => '<string>'
]
],
'after_submit' => [
'page' => [
'headline' => 'Thank you!',
'message' => 'We have received your submission',
'logo_url' => 'https://example.com/thanks',
'logo_dark_url' => 'https://example.com/thanks',
'primary_color' => '#0f766e',
'secondary_color' => '#f0fdfa',
'return_button' => [
'text' => '<string>',
'url' => 'https://example.com/thanks'
],
'download_button' => [
'text' => '<string>',
'url' => 'https://example.com/thanks'
]
],
'redirect' => [
'success_url' => 'https://example.com/thanks',
'fail_url' => 'https://example.com/thanks',
'append_submission_to_url' => true
]
],
'validation' => [
'enabled' => true,
'rules' => [
[
'field' => 'email',
'checks' => [
[
'value' => '<string>',
'message' => '<string>'
]
]
]
]
],
'team_id' => '64b000000000000000000001'
]),
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.formcarry.com/v1/forms"
payload := strings.NewReader("{\n \"name\": \"Contact form\",\n \"active\": true,\n \"folder_id\": \"<string>\",\n \"storage\": {\n \"store_submissions\": true\n },\n \"spam\": {\n \"protection\": true,\n \"captcha\": {\n \"secret_key\": \"<string>\"\n }\n },\n \"self_email_notification\": {\n \"enabled\": true,\n \"recipients\": [\n \"me@company.com\"\n ],\n \"include_spam\": true,\n \"subject\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"html\": \"<string>\"\n },\n \"sender\": {\n \"server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"auto_response\": {\n \"enabled\": true,\n \"subject\": \"<string>\",\n \"from_name\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"message\": \"<string>\",\n \"html\": \"<string>\"\n }\n },\n \"after_submit\": {\n \"page\": {\n \"headline\": \"Thank you!\",\n \"message\": \"We have received your submission\",\n \"logo_url\": \"https://example.com/thanks\",\n \"logo_dark_url\": \"https://example.com/thanks\",\n \"primary_color\": \"#0f766e\",\n \"secondary_color\": \"#f0fdfa\",\n \"return_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n },\n \"download_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n }\n },\n \"redirect\": {\n \"success_url\": \"https://example.com/thanks\",\n \"fail_url\": \"https://example.com/thanks\",\n \"append_submission_to_url\": true\n }\n },\n \"validation\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"field\": \"email\",\n \"checks\": [\n {\n \"value\": \"<string>\",\n \"message\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"team_id\": \"64b000000000000000000001\"\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.formcarry.com/v1/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Contact form\",\n \"active\": true,\n \"folder_id\": \"<string>\",\n \"storage\": {\n \"store_submissions\": true\n },\n \"spam\": {\n \"protection\": true,\n \"captcha\": {\n \"secret_key\": \"<string>\"\n }\n },\n \"self_email_notification\": {\n \"enabled\": true,\n \"recipients\": [\n \"me@company.com\"\n ],\n \"include_spam\": true,\n \"subject\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"html\": \"<string>\"\n },\n \"sender\": {\n \"server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"auto_response\": {\n \"enabled\": true,\n \"subject\": \"<string>\",\n \"from_name\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"message\": \"<string>\",\n \"html\": \"<string>\"\n }\n },\n \"after_submit\": {\n \"page\": {\n \"headline\": \"Thank you!\",\n \"message\": \"We have received your submission\",\n \"logo_url\": \"https://example.com/thanks\",\n \"logo_dark_url\": \"https://example.com/thanks\",\n \"primary_color\": \"#0f766e\",\n \"secondary_color\": \"#f0fdfa\",\n \"return_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n },\n \"download_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n }\n },\n \"redirect\": {\n \"success_url\": \"https://example.com/thanks\",\n \"fail_url\": \"https://example.com/thanks\",\n \"append_submission_to_url\": true\n }\n },\n \"validation\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"field\": \"email\",\n \"checks\": [\n {\n \"value\": \"<string>\",\n \"message\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"team_id\": \"64b000000000000000000001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.formcarry.com/v1/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 \"name\": \"Contact form\",\n \"active\": true,\n \"folder_id\": \"<string>\",\n \"storage\": {\n \"store_submissions\": true\n },\n \"spam\": {\n \"protection\": true,\n \"captcha\": {\n \"secret_key\": \"<string>\"\n }\n },\n \"self_email_notification\": {\n \"enabled\": true,\n \"recipients\": [\n \"me@company.com\"\n ],\n \"include_spam\": true,\n \"subject\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"html\": \"<string>\"\n },\n \"sender\": {\n \"server_id\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n },\n \"auto_response\": {\n \"enabled\": true,\n \"subject\": \"<string>\",\n \"from_name\": \"<string>\",\n \"logo_url\": \"https://example.com/logo.png\",\n \"logo_height\": 208,\n \"template\": {\n \"message\": \"<string>\",\n \"html\": \"<string>\"\n }\n },\n \"after_submit\": {\n \"page\": {\n \"headline\": \"Thank you!\",\n \"message\": \"We have received your submission\",\n \"logo_url\": \"https://example.com/thanks\",\n \"logo_dark_url\": \"https://example.com/thanks\",\n \"primary_color\": \"#0f766e\",\n \"secondary_color\": \"#f0fdfa\",\n \"return_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n },\n \"download_button\": {\n \"text\": \"<string>\",\n \"url\": \"https://example.com/thanks\"\n }\n },\n \"redirect\": {\n \"success_url\": \"https://example.com/thanks\",\n \"fail_url\": \"https://example.com/thanks\",\n \"append_submission_to_url\": true\n }\n },\n \"validation\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"field\": \"email\",\n \"checks\": [\n {\n \"value\": \"<string>\",\n \"message\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"team_id\": \"64b000000000000000000001\"\n}"
response = http.request(request)
puts response.read_body