दस्तावेज़ पर जाएँ
API

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

आंशिक अपडेट। `document` पूरे ड्राफ़्ट को बदल देता है, और लाइव फ़ॉर्म तब तक अपनी प्रकाशित कॉपी दिखाता रहता है जब तक आप प्रकाशित न करें। `settings` फ़ील्ड-दर-फ़ील्ड मिलाई जाती हैं और तुरंत लागू होती हैं।

PATCH/forms/{id}

असली कॉल आपके वर्कस्पेस पर चलाता है।

PATCH /forms/{id}

आंशिक अपडेट। document पूरे ड्राफ़्ट को बदल देता है, और लाइव फ़ॉर्म तब तक अपनी प्रकाशित कॉपी दिखाता रहता है जब तक आप प्रकाशित न करें। settings फ़ील्ड-दर-फ़ील्ड मिलाई जाती हैं और तुरंत लागू होती हैं।

उदाहरण

forms:write चाहिए, और जब यह डबल ऑप्ट-इन चालू करे, भेजने वाला पता तय करे या पुष्टि ईमेल बदले, तो emails:send भी चाहिए। जो updatedAt आपने पढ़ा था उसे expectedUpdatedAt के रूप में भेजें: अगर बीच में किसी ने फ़ॉर्म सहेजा हो, तो आपका बदलाव उसके बदलाव पर लिखे जाने के बजाय अस्वीकार हो जाता है।

curl
curl -X PATCH "$OE/forms/frm_3b9d2e7a1c4f80d56e2a9b14" -H "$AUTH" -H 'content-type: application/json' -d '{  "settings": { "successAction": "redirect", "redirectUrl": "https://acme.com/thanks" },  "expectedUpdatedAt": "2026-09-12T08:00:00.000Z"}'
प्रतिक्रिया
{  "object": "form",  "id": "frm_3b9d2e7a1c4f80d56e2a9b14",  "name": "Newsletter sign-up",  "description": null,  "status": "live",  "url": "https://openemail.uk/form/frm_3b9d2e7a1c4f80d56e2a9b14",  "subscribeUrl": "https://api.openemail.uk/subscribe/frm_3b9d2e7a1c4f80d56e2a9b14",  "audienceIds": ["aud_4c1b8e2a7d9f05c36b4e8a71"],  "doubleOptIn": true,  "hasUnpublishedChanges": true,  "document": {    "fields": [      {        "id": "fld_k2m8q4w9z1x7",        "type": "email",        "key": "email",        "label": "Email",        "placeholder": "[email protected]",        "help": null,        "required": true,        "defaultValue": null,        "options": [],        "mapsTo": "email",        "width": "full",        "minLength": null,        "maxLength": null,        "min": null,        "max": null      }    ],    "copy": {      "title": "Join our list",      "description": "News from us, about once a month.",      "submitLabel": "Subscribe",      "successTitle": "You are on the list",      "successMessage": "Thanks for signing up.",      "pendingTitle": "Check your inbox",      "pendingMessage": "Open the email we sent and confirm to finish.",      "closedTitle": "This form is closed",      "closedMessage": "It is not taking new sign-ups right now.",      "footer": null    },    "style": {      "accent": "#18181b",      "background": "#f4f4f5",      "surface": "#ffffff",      "text": "#18181b",      "font": "system",      "radius": "md",      "width": "normal",      "layout": "card",      "align": "left",      "logoUrl": null    }  },  "publishedDocument": { "fields": ["…"], "copy": { "title": "Join the list" }, "style": { "accent": "#18181b" } },  "settings": {    "audienceIds": ["aud_4c1b8e2a7d9f05c36b4e8a71"],    "doubleOptIn": true,    "senderAddress": "[email protected]",    "confirmSubject": "Please confirm your subscription",    "confirmMessage": "Confirm your email address to start getting our messages.",    "confirmButton": "Confirm my subscription",    "successAction": "message",    "redirectUrl": null,    "notifyAddresses": ["[email protected]"]  },  "audiences": [{ "id": "aud_4c1b8e2a7d9f05c36b4e8a71", "name": "Newsletter", "builtin": false }],  "senderIssue": null,  "senderProblem": null,  "stats": { "views": 1840, "submissions": 212, "added": 198, "pending": 14, "lastSubmittedAt": "2026-09-30T16:42:11.000Z" },  "publishedAt": "2026-09-12T08:00:00.000Z",  "createdAt": "2026-09-10T14:20:00.000Z",  "updatedAt": "2026-09-12T08:00:00.000Z"}

पुराना expectedUpdatedAt 409 version_conflict होता है, और कुछ नहीं लिखा जाता। फ़ॉर्म फिर से पढ़ें और बदलाव दोबारा करें।

ग़लत आकार वाला मान, जैसे ऐसा रंग जो #rrggbb नहीं है या ऐसा redirectUrl जो http या https URL नहीं है, 422 invalid_parameter होता है, या ऐसी कुंजी के लिए unknown_parameter जिसे बॉडी नहीं लेती। दस्तावेज़ या सेटिंग्स मिलकर जो नियम तोड़ती हैं, वह 422 invalid_form होता है। दोनों param में फ़ील्ड का नाम बताते हैं, जैसे document.fields.2.key या settings.redirectUrl।

दस्तावेज़ का एक फ़ील्ड बदलने के लिए, फ़ॉर्म पढ़ें, उसे बदलें और पूरा document वापस भेजें।

आपका इनबॉक्स,
आपकी अपनी शर्तों पर।

व्यवसायों, AI, एजेंट और निजी ईमेल के लिए ईमेल इन्फ़्रास्ट्रक्चर। स्केल, निजता और नियंत्रण के लिए बना। वह सब जो ईमेल में पहले दिन से होना चाहिए था।

© 2026 OpenEmail. सर्वाधिकार सुरक्षित।