Value Data Types
The dataType property of a Value Type determines what kind of value the field stores and how it is displayed and validated.
The default data type is TEXT if dataType is omitted.
Text
| Type | Description |
|---|---|
TEXT | A single-line text string. Default type. |
TEXTBLOCK | Multi-line rich text (HTML). |
LONGTEXT | Multi-line plain text. Large content; not search-indexed. |
JSON | Raw JSON string. Always system-managed; not user-editable. |
SECRET | A sensitive value (token, credential, code). Never returned in read responses; excluded from exports. |
MULTILINGUAL | A text value with per-language variants. |
EMAIL | An email address. Validated on input. |
HYPERLINK | A named link stored as { name, href }. Displayed as a clickable link. |
Choosing a text type
| Use case | Type |
|---|---|
| Short, searchable, filterable text | TEXT |
| Rich text with formatting (HTML) | TEXTBLOCK |
| Multi-line plain text, large content, no search index needed | LONGTEXT |
| System-generated structured output (AI, gateways) | JSON |
| Sensitive value that must never be readable after write | SECRET |
Storage properties
| Type | SQL-indexed | ES-indexed | MongoDB | User-editable |
|---|---|---|---|---|
TEXT | Yes | Yes | Yes | Yes |
TEXTBLOCK | No | Yes | Yes | Yes |
LONGTEXT | No | No | Yes | Yes |
JSON | No | No | Yes | No |
SECRET | No | No | Yes | Yes (write-only) |
LONGTEXT
LONGTEXT stores multi-line plain text without HTML sanitisation. It is stored only in MongoDB, so it is not available for filtering or full-text search. Use it for large content such as markdown, log output, or free-form notes where search indexing is not required.
{ "name": "markdownContent", "dataType": "LONGTEXT" }
Real-world example: commons.intake.markdownContent.
JSON
JSON stores a raw JSON string produced by the platform (AI tasks, gateway responses). It is always system-managed — fromRequestParam() returns null, so the value cannot be set via API request parameters. Use toJson() in scripts to deserialise the value to a JavaScript object or array.
{ "name": "responseJson", "dataType": "JSON" }
A JSON field cannot be set or updated via standard create/update request parameters. Only platform processes (scripts, gateways) can write to it.
SECRET
SECRET stores a sensitive text value — tokens, credentials, invitation codes, or any value that must never be readable via the API or UI. The primary use case is values that are written once (e.g. on object creation) and then consumed exclusively by scripts: the script reads the raw value from dataObject, uses it as a credential or token, and the value is never exposed outside the server.
{ "name": "invitationToken", "dataType": "SECRET" }
Behaviour summary:
- Stored in MongoDB as plain text.
- Readable by scripts via
dataObject.<fieldName>— the full value is available inside script execution. - Omitted from all API read responses — the field is not present in returned objects.
- Not SQL-indexed and not search-indexed — cannot be used in query filters.
- Excluded from Excel/CSV exports.
- Rendered as a masked input in the UI; no reveal affordance.
- Write behaviour is identical to
TEXT; the platform does not enforce write-once semantics — that is the responsibility of the service writing the value.
Because SECRET fields are omitted from read responses, you cannot verify or display the stored value via the API after creation. Design your data model accordingly — for example, store a non-secret reference (a prefix or expiry date) alongside the secret if you need to show something to the user.
HYPERLINK
HYPERLINK stores a named URL as a structured object — not a plain string. The structure is always { name: string, href: string }, where name is the display label and href is the target URL.
{ "name": "websiteUrl", "dataType": "HYPERLINK" }
Read (API response):
{ "websiteUrl": { "name": "Mosterd Platform", "href": "https://mosterd.com" } }
Submit (create/update request):
{ "websiteUrl": { "name": "Mosterd Platform", "href": "https://mosterd.com" } }
The API always returns the structured form — even if only href was provided on write. Both name and href should be supplied when submitting a value.
Numbers
| Type | Description |
|---|---|
INTEGER | A whole number. |
DECIMAL | A decimal number. |
CURRENCY | A monetary amount. Displayed with currency symbol. |
PERCENTAGE | A percentage value. Displayed with %. |
Boolean
| Type | Description |
|---|---|
BOOLEAN | True or false. Displayed as a checkbox. |
Date and time
| Type | Description |
|---|---|
DATE | A calendar date (year, month, day). |
DATETIME | A date with time of day. |
TIME | A time of day without date. |
Files
| Type | Description |
|---|---|
FILE | A file attachment. |
IMAGE | An image file. Displayed as a preview. |
Lists
| Type | Description |
|---|---|
LIST | A value from a predefined list. Requires the list property pointing to a StandardList TypeFQN. |
ARRAY | An ordered list of values. |
Example
{
"valueTypes": [
{ "name": "firstName" },
{ "name": "lastName", "required": true },
{ "name": "emailAddress", "dataType": "EMAIL" },
{ "name": "birthdate", "dataType": "DATE", "enabled": false },
{ "name": "salary", "dataType": "CURRENCY" },
{ "name": "isActive", "dataType": "BOOLEAN" },
{ "name": "status", "dataType": "LIST", "list": "my-project.contractStatus" },
{ "name": "notes", "dataType": "TEXTBLOCK" }
]
}