Creates a new field in a collection.
Documentation Index
Fetch the complete documentation index at: https://docs.moonbase.ai/llms.txt
Use this file to discover all available pages before exploring further.
Your Moonbase API key.
The ID or ref of the Collection to create the field in.
The field to create. Set type to select the field type.
Simple types — require only name and type:
field/text/single_line, field/text/multi_line, field/boolean, field/email, field/uri/url, field/uri/domain, field/uri/social_x, field/uri/social_linked_in, field/telephone_number, field/geo, field/date, field/datetime
Number types — also require only name and type; field/number/monetary additionally supports default_unit:
field/number/unitless_integer, field/number/unitless_float, field/number/percentage, field/number/monetary
Complex types — require additional properties:
field/choice — needs options (array of option names)field/stage — needs stages (array with name and step_type)field/relation — needs relation_type and allowed_collectionsParameters for creating a field, discriminated by type.
The field type. Must be field/text/single_line.
"field/text/single_line"The human-readable name for the field.
An optional description of the field's purpose.
Whether the field holds a single value (one) or multiple values (many). Defaults to one.
one, many If true, items must have a value for this field. Defaults to false.
If true, values must be unique across all items. Defaults to false.
Creation succeeded.
A field definition, which varies by type
The data type of the field. Always field/text/single_line for this field.
"field/text/single_line"Unique identifier for the object.
The human-readable name of the field (e.g., "Company Name").
A unique, stable, machine-readable identifier for the field within its collection (e.g., company_name).
Specifies whether the field can hold a single value (one) or multiple values (many).
one, many If true, this field must have a value.
If true, values for this field must be unique across all items in the collection.
If true, the value of this field is system-managed and cannot be updated via the API.
system fields are managed by Moonbase, inverse fields are the reverse side of a two-way relation, and custom fields are user-created.
system, inverse, custom Time at which the object was created, as an ISO 8601 timestamp in UTC.
Time at which the object was last updated, as an ISO 8601 timestamp in UTC.
A default value for a field. Can be a static value (e.g., value/date) or a server-resolved value (e.g., current_date). Static values use the same shape as item values. Server-resolved values are computed when an item is created.
An optional, longer-form description of the field's purpose.