Update Form Settings
Overview
Update form configuration such as email, captcha, file upload, templates, and integrations.
Validations are applied based on plan and feature availability.
Only allowed fields can be updated; invalid fields will return errors.
Endpoint
POST /api/forms/{formId}/settings
Request
Path Params
| Param | Type | Required | Description |
|---|---|---|---|
| formId | string | ✅ Yes | Form ID |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | ✅ Yes | Bearer INTERNAL_PROVISION_TOKEN |
Supported Fields
1. form_name
Updates the name of the form displayed in dashboard or emails.
Must be a non-empty string.
Used for identification and UI display.
Request
{
"form_name": "My New Form"
}
Response
{
"message": "form_name updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"form_name":"My New Form"}'
2. recipient_email
Sets the email where submissions will be sent. Must be a valid email format. Used as primary notification channel.
Request
{
"recipient_email": "[email protected]"
}
Response
{
"message": "recipient_email updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"recipient_email":"[email protected]"}'
3. redirect_url
URL where users are redirected after form submission. Optional field. Can be empty or any valid URL.
Request
{
"redirect_url": "https://example.com/thank-you"
}
Response
{
"message": "redirect_url updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"redirect_url":"https://example.com/thank-you"}'
4. turnstile / captcha settings
Enables captcha protection for spam prevention. Supports turnstile, recaptcha, hcaptcha, custom_turnstile. Requires additional fields depending on type.
Turnstile
Request
{
"turnstile_enabled": true,
"captchaMode": "turnstile",
"domain": "example.com"
}
Response
{
"message": "turnstile_enabled updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"turnstile_enabled":true,"captchaMode":"turnstile","domain":"example.com"}'
reCAPTCHA
Requires customCaptchaKey
{
"turnstile_enabled": true,
"captchaMode": "recaptcha",
"customCaptchaKey": "your-secret-key"
}
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"turnstile_enabled":true,"captchaMode":"recaptcha","customCaptchaKey":"your-secret-key"}'
hCaptcha
Requires customCaptchaKey
{
"turnstile_enabled": true,
"captchaMode": "hcaptcha",
"customCaptchaKey": "your-secret-key"
}
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"turnstile_enabled":true,"captchaMode":"hcaptcha","customCaptchaKey":"your-secret-key"}'
Custom Turnstile
Requires customCaptchaKey
{
"turnstile_enabled": true,
"captchaMode": "custom_turnstile",
"customCaptchaKey": "your-secret-key"
}
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"turnstile_enabled":true,"captchaMode":"custom_turnstile","customCaptchaKey":"your-secret-key"}'
Disable captcha
{
"turnstile_enabled": false
}
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"turnstile_enabled":false}'
5. honeypotEnabled
Enables hidden spam protection field. Always allowed for all plans. Boolean value only.
Request
{
"honeypotEnabled": true
}
Response
{
"message": "honeypotEnabled updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"honeypotEnabled":true}'
6. fileUploadEnabled
Allows file uploads in form submissions. Available only for paid plans. Requires file type and size configuration.
Request
{
"fileUploadEnabled": true,
"allowedFileTypes": ".jpg,.png",
"maxFileSize": "5"
}
Response
{
"message": "fileUploadEnabled updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"fileUploadEnabled":true,"allowedFileTypes":".jpg,.png","maxFileSize":"5"}'
7. email_template
Controls email template type. Supports cloudmysite or custom. Custom requires HTML content.
CloudmySite Email Template
Request
{
"email_template": "cloudmysite",
}
Response
{
"message": "email_template updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"email_template":"cloudmysite"}'
Custom Email Template
Request
{
"email_template": "custom",
"customTemplateHtml": "<h1>Hello</h1>"
}
Response
{
"message": "email_template updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"email_template":"custom","customTemplateHtml":"<h1>Hello</h1>"}'
8. googleSheetEnabled
Enables Google Sheets integration. Only available for paid plans. Requires a valid Google Sheets URL.
Request
{
"googleSheetEnabled": true,
"googleSheetUrl": "https://docs.google.com/spreadsheets/d/xyz"
}
Response
{
"message": "googleSheetEnabled updated successfully"
}
cURL
curl -X POST "https://api.cloudmysite.com/forms/api/forms/{formId}/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <INTERNAL_PROVISION_TOKEN>" \
-d '{"googleSheetEnabled":true,"googleSheetUrl":"https://docs.google.com/spreadsheets/d/xyz"}'
Error Responses
400 - Validation Error
{
"message": "Invalid field or missing required value"
}
401 - Unauthorized
{
"message": "Unauthorized"
}
404 - Form Not Found
{
"message": "Form not found"
}
500 - Internal Server Error
{
"message": "Internal server error"
}
Notes
- Requires valid INTERNAL_PROVISION_TOKEN in Authorization header
- Token protects the API from unauthorized access (only trusted services allowed)
- Partial updates supported (only provided fields are updated)
- Plan restrictions are strictly enforced
- Invalid fields return an error immediately