> ## 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.

# Create a Collection

> Creates a new collection with default fields (name, created_at, updated_at) and a default view.



## OpenAPI

````yaml POST /collections
openapi: 3.1.0
info:
  title: Moonbase REST API
  version: v0
servers:
  - url: https://api.moonbase.ai/v0
security:
  - bearer: []
tags:
  - name: Inboxes
    description: Manage your inboxes, conversations, and messages
  - name: Collections
    description: Manage your collections and items
  - name: Marketing
    description: Manage your marketing campaigns and forms
  - name: Activities
    description: View activities and capture calls
  - name: Library
    description: Manage your meetings, files, and notes
paths:
  /collections:
    post:
      tags:
        - Collections
      summary: Create a collection
      description: >-
        Creates a new collection with default fields (name, created_at,
        updated_at) and a default view.
      parameters: []
      requestBody:
        description: The `Collection` object to be created.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionCreateParams'
            examples:
              Create a collection:
                summary: Create a collection
                value:
                  name: Leads
                  description: Inbound leads from marketing
                  icon_name: users
      responses:
        '201':
          description: Creation succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
              examples:
                Create a collection:
                  summary: Create a collection
                  value:
                    id: 1CLJt2v5pkpkAnvdgXfEcF
                    type: collection
                    name: Leads
                    description: Inbound leads from marketing
                    icon_name: users
                    ref: leads
                    kind: custom
                    fields:
                      - id: 1CLJt2v6592N5WQzNpjpj2
                        type: field/text/single_line
                        created_at: '2025-02-17T16:00:00.000Z'
                        updated_at: '2025-02-17T16:00:00.000Z'
                        default_values: []
                        name: Name
                        ref: name
                        cardinality: one
                        required: false
                        unique: false
                        readonly: false
                        kind: system
                      - id: 1CLJt2v6KXDyzDuM57pQqo
                        type: field/datetime
                        created_at: '2025-02-17T16:00:00.000Z'
                        updated_at: '2025-02-17T16:00:00.000Z'
                        default_values: []
                        name: Created At
                        ref: created_at
                        cardinality: one
                        required: false
                        unique: false
                        readonly: true
                        kind: system
                      - id: 1CLJt2v6ZuRbtwPhmQtzxa
                        type: field/datetime
                        created_at: '2025-02-17T16:00:00.000Z'
                        updated_at: '2025-02-17T16:00:00.000Z'
                        default_values: []
                        name: Updated At
                        ref: updated_at
                        cardinality: one
                        required: false
                        unique: false
                        readonly: true
                        kind: system
                    created_at: '2025-02-17T16:00:00.000Z'
                    updated_at: '2025-02-17T16:00:00.000Z'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '400'
                        title: Bad Request
                        detail: >-
                          The request could not be understood due to malformed
                          syntax or invalid parameters.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '401'
                        title: Unauthorized
                        detail: >-
                          Invalid or missing API key or JWT. You should provide
                          your Moonbase API Key or JWT in the authorization
                          header, in the format: "Authorization: Bearer
                          MOONBASE_API_KEY"
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '403'
                        title: Forbidden
        '422':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Blank name:
                  summary: Blank name
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '422'
                        title: Unprocessable Entity
                        detail: Name can't be blank
                        source:
                          pointer: /name
                      - type: error
                        status: '422'
                        title: Unprocessable Entity
                        detail: Key can't be blank
                        source:
                          pointer: /key
                      - type: error
                        status: '422'
                        title: Unprocessable Entity
                        detail: Key is invalid
                        source:
                          pointer: /key
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '429'
                        title: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '500'
                        title: Internal Server Error
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                Default:
                  summary: Default
                  value:
                    type: errors
                    errors:
                      - type: error
                        status: '503'
                        title: Service Unavailable
                        detail: >-
                          The service is temporarily unavailable, please try
                          again later.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Moonbase from '@moonbaseai/sdk';

            const client = new Moonbase({
              apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
            });

            const collection = await client.collections.create({
              name: 'Leads',
              description: 'Inbound leads from marketing',
              icon_name: 'users',
            });

            console.log(collection.id);
        - lang: Python
          source: |-
            import os
            from moonbase import Moonbase

            client = Moonbase(
                api_key=os.environ.get("MOONBASE_API_KEY"),  # This is the default and can be omitted
            )
            collection = client.collections.create(
                name="Leads",
                description="Inbound leads from marketing",
                icon_name="users",
            )
            print(collection.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/moonbaseai/moonbase-sdk-go\"\n\t\"github.com/moonbaseai/moonbase-sdk-go/option\"\n)\n\nfunc main() {\n\tclient := moonbase.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcollection, err := client.Collections.New(context.TODO(), moonbase.CollectionNewParams{\n\t\tName:        \"Leads\",\n\t\tDescription: moonbase.String(\"Inbound leads from marketing\"),\n\t\tIconName:    moonbase.String(\"users\"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", collection.ID)\n}\n"
        - lang: Ruby
          source: |-
            require "moonbase"

            moonbase = Moonbase::Client.new(api_key: "My API Key")

            collection = moonbase.collections.create(name: "Leads")

            puts(collection)
components:
  schemas:
    CollectionCreateParams:
      title: CollectionCreateParams
      description: Parameters for creating a `Collection`.
      type: object
      properties:
        name:
          description: >-
            The user-facing name of the collection (e.g., "Leads"). A `ref` is
            automatically derived from the name.
          type: string
        description:
          description: An optional, longer-form description of the collection's purpose.
          type: string
        icon_name:
          description: >-
            An optional icon for the collection, as a Phosphor icon name in
            kebab-case (e.g. `users`, `chart-bar`).
          type: string
      required:
        - name
    Collection:
      title: Collection
      description: >
        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: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `collection` for this
            object.
          type: string
          const: collection
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The user-facing name of the collection (e.g., “Organizations”).
          type: string
        description:
          description: An optional, longer-form description of the collection's purpose.
          type: string
        icon_name:
          description: >-
            The collection's icon, as a Phosphor icon name in kebab-case (e.g.
            `users`, `chart-bar`). Only present when an icon is set.
          type: string
        ref:
          description: >-
            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.
          type: string
        kind:
          description: >-
            `system` collections are managed by Moonbase (e.g., People,
            Organizations), `form` collections back a Form, and `custom`
            collections are user-created.
          type: string
          enum:
            - system
            - form
            - custom
        fields:
          description: >
            A list of `Field` objects that define the schema for items in this
            collection.
          type: array
          items:
            $ref: '#/components/schemas/Field'
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        views:
          description: >
            A list of saved `View` objects for presenting the collection's data.


            **Note:** Only present when requested using the `include` query
            parameter.
          type: array
          items:
            $ref: '#/components/schemas/PartialView'
      required:
        - name
        - type
        - id
        - ref
        - kind
        - fields
        - created_at
        - updated_at
    Errors:
      title: Errors
      description: >-
        The Errors object is a container that holds multiple Error objects when
        an API request encounters several validation or processing issues. This
        allows the API to return comprehensive feedback about all problems
        encountered in a single response.
      type: object
      properties:
        type:
          type: string
          const: errors
        errors:
          description: A list of `Error` objects.
          type: array
          items:
            $ref: '#/components/schemas/Error'
      required:
        - type
    Field:
      description: A field definition, which varies by type
      discriminator:
        propertyName: type
        mapping:
          field/text/single_line:
            $ref: '#/components/schemas/SingleLineTextField'
          field/text/multi_line:
            $ref: '#/components/schemas/MultiLineTextField'
          field/identifier:
            $ref: '#/components/schemas/IdentifierField'
          field/number/unitless_integer:
            $ref: '#/components/schemas/IntegerField'
          field/number/unitless_float:
            $ref: '#/components/schemas/FloatField'
          field/number/monetary:
            $ref: '#/components/schemas/MonetaryField'
          field/number/percentage:
            $ref: '#/components/schemas/PercentageField'
          field/boolean:
            $ref: '#/components/schemas/BooleanField'
          field/email:
            $ref: '#/components/schemas/EmailField'
          field/uri/url:
            $ref: '#/components/schemas/UrlField'
          field/uri/domain:
            $ref: '#/components/schemas/DomainField'
          field/uri/social_x:
            $ref: '#/components/schemas/SocialXField'
          field/uri/social_linked_in:
            $ref: '#/components/schemas/SocialLinkedInField'
          field/telephone_number:
            $ref: '#/components/schemas/TelephoneNumberField'
          field/geo:
            $ref: '#/components/schemas/GeoField'
          field/date:
            $ref: '#/components/schemas/DateField'
          field/datetime:
            $ref: '#/components/schemas/DatetimeField'
          field/choice:
            $ref: '#/components/schemas/ChoiceField'
          field/stage:
            $ref: '#/components/schemas/StageField'
          field/relation:
            $ref: '#/components/schemas/RelationField'
      oneOf:
        - $ref: '#/components/schemas/SingleLineTextField'
        - $ref: '#/components/schemas/MultiLineTextField'
        - $ref: '#/components/schemas/IdentifierField'
        - $ref: '#/components/schemas/IntegerField'
        - $ref: '#/components/schemas/FloatField'
        - $ref: '#/components/schemas/MonetaryField'
        - $ref: '#/components/schemas/PercentageField'
        - $ref: '#/components/schemas/BooleanField'
        - $ref: '#/components/schemas/EmailField'
        - $ref: '#/components/schemas/UrlField'
        - $ref: '#/components/schemas/DomainField'
        - $ref: '#/components/schemas/SocialXField'
        - $ref: '#/components/schemas/SocialLinkedInField'
        - $ref: '#/components/schemas/TelephoneNumberField'
        - $ref: '#/components/schemas/GeoField'
        - $ref: '#/components/schemas/DateField'
        - $ref: '#/components/schemas/DatetimeField'
        - $ref: '#/components/schemas/ChoiceField'
        - $ref: '#/components/schemas/StageField'
        - $ref: '#/components/schemas/RelationField'
    PartialView:
      title: PartialView
      description: ''
      type: object
      properties:
        type:
          type: string
          const: view
        id:
          type: string
        name:
          type: string
        view_type:
          type: string
          enum:
            - table
            - board
        collection:
          $ref: '#/components/schemas/CollectionPointer'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - collection
        - name
        - type
        - id
        - view_type
        - created_at
        - updated_at
    Error:
      title: Error
      description: >-
        The Error object represents a single error that occurred during API
        request processing. It provides detailed information about what went
        wrong, including a unique identifier, status code, and human-readable
        descriptions to help developers understand and resolve the issue.
      type: object
      properties:
        type:
          type: string
          const: error
        id:
          description: A unique identifier for this specific error instance.
          type: string
        status:
          description: The HTTP status code for this problem, as a string.
          type: string
        code:
          description: An application-specific error code string.
          type: string
        title:
          description: A short, human-readable summary of the problem.
          type: string
        detail:
          description: A human-readable explanation of this specific error.
          type: string
        source:
          $ref: '#/components/schemas/ErrorSource'
          description: >-
            An object containing more specific information about the part of the
            request that caused the error.
        meta:
          type: object
          additionalProperties: true
      required:
        - type
    SingleLineTextField:
      title: SingleLineTextField
      description: A field that stores a single line of text without line breaks.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/text/single_line` for this
            field.
          type: string
          const: field/text/single_line
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Company Name").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `company_name`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    MultiLineTextField:
      title: MultiLineTextField
      description: A field that stores multiple lines of text with line breaks preserved.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/text/multi_line` for this
            field.
          type: string
          const: field/text/multi_line
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Description").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `description`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    IdentifierField:
      title: IdentifierField
      description: A field that stores opaque external identifiers verbatim.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/identifier` for this
            field.
          type: string
          const: field/identifier
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Stripe Id").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `stripe_id`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    IntegerField:
      title: IntegerField
      description: A field that stores whole numbers without decimal places.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/number/unitless_integer`
            for this field.
          type: string
          const: field/number/unitless_integer
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Employee Count").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `employee_count`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    FloatField:
      title: FloatField
      description: A field that stores decimal numbers with floating-point precision.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/number/unitless_float` for
            this field.
          type: string
          const: field/number/unitless_float
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Rating").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `rating`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    MonetaryField:
      title: MonetaryField
      description: A field that stores monetary amounts with currency information.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/number/monetary` for this
            field.
          type: string
          const: field/number/monetary
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Deal Value").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `deal_value`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
        default_unit:
          description: >-
            The default currency for the field, as a 3-letter ISO 4217 code
            (e.g., `USD`, `EUR`, `GBP`).
          type: string
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
        - default_unit
    PercentageField:
      title: PercentageField
      description: A field that stores percentage values as decimal numbers.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/number/percentage` for
            this field.
          type: string
          const: field/number/percentage
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Win Probability").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `win_probability`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    BooleanField:
      title: BooleanField
      description: A field that stores true or false values.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/boolean` for this field.
          type: string
          const: field/boolean
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Is Active").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `is_active`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    EmailField:
      title: EmailField
      description: A field that stores and validates email addresses.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/email` for this field.
          type: string
          const: field/email
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Work Email").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `work_email`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    UrlField:
      title: UrlField
      description: A field that stores and validates web URLs.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/uri/url` for this field.
          type: string
          const: field/uri/url
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Website").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `website`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    DomainField:
      title: DomainField
      description: A field that stores internet domain names.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/uri/domain` for this
            field.
          type: string
          const: field/uri/domain
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Company Domain").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `company_domain`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    SocialXField:
      title: SocialXField
      description: A field that stores X (formerly Twitter) profile information.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/uri/social_x` for this
            field.
          type: string
          const: field/uri/social_x
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "X Profile").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `x_profile`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    SocialLinkedInField:
      title: SocialLinkedInField
      description: A field that stores LinkedIn profile information.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/uri/social_linked_in` for
            this field.
          type: string
          const: field/uri/social_linked_in
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "LinkedIn Profile").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `linkedin_profile`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    TelephoneNumberField:
      title: TelephoneNumberField
      description: A field that stores phone numbers in E.164 format.
      type: object
      properties:
        type:
          description: >-
            The data type of the field. Always `field/telephone_number` for this
            field.
          type: string
          const: field/telephone_number
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Phone").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `phone`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    GeoField:
      title: GeoField
      description: A field that stores geographic coordinates or location data.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/geo` for this field.
          type: string
          const: field/geo
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Location").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `location`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    DateField:
      title: DateField
      description: A field that stores dates without time information.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/date` for this field.
          type: string
          const: field/date
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Due Date").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `due_date`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    DatetimeField:
      title: DatetimeField
      description: A field that stores dates with time information.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/datetime` for this field.
          type: string
          const: field/datetime
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Meeting Time").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `meeting_time`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    ChoiceField:
      title: ChoiceField
      description: >-
        A field that stores one or more predefined options from a list of
        choices.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/choice` for this field.
          type: string
          const: field/choice
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Priority").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `priority`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
        options:
          description: >-
            A list of `FieldOption` objects representing the available choices
            for this field.
          type: array
          items:
            $ref: '#/components/schemas/ChoiceFieldOption'
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
        - options
    StageField:
      title: StageField
      description: A field that tracks an item's position in a funnel or pipeline workflow.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/stage` for this field.
          type: string
          const: field/stage
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Sales Stage").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `sales_stage`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
        funnel:
          $ref: '#/components/schemas/Funnel'
          description: >-
            The `Funnel` object that defines the available stages for this
            field.
      required:
        - name
        - type
        - cardinality
        - funnel
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
    RelationField:
      title: RelationField
      description: >-
        A field that creates a link between items in different collections,
        enabling cross-collection relationships.
      type: object
      properties:
        type:
          description: The data type of the field. Always `field/relation` for this field.
          type: string
          const: field/relation
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The human-readable name of the field (e.g., "Account").
          type: string
        ref:
          description: >-
            A unique, stable, machine-readable identifier for the field within
            its collection (e.g., `account`).
          type: string
        description:
          description: An optional, longer-form description of the field's purpose.
          type: string
        cardinality:
          description: >-
            Specifies whether the field can hold a single value (`one`) or
            multiple values (`many`).
          type: string
          enum:
            - one
            - many
        required:
          description: If `true`, this field must have a value.
          type: boolean
        unique:
          description: >-
            If `true`, values for this field must be unique across all items in
            the collection.
          type: boolean
        readonly:
          description: >-
            If `true`, the value of this field is system-managed and cannot be
            updated via the API.
          type: boolean
        kind:
          description: >-
            `system` fields are managed by Moonbase, `inverse` fields are the
            reverse side of a two-way relation, and `custom` fields are
            user-created.
          type: string
          enum:
            - system
            - inverse
            - custom
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
        default_values:
          type: array
          items:
            $ref: '#/components/schemas/FieldDefaultValue'
        relation_type:
          description: >-
            The type of relationship. Can be `one_way` for simple references or
            `two_way` for bidirectional relationships.
          type: string
          enum:
            - one_way
            - two_way
        allowed_collections:
          description: The set of collections that are valid targets for this relation.
          type: array
          items:
            $ref: '#/components/schemas/CollectionPointer'
        reverse_field_name:
          description: >-
            The name given to auto-created reverse fields on target collections.
            Only present on `two_way` source fields.
          type: string
        reverse_fields:
          description: >-
            A list of reverse fields created on each target collection. Only
            present on `two_way` source fields.
          type: array
          items:
            $ref: '#/components/schemas/FieldPointer'
        source_field:
          $ref: '#/components/schemas/FieldPointer'
          description: >-
            A reference to the source field that manages this reverse field.
            Only present on reverse (contingent) fields.
      required:
        - name
        - type
        - cardinality
        - id
        - ref
        - required
        - unique
        - readonly
        - kind
        - created_at
        - updated_at
        - default_values
        - relation_type
        - allowed_collections
    CollectionPointer:
      title: CollectionPointer
      description: >-
        A lightweight reference to a `Collection`, containing the minimal
        information needed to identify it.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `collection` for this
            object.
          type: string
          const: collection
        id:
          description: Unique identifier of the collection.
          type: string
        ref:
          description: The stable, machine-readable reference identifier of the collection.
          type: string
      required:
        - type
        - id
        - ref
    ErrorSource:
      title: ErrorSource
      description: >-
        The ErrorSource object provides additional context about the specific
        part of an API request that caused an error. It can point to either a
        field in the request document or a query parameter that contains invalid
        data.
      type: object
      properties:
        pointer:
          description: >-
            A JSON Pointer [RFC6901] to the associated entity in the request
            document.
          type: string
        parameter:
          description: A string indicating which URI query parameter caused the error.
          type: string
      required: []
    FieldDefaultValue:
      description: >-
        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.
      discriminator:
        propertyName: type
        mapping:
          value/text/single_line:
            $ref: '#/components/schemas/SingleLineTextValue'
          value/text/multi_line:
            $ref: '#/components/schemas/MultiLineTextValue'
          value/identifier:
            $ref: '#/components/schemas/IdentifierValue'
          value/number/unitless_integer:
            $ref: '#/components/schemas/IntegerValue'
          value/number/unitless_float:
            $ref: '#/components/schemas/FloatValue'
          value/number/monetary:
            $ref: '#/components/schemas/MonetaryValue'
          value/number/percentage:
            $ref: '#/components/schemas/PercentageValue'
          value/boolean:
            $ref: '#/components/schemas/BooleanValue'
          value/email:
            $ref: '#/components/schemas/EmailValue'
          value/uri/url:
            $ref: '#/components/schemas/UrlValue'
          value/uri/domain:
            $ref: '#/components/schemas/DomainValue'
          value/uri/social_x:
            $ref: '#/components/schemas/SocialXValue'
          value/uri/social_linked_in:
            $ref: '#/components/schemas/SocialLinkedInValue'
          value/telephone_number:
            $ref: '#/components/schemas/TelephoneNumberValue'
          value/geo:
            $ref: '#/components/schemas/GeoValue'
          value/date:
            $ref: '#/components/schemas/DateValue'
          current_date:
            $ref: '#/components/schemas/CurrentDate'
          value/datetime:
            $ref: '#/components/schemas/DatetimeValue'
          current_datetime:
            $ref: '#/components/schemas/CurrentDatetime'
          value/choice:
            $ref: '#/components/schemas/ChoiceValue'
          value/funnel_step:
            $ref: '#/components/schemas/FunnelStepValue'
          value/relation:
            $ref: '#/components/schemas/RelationValue'
          current_member:
            $ref: '#/components/schemas/CurrentMember'
      oneOf:
        - $ref: '#/components/schemas/SingleLineTextValue'
        - $ref: '#/components/schemas/MultiLineTextValue'
        - $ref: '#/components/schemas/IdentifierValue'
        - $ref: '#/components/schemas/IntegerValue'
        - $ref: '#/components/schemas/FloatValue'
        - $ref: '#/components/schemas/MonetaryValue'
        - $ref: '#/components/schemas/PercentageValue'
        - $ref: '#/components/schemas/BooleanValue'
        - $ref: '#/components/schemas/EmailValue'
        - $ref: '#/components/schemas/UrlValue'
        - $ref: '#/components/schemas/DomainValue'
        - $ref: '#/components/schemas/SocialXValue'
        - $ref: '#/components/schemas/SocialLinkedInValue'
        - $ref: '#/components/schemas/TelephoneNumberValue'
        - $ref: '#/components/schemas/GeoValue'
        - $ref: '#/components/schemas/DateValue'
        - $ref: '#/components/schemas/CurrentDate'
        - $ref: '#/components/schemas/DatetimeValue'
        - $ref: '#/components/schemas/CurrentDatetime'
        - $ref: '#/components/schemas/ChoiceValue'
        - $ref: '#/components/schemas/FunnelStepValue'
        - $ref: '#/components/schemas/RelationValue'
        - $ref: '#/components/schemas/CurrentMember'
    ChoiceFieldOption:
      title: Field Option
      description: Represents a single selectable option within a choice field.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `choice_field_option`
            for this object.
          type: string
          const: choice_field_option
        id:
          description: Unique identifier for the option.
          type: string
        name:
          description: The human-readable text displayed for this option.
          type: string
        color:
          $ref: '#/components/schemas/NamedColor'
          description: The color of the option.
      required:
        - type
        - id
        - name
        - color
    Funnel:
      title: Funnel
      description: A Funnel represents a series of steps used to track progression.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `funnel` for this
            object.
          type: string
          const: funnel
        id:
          description: Unique identifier for the object.
          type: string
        name:
          description: The name of the funnel.
          type: string
        steps:
          description: An ordered list of `FunnelStep` objects that make up the funnel.
          type: array
          items:
            $ref: '#/components/schemas/FunnelStep'
        created_at:
          description: >-
            Time at which the object was created, as an ISO 8601 timestamp in
            UTC.
          type: string
          format: date-time
        updated_at:
          description: >-
            Time at which the object was last updated, as an ISO 8601 timestamp
            in UTC.
          type: string
          format: date-time
      required:
        - name
        - type
        - id
        - steps
        - created_at
        - updated_at
    FieldPointer:
      title: FieldPointer
      description: >-
        A lightweight reference to a `Field`, containing the minimal information
        needed to identify it.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `field` for this
            object.
          type: string
          const: field
        collection:
          $ref: '#/components/schemas/CollectionPointer'
          description: A reference to the `Collection` containing this field.
        id:
          description: Unique identifier of the field.
          type: string
        ref:
          description: The stable, machine-readable reference identifier of the field.
          type: string
      required:
        - collection
        - type
        - id
        - ref
    SingleLineTextValue:
      title: Single Line Text
      description: A single line of text
      type: object
      properties:
        type:
          type: string
          const: value/text/single_line
        data:
          description: >-
            A single line of text, up to 1024 characters long. It should not
            contain line breaks.
          type: string
      required:
        - type
        - data
    MultiLineTextValue:
      title: Multi Line Text
      description: Multiple lines of text
      type: object
      properties:
        type:
          type: string
          const: value/text/multi_line
        data:
          description: >-
            Text which may contain line breaks, can be up to 65,536 characters
            long. Do not use markdown formatting, just plain text.
          type: string
      required:
        - type
        - data
    IdentifierValue:
      title: Identifier
      description: Identifier string
      type: object
      properties:
        type:
          type: string
          const: value/identifier
        data:
          description: An external identifier as text, uo to 255 characters in length.
          type: string
      required:
        - type
        - data
    IntegerValue:
      title: Integer
      description: Integer value without units
      type: object
      properties:
        type:
          type: string
          const: value/number/unitless_integer
        data:
          type: integer
      required:
        - type
        - data
    FloatValue:
      title: Float
      description: Floating point number
      type: object
      properties:
        type:
          type: string
          const: value/number/unitless_float
        data:
          type: number
      required:
        - type
        - data
    MonetaryValue:
      title: Monetary
      description: Monetary or currency value
      type: object
      properties:
        type:
          type: string
          const: value/number/monetary
        data:
          description: >-
            A monetary amount is composed of the amount in the smallest unit of
            a currency and an ISO currency code.
          type: object
          properties:
            in_minor_units:
              type: integer
              description: >-
                The amount in the minor units of the currency. For example, $10
                (10 USD) would be 1000. Minor units conversion depends on the
                currency.
            currency:
              type: string
              description: The 3-letter ISO 4217 currency code
          required:
            - in_minor_units
            - currency
      required:
        - type
        - data
    PercentageValue:
      title: Percentage
      description: Percentage numeric value
      type: object
      properties:
        type:
          type: string
          const: value/number/percentage
        data:
          description: >-
            A floating-point number representing a percentage value, for example
            50.21 for 50.21% or -1000 for -1000% etc.
          type: number
      required:
        - type
        - data
    BooleanValue:
      title: Boolean
      description: True or false value
      type: object
      properties:
        type:
          type: string
          const: value/boolean
        data:
          type: boolean
      required:
        - type
        - data
    EmailValue:
      title: Email
      description: Email address value
      type: object
      properties:
        type:
          type: string
          const: value/email
        data:
          description: A valid email address.
          type: string
          format: email
      required:
        - type
        - data
    UrlValue:
      title: URL
      description: URL or web address
      type: object
      properties:
        type:
          type: string
          const: value/uri/url
        data:
          description: >-
            A valid URL, conforming to RFC 3986, up to 8,192 characters long. It
            should include the protocol, for example 'https://' or
            'mailto:support@moonbase.ai' etc.
          type: string
          format: uri
      required:
        - type
        - data
    DomainValue:
      title: Domain
      description: Internet domain name
      type: object
      properties:
        type:
          type: string
          const: value/uri/domain
        data:
          description: >-
            A valid internet domain name, without protocol (e.g., 'https://') or
            path.
          type: string
          examples:
            - example.com
            - sub.example.com
      required:
        - type
        - data
    SocialXValue:
      title: X
      description: The social media profile for the X (formerly Twitter) platform
      type: object
      properties:
        type:
          type: string
          const: value/uri/social_x
        data:
          $ref: '#/components/schemas/SocialProfileX'
      required:
        - type
        - data
    SocialLinkedInValue:
      title: LinkedIn
      description: The social media profile for the LinkedIn platform
      type: object
      properties:
        type:
          type: string
          const: value/uri/social_linked_in
        data:
          $ref: '#/components/schemas/SocialProfileLinkedIn'
          description: The social media profile for the LinkedIn platform
      required:
        - type
        - data
    TelephoneNumberValue:
      title: Telephone Number
      description: Telephone number value
      type: object
      properties:
        type:
          type: string
          const: value/telephone_number
        data:
          description: >-
            A telephone number in strictly formatted E.164 format. Do not
            include spaces, dashes, or parentheses etc.
          type: string
          examples:
            - '+15556504242'
            - '+442071838750'
      required:
        - type
        - data
    GeoValue:
      title: Geo
      description: Geographic coordinate value
      type: object
      properties:
        type:
          type: string
          const: value/geo
        data:
          description: >-
            A string that represents some geographic location. The exact format
            may vary based on context.
          type: string
          examples:
            - Los Angeles, CA
            - Germany
            - 555 Fifth Avenue, New York, NY
            - Eiffel Tower, Paris, France
            - 'Latitude: 34.0522, Longitude: -118.2437'
      required:
        - type
        - data
    DateValue:
      title: Date
      description: Date without time
      type: object
      properties:
        type:
          type: string
          const: value/date
        data:
          type: string
          format: date
          examples:
            - '2027-09-08'
      required:
        - type
        - data
    CurrentDate:
      title: CurrentDate
      description: Resolves to today's date at the time the record is created.
      type: object
      properties:
        type:
          type: string
          const: current_date
      required:
        - type
    DatetimeValue:
      title: Date Time
      description: Date and time value
      type: object
      properties:
        type:
          type: string
          const: value/datetime
        data:
          type: string
          format: date-time
          examples:
            - '2025-09-08T15:30:00.000Z'
      required:
        - type
        - data
    CurrentDatetime:
      title: CurrentDatetime
      description: Resolves to the current date and time at the time the record is created.
      type: object
      properties:
        type:
          type: string
          const: current_datetime
      required:
        - type
    ChoiceValue:
      title: Choice
      description: Selected choice option
      type: object
      properties:
        type:
          type: string
          const: value/choice
        data:
          $ref: '#/components/schemas/ChoiceFieldOption'
          description: >-
            An option that must match one of the predefined options for the
            field.
      required:
        - type
        - data
    FunnelStepValue:
      title: Funnel Step
      description: Funnel step value
      type: object
      properties:
        type:
          type: string
          const: value/funnel_step
        data:
          $ref: '#/components/schemas/FunnelStep'
          description: A specific funnel step, as configured on the Funnel.
      required:
        - type
        - data
    RelationValue:
      title: Relation
      description: Related item reference
      type: object
      properties:
        type:
          type: string
          const: value/relation
        data:
          $ref: '#/components/schemas/ItemPointer'
          description: A reference to another Moonbase item.
      required:
        - type
        - data
    CurrentMember:
      title: CurrentMember
      description: Resolves to the team member who creates the record.
      type: object
      properties:
        type:
          type: string
          const: current_member
      required:
        - type
    NamedColor:
      type: string
      enum:
        - amber
        - blue
        - cyan
        - emerald
        - fuchsia
        - green
        - indigo
        - lime
        - lunar
        - orange
        - pink
        - purple
        - red
        - rose
        - sky
        - teal
        - violet
        - yellow
      description: >-
        One of Moonbase's standard color names. Moonbase renders these
        consistently across light and dark modes.
    FunnelStep:
      title: FunnelStep
      description: Represents a single step within a `Funnel`.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `funnel_step` for this
            object.
          type: string
          const: funnel_step
        id:
          description: Unique identifier for the object.
          type: string
        step_type:
          description: |
            The status of the step in the funnel flow.
            - `active`: represents an in progress state within the funnel
            - `success`: completed successfully and exited the funnel
            - `failure`: exited the funnel without conversion
          type: string
          enum:
            - active
            - success
            - failure
        name:
          description: The name of the step.
          type: string
        color:
          $ref: '#/components/schemas/NamedColor'
          description: The display color of the step.
      required:
        - name
        - type
        - id
        - step_type
        - color
    SocialProfileX:
      title: SocialProfileX
      description: >-
        Social media profile information including both the full URL and
        extracted username.
      type: object
      properties:
        username:
          description: >-
            The X username, up to 15 characters long, containing only lowercase
            letters (a-z), uppercase letters (A-Z), numbers (0-9), and
            underscores (_). Does not include the '@' symbol prefix.
          type: string
          examples:
            - MoonbaseAI
            - calebelston
        url:
          description: The full URL to the X profile, starting with 'https://x.com/'
          type: string
          format: uri
          examples:
            - https://x.com/MoonbaseAI
            - https://x.com/calebelston
      required:
        - username
        - url
    SocialProfileLinkedIn:
      title: SocialProfileLinkedIn
      description: >-
        Social media profile information including both the full URL and
        extracted username.
      type: object
      properties:
        username:
          description: >-
            The LinkedIn username, including the prefix 'company/' for company
            pages or 'in/' for personal profiles.
          type: string
          examples:
            - company/moonbaseai
            - in/calebelston
        url:
          description: The full URL to the LinkedIn profile.
          type: string
          format: uri
          examples:
            - https://linkedin.com/company/moonbaseai
            - https://linkedin.com/in/calebelston
      required:
        - username
        - url
    ItemPointer:
      title: ItemPointer
      description: >-
        A reference to an `Item` within a specific `Collection`, providing the
        context needed to locate the item.
      type: object
      properties:
        type:
          description: >-
            String representing the object’s type. Always `item` for this
            object.
          type: string
          const: item
        id:
          description: Unique identifier of the item.
          type: string
        collection:
          $ref: '#/components/schemas/CollectionPointer'
          description: A reference to the `Collection` containing this item.
      required:
        - collection
        - type
        - id
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your Moonbase API key.

````