NueForm

Themes API

विस्तृत थीम properties के साथ अपने फॉर्म्स के visual appearance को customize करें।

Themes API आपको किसी फॉर्म की पूरी visual थीम पढ़ने और अपडेट करने देता है। थीम properties फॉर्म और buttons, indicators, और options जैसे व्यक्तिगत UI elements दोनों के लिए colors, fonts, branding, और layout को नियंत्रित करती हैं।

सभी request और response bodies snake_case फ़ील्ड नामों का उपयोग करते हैं।

फॉर्म थीम प्राप्त करें

GET/api/v1/forms/:id/theme

किसी फॉर्म की सभी थीम properties प्राप्त करता है।

Path Parameters

idstring

फॉर्म ID

Response

json
{
  "theme_color": "#6366f1",
  "background_color": "#0a0a0a",
  "text_color": "#ffffff",
  "answer_text_color": "#e5e7eb",
  "placeholder_color": "#6b7280",
  "button_color": "#6366f1",
  "button_text_color": "#ffffff",
  "title_color": "#f9fafb",
  "description_color": "#d1d5db",
  "option_text_color": "#e5e7eb",
  "indicator_bg_color": "#1f2937",
  "indicator_text_color": "#9ca3af",
  "font_family": "Inter",
  "font_family_answer": "Inter",
  "font_family_button": "Inter",
  "font_family_description": "Inter",
  "font_family_option": "Inter",
  "font_family_indicator": "Inter",
  "question_font_size": "24px",
  "custom_css": null,
  "show_progress_bar": true,
  "branding_logo_url": null,
  "branding_footer_text": null,
  "hide_branding": false,
  "top_logo_url": null,
  "top_logo_size": null,
  "top_logo_alignment": "center",
  "top_logo_css": null,
  "watermark_css": null,
  "welcome_title": "Welcome",
  "welcome_description": null,
  "welcome_button_text": "Start",
  "thank_you_title": "Thank you!",
  "thank_you_description": null
}

कोड उदाहरण

bash
curl -X GET "https://api.nueform.io/api/v1/forms/665a1b2c3d4e5f6a7b8c9d0e/theme" \
  -H "Authorization: Bearer YOUR_API_KEY"

फॉर्म थीम अपडेट करें

PUT/api/v1/forms/:id/theme

किसी फॉर्म की थीम properties अपडेट करता है। केवल वे फ़ील्ड शामिल करें जिन्हें आप बदलना चाहते हैं। अनिर्दिष्ट फ़ील्ड अपने वर्तमान मान बनाए रखते हैं।

Path Parameters

idstring

फॉर्म ID

Request Body

नीचे थीम Properties संदर्भ से थीम properties का कोई भी संयोजन शामिल करें।

Request उदाहरण

json
{
  "theme_color": "#2563eb",
  "background_color": "#ffffff",
  "text_color": "#111827",
  "button_color": "#2563eb",
  "button_text_color": "#ffffff",
  "font_family": "Poppins",
  "question_font_size": "28px",
  "show_progress_bar": true,
  "hide_branding": true,
  "top_logo_url": "https://cdn.example.com/logo.svg",
  "top_logo_size": "140px",
  "top_logo_alignment": "left"
}

Response

पूर्ण, अपडेट किया गया थीम object लौटाता है (फॉर्म थीम प्राप्त करें जैसा ही schema)।

कोड उदाहरण

bash
curl -X PUT "https://api.nueform.io/api/v1/forms/665a1b2c3d4e5f6a7b8c9d0e/theme" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "theme_color": "#2563eb",
    "background_color": "#ffffff",
    "text_color": "#111827",
    "font_family": "Poppins"
  }'

थीम Properties संदर्भ

नीचे customization के लिए उपलब्ध थीम properties की पूरी सूची है।

Color Properties

theme_colorstring

फॉर्म में उपयोग किया जाने वाला प्राथमिक accent color (focus rings, highlights)। डिफ़ॉल्ट: "#6366f1"

background_colorstring

फॉर्म का बैकग्राउंड color। डिफ़ॉल्ट: "#0a0a0a"

text_colorstring

प्राथमिक प्रश्न टेक्स्ट color। डिफ़ॉल्ट: null

answer_text_colorstring

उत्तर inputs में टाइप किए गए टेक्स्ट का color। डिफ़ॉल्ट: null

placeholder_colorstring

खाली inputs के लिए placeholder टेक्स्ट color। डिफ़ॉल्ट: null

button_colorstring

submit/next buttons का बैकग्राउंड color। डिफ़ॉल्ट: null

button_text_colorstring

submit/next buttons का टेक्स्ट color। डिफ़ॉल्ट: null

title_colorstring

प्रश्न शीर्षक टेक्स्ट color (शीर्षकों के लिए text_color को override करता है)। डिफ़ॉल्ट: null

description_colorstring

प्रश्न विवरण टेक्स्ट color। डिफ़ॉल्ट: null

option_text_colorstring

multiple-choice और dropdown options का टेक्स्ट color। डिफ़ॉल्ट: null

indicator_bg_colorstring

step/question number indicator का बैकग्राउंड color। डिफ़ॉल्ट: null

indicator_text_colorstring

step/question number indicator का टेक्स्ट color। डिफ़ॉल्ट: null

Font Properties

font_familystring

प्रश्न शीर्षकों के लिए font family। कोई भी Google Font या system font support करता है। डिफ़ॉल्ट: null

font_family_answerstring

उत्तर input टेक्स्ट के लिए font family। डिफ़ॉल्ट: null

font_family_buttonstring

बटन labels के लिए font family। डिफ़ॉल्ट: null

font_family_descriptionstring

प्रश्न विवरणों के लिए font family। डिफ़ॉल्ट: null

font_family_optionstring

multiple-choice option labels के लिए font family। डिफ़ॉल्ट: null

font_family_indicatorstring

step/question number indicators के लिए font family। डिफ़ॉल्ट: null

question_font_sizestring

प्रश्न शीर्षकों के लिए font size (जैसे, "24px", "1.5rem")। डिफ़ॉल्ट: null

Layout और Progress

show_progress_barboolean

फॉर्म के शीर्ष पर progress bar दिखाना है या नहीं। डिफ़ॉल्ट: true

Branding

branding_logo_urlstring

फुटर क्षेत्र में दिखाए जाने वाले branding logo का URL। डिफ़ॉल्ट: null

branding_footer_textstring

फॉर्म footer में दिखाया जाने वाला custom टेक्स्ट। डिफ़ॉल्ट: null

hide_brandingboolean

डिफ़ॉल्ट NueForm branding footer छुपाएं। डिफ़ॉल्ट: false

top_logo_urlstring

फॉर्म के शीर्ष पर दिखाए जाने वाले logo का URL। डिफ़ॉल्ट: null

top_logo_sizestring

शीर्ष logo का आकार (जैसे, "120px", "80px")। डिफ़ॉल्ट: null

top_logo_alignmentstring

शीर्ष logo का horizontal alignment: "left", "center", "right"। डिफ़ॉल्ट: null

top_logo_cssstring

शीर्ष logo container पर लागू custom CSS। डिफ़ॉल्ट: null

watermark_cssstring

branding watermark पर लागू custom CSS। डिफ़ॉल्ट: null

स्वागत और धन्यवाद स्क्रीन

welcome_titlestring

स्वागत स्क्रीन पर दिखाया जाने वाला शीर्षक टेक्स्ट। डिफ़ॉल्ट: null

welcome_descriptionstring

स्वागत स्क्रीन पर विवरण टेक्स्ट। डिफ़ॉल्ट: null

welcome_button_textstring

स्वागत स्क्रीन पर बटन label। डिफ़ॉल्ट: "Start"

thank_you_titlestring

completion स्क्रीन पर शीर्षक टेक्स्ट। डिफ़ॉल्ट: "Thank you!"

thank_you_descriptionstring

completion स्क्रीन पर विवरण टेक्स्ट। डिफ़ॉल्ट: null

Advanced

custom_cssstring

फॉर्म renderer में inject किया गया arbitrary CSS। थीम properties द्वारा कवर न किए गए advanced customizations के लिए उपयोग करें। डिफ़ॉल्ट: null


Error Responses

इन endpoints द्वारा लौटाए गए मानक error responses।

Error Codes

401Unauthorized

API key गायब या अमान्य है

403Forbidden

टीम फॉर्म्स के लिए अपर्याप्त अनुमतियां

404Not Found

फॉर्म नहीं मिला

500Server Error

Internal server error

Error उदाहरण

json
{
  "error": "Form not found"
}
अंतिम अपडेट: 6 अप्रैल 2026