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

# Get a List of Custom Fields

> This endpoint fetches a list of Custom Fields.

## Request URL

```http theme={null}
GET https://app.tatango.com/api/v2/lists/<ID>/custom_fields
```


## OpenAPI

````yaml GET /api/v2/lists/{ID}/custom_fields
openapi: 3.1.0
info:
  title: Tatango Legacy v2 API
  description: Tatango legacy v2 API endpoints for existing integrations.
  version: 2.0.0
servers:
  - url: https://app.tatango.com
security:
  - basicAuth: []
paths:
  /api/v2/lists/{ID}/custom_fields:
    get:
      tags:
        - Custom Fields
      summary: Get a List of Custom Fields
      description: This endpoint fetches a list of Custom Fields.
      parameters:
        - name: ID
          in: path
          description: ID of the list
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCustomFieldsResponse'
              example:
                status: OK
                custom_fields:
                  - key: some_custom_field_name
                    pattern: '[A-Za-z0-9]'
                    max_length: 9999
                    default_value: The Default Value
                    label: The Label
                    content_type: text
                    should_validate_regex_via_api: false
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl "https://app.tatango.com/api/v2/lists/<ID>/custom_fields" -X
            GET \
              -H "Accept: application/json" \
              -H "Content-Type: application/json" \
              -u emailaddress@mydomain.com:my_api_key \
              -H "Host: example.org" \
              -H "Cookie: "
        - lang: Ruby
          label: Ruby
          source: >-
            require 'net/http'

            require 'uri'


            uri =
            URI.parse('https://app.tatango.com/api/v2/lists/<ID>/custom_fields')

            http = Net::HTTP.new(uri.host, uri.port)

            request = Net::HTTP::Get.new(uri.request_url)

            request.basic_auth("emailaddress@mydomain.com", "my_api_key")

            response = http.request(request)
        - lang: JavaScript
          label: JavaScript
          source: >-
            var request = new XMLHttpRequest();

            request.open('GET',
            'https://app.tatango.com/api/v2/lists/<ID>/custom_fields', false);

            request.setRequestHeader('Content-Type', 'application/json');

            request.setRequestHeader('Authorization', 'Basic ' +
            btoa('emailaddress@mydomain.com:my_api_key'));

            request.send(null);
components:
  schemas:
    GetCustomFieldsResponse:
      type: object
      properties:
        status:
          type: string
          example: OK
        custom_fields:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                description: The unique identifier for the custom field
                example: some_custom_field_name
              pattern:
                type: string
                description: Regular expression pattern for validation
                example: '[A-Za-z0-9]'
              max_length:
                type: integer
                description: Maximum length allowed for the field value
                example: 9999
              default_value:
                type: string
                description: Default value for the custom field
                example: The Default Value
              label:
                type: string
                description: Display label for the custom field
                example: The Label
              content_type:
                type: string
                description: Type of content allowed in the field
                example: text
              should_validate_regex_via_api:
                type: boolean
                description: Whether to validate the regex pattern via API
                example: false
            required:
              - key
              - pattern
              - max_length
              - default_value
              - label
              - content_type
              - should_validate_regex_via_api
      required:
        - status
        - custom_fields
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Tatango authenticates API requests by validating an API key passed via
        HTTP Basic Authentication. Use your login email as the username and your
        API key as the password.

````