Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Body

application/json

The Collection object to be created.

Parameters for creating a Collection.

name
string
required

The user-facing name of the collection (e.g., "Leads"). A ref is automatically derived from the name.

description
string

An optional, longer-form description of the collection's purpose.

icon_name
string

An optional icon for the collection, as a Phosphor icon name in kebab-case (e.g. users, chart-bar).

Response

Creation succeeded.

A Collection is a container for structured data, similar to a database table or spreadsheet. It defines a schema using a set of Fields and holds the data as a list of Items.

type
string
required

String representing the object’s type. Always collection for this object.

Allowed value: "collection"
id
string
required

Unique identifier for the object.

name
string
required

The user-facing name of the collection (e.g., “Organizations”).

ref
string
required

A unique, stable, machine-readable identifier for the collection. This reference is used in API requests and does not change even if the name is updated.

kind
enum<string>
required

system collections are managed by Moonbase (e.g., People, Organizations), form collections back a Form, and custom collections are user-created.

Available options:
system,
form,
custom
fields
(SingleLineTextField · object | MultiLineTextField · object | IdentifierField · object | IntegerField · object | FloatField · object | MonetaryField · object | PercentageField · object | BooleanField · object | EmailField · object | UrlField · object | DomainField · object | SocialXField · object | SocialLinkedInField · object | TelephoneNumberField · object | GeoField · object | DateField · object | DatetimeField · object | ChoiceField · object | StageField · object | RelationField · object)[]
required

A list of Field objects that define the schema for items in this collection.

A field definition, which varies by type

created_at
string<date-time>
required

Time at which the object was created, as an ISO 8601 timestamp in UTC.

updated_at
string<date-time>
required

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

description
string

An optional, longer-form description of the collection's purpose.

icon_name
string

The collection's icon, as a Phosphor icon name in kebab-case (e.g. users, chart-bar). Only present when an icon is set.

views
PartialView · object[]

A list of saved View objects for presenting the collection's data.

Note: Only present when requested using the include query parameter.