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

# Get all fields from a form

> Retrieve all fields that have been created for a specific form.

export const ScopesList = ({scopes = [], description = "この API には、次のいずれかのスコープが必要です。"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['forms']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v2/forms-v2.json GET /forms/v2/fields/{form_guid}
openapi: 3.0.0
info:
  title: Forms API v2
  version: 2.0.0
  description: >-
    Use the forms API to create and manage forms in your HubSpot account, which
    you can then embed on your website to collect form submissions from website
    visitors. This version of the forms API includes endpoints for submitting
    form data.
servers:
  - url: https://api.hubapi.com
    description: HubSpot API Server
  - url: https://forms.hubspot.com
    description: HubSpot Forms Server
  - url: https://api.hsforms.com
    description: HubSpot Forms API Server
security: []
paths:
  /forms/v2/fields/{form_guid}:
    get:
      summary: Get all fields from a form
      description: Retrieve all fields that have been created for a specific form.
      operationId: getFormFields
      parameters:
        - name: form_guid
          in: path
          required: true
          description: The ID of the form you're requesting.
          schema:
            type: string
      responses:
        '200':
          description: Form fields retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FormField'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FormField:
      type: object
      properties:
        name:
          type: string
          description: The name of the field
        label:
          type: string
          description: The label of the field
        type:
          type: string
          description: The type of the field
        fieldType:
          type: string
          description: The field type
        description:
          type: string
          description: The description of the field
        groupName:
          type: string
          description: The group name
        displayOrder:
          type: integer
          description: The display order
        required:
          type: boolean
          description: Whether the field is required
        selectedOptions:
          type: array
          items:
            type: string
        options:
          type: array
          items:
            type: object
        validation:
          $ref: '#/components/schemas/FieldValidation'
        enabled:
          type: boolean
          description: Whether the field is enabled
        hidden:
          type: boolean
          description: Whether the field is hidden
        defaultValue:
          type: string
          description: The default value
        isSmartField:
          type: boolean
          description: Whether this is a smart field
        unselectedLabel:
          type: string
          description: The unselected label
        placeholder:
          type: string
          description: The placeholder text
        dependentFieldFilters:
          type: array
          items:
            type: object
        labelHidden:
          type: boolean
          description: Whether the label is hidden
        propertyObjectType:
          type: string
          description: The property object type
        metaData:
          type: array
          items:
            type: object
        objectTypeId:
          type: string
          description: The object type ID
      required:
        - name
        - label
        - type
        - fieldType
    Error:
      type: object
      properties:
        category:
          type: string
          description: The error category
        correlationId:
          type: string
          description: A unique identifier for the request
        message:
          type: string
          description: A human readable message describing the error
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        errors:
          type: array
          description: Further information about the error
          items:
            $ref: '#/components/schemas/ErrorDetail'
        context:
          type: object
          description: Context about the error condition
        links:
          type: object
          description: A map of link names to associated URIs
      required:
        - category
        - correlationId
        - message
    FieldValidation:
      type: object
      properties:
        name:
          type: string
          description: The validation name
        message:
          type: string
          description: The validation message
        data:
          type: string
          description: The validation data
        useDefaultBlockList:
          type: boolean
          description: Whether to use the default block list
        blockedEmailAddresses:
          type: array
          items:
            type: string
    ErrorDetail:
      type: object
      properties:
        message:
          type: string
          description: A human readable message describing the error
        in:
          type: string
          description: The name of the field or parameter in which the error was found
        code:
          type: string
          description: The status code associated with the error detail
        subCategory:
          type: string
          description: >-
            A specific category that contains more specific detail about the
            error
        context:
          type: object
          description: Context about the error condition
      required:
        - message

````