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

# List Custom Fields

> List all custom fields defined in your account using the AutoSend API.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.autosend.com/v1/custom-fields \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.autosend.com/v1/custom-fields"

  headers = {
      "Authorization": "Bearer <token>"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.autosend.com/v1/custom-fields", {
    method: "GET",
    headers: {
      Authorization: "Bearer <token>",
    },
  });

  const data = await response.json();
  console.log(data);
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.autosend.com/v1/custom-fields",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer <token>",
    ],
  ]);

  $response = curl_exec($curl);
  curl_close($curl);

  echo $response;
  ```

  ```go Go theme={null}
  package main

  import (
    "fmt"
    "net/http"
    "io/ioutil"
  )

  func main() {
    req, _ := http.NewRequest("GET", "https://api.autosend.com/v1/custom-fields", nil)
    req.Header.Set("Authorization", "Bearer <token>")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
  }
  ```

  ```java Java theme={null}
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;

  public class Main {
    public static void main(String[] args) throws Exception {
      HttpClient client = HttpClient.newHttpClient();

      HttpRequest request = HttpRequest.newBuilder()
        .uri(URI.create("https://api.autosend.com/v1/custom-fields"))
        .header("Authorization", "Bearer <token>")
        .GET()
        .build();

      HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
      System.out.println(response.body());
    }
  }
  ```

  ```ruby Ruby theme={null}
  require "net/http"
  require "uri"

  uri = URI.parse("https://api.autosend.com/v1/custom-fields")
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Get.new(uri)
  request["Authorization"] = "Bearer <token>"

  response = http.request(request)
  puts response.body
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "message": "Custom fields retrieved successfully",
    "data": {
      "customFields": [
        {
          "id": "69c258bae3e715c0521153fb",
          "fieldName": "isVerified",
          "fieldType": "boolean",
          "createdAt": "2026-03-24T09:26:18.826Z",
          "updatedAt": "2026-03-24T09:26:18.826Z"
        },
        {
          "id": "6960953e729f65f154369408",
          "fieldName": "company",
          "fieldType": "string",
          "createdAt": "2026-01-09T05:42:22.171Z",
          "updatedAt": "2026-01-09T05:42:22.171Z"
        },
        {
          "id": "69609535729f65f154369402",
          "fieldName": "industry",
          "fieldType": "string",
          "createdAt": "2026-01-09T05:42:13.892Z",
          "updatedAt": "2026-01-09T05:42:13.892Z"
        }
      ]
    }
  }
  ```
</ResponseExample>

### Authorizations

<ParamField path="Authorizations" type="string | header" required>
  Bearer authentication header of the form Bearer `<token>`, where `<token>` is your auth token.
</ParamField>

### Query Parameters

<ParamField query="includeReservedFields" type="boolean">
  Whether to include built-in reserved fields (email, firstName, lastName, createdAt, userId) in the response. Defaults to `true`.
</ParamField>


## OpenAPI

````yaml GET /custom-fields
openapi: 3.1.0
info:
  title: Custom Fields API
  description: >-
    API for managing custom contact fields in an Autosend project. Custom fields
    let you define dynamic attributes that are attached to every contact in your
    project. Reserved built-in field names cannot be used when creating custom
    fields.
  version: 1.0.0
servers:
  - url: https://api.autosend.com/v1
security:
  - BearerAuth: []
paths:
  /custom-fields:
    get:
      tags:
        - Custom Fields
      summary: List custom fields
      description: >-
        Returns all custom fields defined for the authenticated project. Pass
        `includeReservedFields=false` to omit the built-in fields (email,
        firstName, lastName, createdAt, userId) from the response.
      operationId: listCustomFields
      parameters:
        - name: includeReservedFields
          in: query
          required: false
          description: >-
            Whether to include the built-in reserved fields in the response.
            Defaults to `true`.
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Custom fields retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Custom fields retrieved successfully
                  data:
                    type: object
                    properties:
                      customFields:
                        type: array
                        items:
                          $ref: '#/components/schemas/CustomField'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CustomField:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the custom field.
          example: 60d5ec49f1b2c72d9c8b9999
        fieldName:
          type: string
          description: The programmatic name of the field. Used as the merge tag key.
          example: planTier
        fieldType:
          type: string
          enum:
            - string
            - number
            - date
          description: The data type of the field.
          example: string
        description:
          type: string
          nullable: true
          description: A human-readable description of the field's purpose.
          example: The user's subscription tier
        defaultValue:
          nullable: true
          description: >-
            The value to use when a contact does not have an explicit value for
            this field.
          example: free
        isReserved:
          type: boolean
          description: >-
            Whether this is a built-in reserved field. Reserved fields cannot be
            deleted.
          example: false
        disabled:
          type: boolean
          nullable: true
          description: >-
            Whether this field is disabled for editing. Only applicable to
            certain reserved fields.
          example: false
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the field was created.
          example: '2026-01-10T08:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the field was last updated.
          example: '2026-01-10T08:00:00.000Z'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: An error occurred
        code:
          type: string
          example: ERROR_CODE
  responses:
    Unauthorized:
      description: Missing or invalid Bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            message: Unauthorized
            code: UNAUTHORIZED
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````