양식 수정
부분 업데이트입니다. `document`는 초안을 통째로 교체하며, 게시 중인 양식은 게시할 때까지 게시된 사본을 계속 보여 줍니다. `settings`는 필드별로 병합되고 즉시 적용됩니다.
워크스페이스에 실제 호출을 실행합니다.
PATCH /forms/{id}
부분 업데이트입니다. document는 초안을 통째로 교체하며, 게시 중인 양식은 게시할 때까지 게시된 사본을 계속 보여 줍니다. settings는 필드별로 병합되고 즉시 적용됩니다.
예시
forms:write가 필요하며, 더블 옵트인을 켜거나, 보내는 주소를 지정하거나, 확인 메일을 바꿀 때는 emails:send도 필요합니다. 읽어 온 updatedAt을 expectedUpdatedAt으로 보내세요. 그사이에 누군가 양식을 저장했다면, 내 변경은 그 사람의 변경을 덮어쓰지 않고 거부됩니다.
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가 아닌 색상이나 http 또는 https URL이 아닌 redirectUrl처럼 형태가 잘못된 값은 422 invalid_parameter이고, 본문이 받지 않는 키라면 unknown_parameter입니다. 문서나 설정이 함께 어기는 규칙은 422 invalid_form입니다. 둘 다 document.fields.2.key나 settings.redirectUrl처럼 param으로 해당 필드를 가리킵니다.
문서의 필드 하나를 바꾸려면 양식을 읽고, 수정한 뒤 document 전체를 다시 보내세요.