> ## Documentation Index
> Fetch the complete documentation index at: https://studio.assembly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create custom fields

> Creates one or more custom fields for the portal. Each field requires a name,
a type, and the entity it belongs to. Options may only be supplied for
multi-select fields.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/custom-fields
openapi: 3.0.0
info:
  contact: {}
  title: Assembly API
  version: 0.0.1
servers:
  - url: https://api.assembly.com
security: []
paths:
  /v1/custom-fields:
    post:
      tags:
        - Custom Fields
      summary: Create custom fields
      description: >-
        Creates one or more custom fields for the portal. Each field requires a
        name,

        a type, and the entity it belongs to. Options may only be supplied for

        multi-select fields.
      operationId: create-custom-field
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/customfields.createCustomFieldsRequest'
        description: Custom fields to create
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/customfields.createCustomFieldsResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Invalid request body or field values
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dispatcher.Error'
          description: Unexpected server error
      security:
        - APIKeyHeader: []
components:
  schemas:
    customfields.createCustomFieldsRequest:
      properties:
        customFields:
          description: >-
            CustomFields is the list of custom fields to create; must contain at
            least one entry.
          items:
            $ref: '#/components/schemas/customfields.createCustomFieldInput'
          type: array
      required:
        - customFields
      type: object
    customfields.createCustomFieldsResponse:
      properties:
        customFields:
          description: CustomFields are the custom fields that were created.
          items:
            $ref: '#/components/schemas/customfields.ClientCustomField'
          type: array
      type: object
    dispatcher.Error:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      type: object
    customfields.createCustomFieldInput:
      properties:
        entityType:
          description: EntityType is the entity the custom field belongs to.
          enum:
            - client
            - company
          example: client
          type: string
        name:
          description: Name is the display name of the custom field.
          example: Account tier
          type: string
        options:
          description: >-
            Options are the selectable values; only valid for multiSelect
            fields.
          items:
            $ref: '#/components/schemas/customfields.createCustomFieldOption'
          type: array
        type:
          description: Type is the data type of the custom field.
          enum:
            - text
            - number
            - email
            - url
            - phoneNumber
            - address
            - multiSelect
          example: multiSelect
          type: string
      required:
        - entityType
        - name
        - type
      type: object
    customfields.ClientCustomField:
      properties:
        entityType:
          description: EntityType is the entity the custom field belongs to.
          enum:
            - client
            - company
          example: client
          type: string
        id:
          description: ID is the unique identifier of the custom field.
          example: d8e8fca2-dc0f-4f3b-9a2e-1f6f3c2b7a10
          format: uuid
          type: string
        key:
          description: >-
            Key is a "human-readable" alternative to ID, uniqueness must be
            enforced on this identifier
          example: accountTier
          type: string
        name:
          description: Name is the display name of the custom field.
          example: Account tier
          type: string
        object:
          description: Object is the resource type discriminator.
          example: customField
          type: string
        options:
          description: >-
            Options are the selectable values; only present for multiSelect
            fields.
          items:
            $ref: '#/components/schemas/customfields.ClientCustomFieldOption'
          type: array
        order:
          description: >-
            Order is the position of the custom field relative to others of the
            same entity type.
          example: 0
          type: integer
        type:
          description: Type is the data type of the custom field.
          enum:
            - text
            - number
            - email
            - url
            - phoneNumber
            - address
            - multiSelect
          example: multiSelect
          type: string
      type: object
    customfields.createCustomFieldOption:
      properties:
        label:
          description: Label is the human-readable text shown for the option.
          example: High priority
          type: string
      required:
        - label
      type: object
    customfields.ClientCustomFieldOption:
      properties:
        color:
          description: Color is the display color for the option.
          example: rgba(204, 0, 0, 1)
          type: string
        id:
          description: ID is the unique identifier of the option.
          example: f1a2b3c4-d5e6-47a8-9b0c-1d2e3f4a5b6c
          format: uuid
          type: string
        key:
          description: >-
            Key is a "human-readable" alternative to ID

            uniqueness must be enforced against other option key values for a
            given custom field
          example: highPriority
          type: string
        label:
          description: Label is the human-readable text shown for the option.
          example: High priority
          type: string
        object:
          description: Object is the resource type discriminator.
          example: customFieldOption
          type: string
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````