Creates a new signup, data-collection, or order form within the given subscriber list and
immediately generates its HTML source, so it is publicly accessible via formUrl.
Form method
| Value | Description |
|---|---|
subscribe | New-subscriber form — collects and saves a new contact (default) |
update | Data-update form — lets existing subscribers modify their own data |
order | E-commerce order form — lets subscribers purchase products |
Subscribe and update forms
Double opt-in
| Value | Description |
|---|---|
0 | No double opt-in (default) |
2 | Double opt-in — a confirmation e-mail is sent before the subscriber is activated |
Fields on the form
Use the optional fields array to place list fields on the form at creation time.
Each element references a list field by its technical name (fieldName) and may override
the display label, mandatory flag, validation message, and position.
Subscribe forms (method: "subscribe")
method: "subscribe")- The
emailfield is always required on the form. - If
fieldsis omitted, the form is created with theemailfield only. - If
fieldsis provided but does not contain"email", the email field is
automatically prepended withisMandatory: true. - All
fieldNamevalues must exist on the subscriber list.
Update forms (method: "update")
method: "update")fieldsis required and must contain at least one element.- All
fieldNamevalues must exist on the subscriber list.
Field options (radio, select and similar types)
List fields of type radio, horizontalradio, select, or textmulti require an
options array. Each option defines the stored value, the display label, and whether it is
pre-selected by default.
optionsis required for the above field types and must contain at least one element.optionsis not allowed for other field types (e.g.text,textarea) — providing it
returns a 400 error.- Each option must have a
valuekey (may be an empty string) and a non-emptytext.
Order forms (method: "order")
method: "order")Order forms allow subscribers to purchase one or more products. They require:
shippingMethodIds(required): one or more shipping method IDs that must belong to your account.
UseGET /shipping-methodto list available shipping methods.orderType(required): controls the product selection behaviour on the form.Value Behaviour 1Fixed product — exactly one product, no quantity control 2Product selector — customer selects from a list 3Quantity-based — customer enters a quantity per product 4Subscription / recurring products(required): list of products to offer on the form.
Each entry must have either aproductId(integer) or asku(string) to identify the product.- If
skuis given instead ofproductId, the system resolves it to the matching product in your account. orderType: 1allows exactly one product.
- If
Order form product fields
| Field | Type | Required | Description |
|---|---|---|---|
productId | integer | — | Product ID (either productId or sku is required) |
sku | string | — | Product SKU (resolved to productId server-side) |
label | string | no | Label shown on the form (defaults to the product name) |
defaultChecked | boolean | no | Pre-select this product (default: false) |
defaultQty | integer | no | Pre-filled quantity (for quantity-based forms) |
description | string | no | Short description shown next to the product |
order | integer | no | Display position (1-based; defaults to order in the array) |
What happens after creation
- The form record is inserted in the database.
- For subscribe/update forms: the specified fields (and their options) are added to the form.
For order forms: the selected products are linked to the form. - The form HTML is generated and uploaded to S3 at:
newsletter/letter/nl{listId}/ns{formId}/subscribe.html - The public
formUrlis returned so you can embed or link to it immediately.
You can manage form fields later via the following endpoints:
- Get form fields and list fields —
GET /newsletter/{newsletterId}/form/{formId}/fields - Add fields to a form —
POST /newsletter/{newsletterId}/form/{formId}/fields - Remove a field from a form —
DELETE /newsletter/{newsletterId}/form/{formId}/field/{fieldName}
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
