Create a Field
Creates a new field in a collection.
Authorizations
Your Moonbase API key.
Path Parameters
The ID or ref of the Collection to create the field in.
Body
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 requires default_unit:
field/number/unitless_integer, field/number/unitless_float, field/number/percentage, field/number/monetary
Complex types — require additional properties:
field/choice— needsoptions(array of option names)field/stage— needsstages(array withnameandstep_type)field/relation— needsrelation_typeandallowed_collections
- SingleLineTextFieldCreateParams
- MultiLineTextFieldCreateParams
- IdentifierFieldCreateParams
- IntegerFieldCreateParams
- FloatFieldCreateParams
- MonetaryFieldCreateParams
- PercentageFieldCreateParams
- BooleanFieldCreateParams
- EmailFieldCreateParams
- UrlFieldCreateParams
- DomainFieldCreateParams
- SocialXFieldCreateParams
- SocialLinkedInFieldCreateParams
- TelephoneNumberFieldCreateParams
- GeoFieldCreateParams
- DateFieldCreateParams
- DatetimeFieldCreateParams
- ChoiceFieldCreateParams
- StageFieldCreateParams
- RelationFieldCreateParams
Parameters 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.
Response
Creation succeeded.
- SingleLineTextField
- MultiLineTextField
- IdentifierField
- IntegerField
- FloatField
- MonetaryField
- PercentageField
- BooleanField
- EmailField
- UrlField
- DomainField
- SocialXField
- SocialLinkedInField
- TelephoneNumberField
- GeoField
- DateField
- DatetimeField
- ChoiceField
- StageField
- RelationField
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.
- Single Line Text
- Multi Line Text
- Identifier
- Integer
- Float
- Monetary
- Percentage
- Boolean
- Email
- URL
- Domain
- X
- LinkedIn
- Telephone Number
- Geo
- Date
- CurrentDate
- Date Time
- CurrentDatetime
- Choice
- Funnel Step
- Relation
- CurrentMember
An optional, longer-form description of the field's purpose.

