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

# Create ticket field

> Creates a custom ticket field in the workspace.

<Info>Replace `{your-subdomain}` with your workspace's subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml bundled/fields.yaml POST /fields
openapi: 3.0.3
info:
  title: NeetoDesk Ticket Fields APIs
  version: 2.0.0
servers:
  - description: NeetoDesk APIs
    url: https://{your-subdomain}.neetodesk.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Ticket Fields
    description: APIs to manage custom ticket fields in the workspace.
paths:
  /fields:
    post:
      tags:
        - Ticket Fields
      summary: Create a ticket field
      description: Creates a custom ticket field in the workspace.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                field:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Name of the field. It must be unique in the workspace.
                      example: Browser
                    kind:
                      type: string
                      description: >-
                        Type of the field. It cannot be changed once the field
                        is created.
                      enum:
                        - text
                        - textarea
                        - integer
                        - decimal
                        - date
                        - checkbox
                        - single_option
                        - multi_option
                      example: single_option
                    data:
                      type: array
                      description: >-
                        Option labels of the field. Required for `single_option`
                        and `multi_option` fields and ignored for all other
                        kinds. Labels must be unique and cannot exceed 500
                        options. An ID is generated for every option, and these
                        IDs are needed to rename or remove the option later.
                      items:
                        type: string
                      example:
                        - Chrome
                        - Firefox
                        - Safari
                    state:
                      type: string
                      description: State of the field. Defaults to `active`.
                      enum:
                        - active
                        - inactive
                      example: active
                    is_required:
                      type: boolean
                      description: >-
                        Set to `true` to make the field mandatory for customers
                        while submitting a ticket. Defaults to `false`.
                      example: false
                    is_required_for_agent_when_submitting_form:
                      type: boolean
                      description: >-
                        Set to `true` to make the field mandatory for agents
                        while creating a ticket. Defaults to `false`.
                      example: false
                    is_required_for_agent_when_closing_ticket:
                      type: boolean
                      description: >-
                        Set to `true` to make the field mandatory for agents
                        before they close a ticket. Defaults to `false`.
                      example: false
                    display_order:
                      type: integer
                      description: >-
                        Position of the field in the list of ticket fields. The
                        field is added at the end when omitted.
                      example: 3
                    placeholder_slug:
                      type: string
                      description: >-
                        Unique name for this field that can be used in
                        placeholders and automations. Generated from the name
                        when omitted.
                      example: browser
                  required:
                    - name
                    - kind
              required:
                - field
      responses:
        '201':
          description: Created - Field created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  field:
                    $ref: '#/components/schemas/field'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
  schemas:
    field:
      type: object
      properties:
        id:
          type: string
          example: aaaabbbb-cccc-dddd-eeee-ffff00003333
        name:
          type: string
          example: Browser
        kind:
          type: string
          description: Type of the field. It cannot be changed after the field is created.
          enum:
            - text
            - textarea
            - integer
            - decimal
            - date
            - checkbox
            - single_option
            - multi_option
          example: single_option
        state:
          type: string
          description: Fields in the `inactive` state are hidden from agents and customers.
          enum:
            - active
            - inactive
          example: active
        resource_type:
          type: string
          description: Resource the field belongs to. Always `ticket`.
          example: ticket
        is_required:
          type: boolean
          description: Whether customers must fill this field while submitting a ticket.
          example: false
        is_required_for_agent_when_submitting_form:
          type: boolean
          description: Whether agents must fill this field while creating a ticket.
          example: false
        is_required_for_agent_when_closing_ticket:
          type: boolean
          description: Whether agents must fill this field before closing a ticket.
          example: false
        display_order:
          type: integer
          description: Position of the field in the list of ticket fields.
          example: 3
        placeholder_slug:
          type: string
          nullable: true
          description: >-
            Slug used to refer to the field in placeholders and automations, as
            `{{ticket.custom_fields.<placeholder_slug>}}`. Generated from the
            name when the field is created, and not regenerated when the field
            is renamed.
          example: browser
        created_at:
          $ref: '#/components/schemas/date_time_field'
        updated_at:
          $ref: '#/components/schemas/date_time_field'
        options:
          type: array
          description: >-
            Available options of the field. Returned only for `single_option`
            and `multi_option` fields.
          items:
            $ref: '#/components/schemas/field_option'
    date_time_field:
      type: string
      format: date-time
    field_option:
      type: object
      properties:
        id:
          type: string
          example: aaaabbbb-cccc-dddd-eeee-ffff00004444
        label:
          type: string
          example: Chrome
        display_order:
          type: integer
          example: 0

````