---
title: List custom fields
slug: project-api/list-custom-fields
docTags: 
createdAt: 2024-06-10T16:48:55.566Z
---

{
  "id": "__-fkqyoaSu7RRZPVW01k",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.catenda.com/v2/projects/{project-id}/custom-fields",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/custom-fields"
      }
    ],
    "name": "List custom fields",
    "description": "List all the custom fields.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        }
      ],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "archived",
          "type": "string",
          "description": "<p>Filter by archived status. Valid values are <strong>all</strong>, <strong>archived</strong>, <strong>not-archived</strong>. Default value is <strong>all</strong>.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Represents a single custom field.",
            "customType": "custom-field[]",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "Id of the custom field, represented as compacted UUID using 32 hexadecimal characters.",
                "example": "324409076a694255b589d236517a55da"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "The name of the custom field.",
                "example": "Custom field name"
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Description of the custom field.",
                "example": "Custom field description"
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string<text | integer | double | enumeration | date>",
                "description": "Type of the custom field. Valid values are \"text\", \"integer\", \"double\", \"enumeration\" or \"date\".",
                "example": "text"
              },
              {
                "name": "createdAt",
                "kind": "optional",
                "type": "string",
                "description": "The date and time the custom field was created in ISO 8601 format.",
                "example": "2023-03-06T11:52:45.000Z"
              },
              {
                "name": "createdBy",
                "kind": "optional",
                "type": "string",
                "description": "Id of the user that created the custom field.",
                "example": "624809076a694255b989d236517a55da"
              },
              {
                "name": "archived",
                "kind": "optional",
                "type": "boolean",
                "description": "Whether the custom field is archived.",
                "example": false
              },
              {
                "name": "dropdownItems",
                "kind": "optional",
                "type": "array",
                "description": "List of dropdown items for custom fields of type enumeration. Value is null for other custom field types.",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the custom field, represented as compacted UUID using 32 hexadecimal characters.",
                    "example": ""
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of the dropdown item",
                    "example": "Dropdown item 1"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "The code of the enumeration item, value is unique for a custom field.",
                    "example": "Item name"
                  },
                  {
                    "name": "disabled",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Whether the enumeration item is disabled.",
                    "example": false
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/custom-field",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "PQA2dMn1-2RXfEJRjQh8t",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.catenda.com/v2/projects/{project-id}/custom-fields \\\n     --header 'accept: application/json'"
        },
        {
          "id": "kPtxw_sTrADsqMtQHWFwG",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/custom-fields\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "HMQ14Yqjq1WTSpC4GFG5j",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/custom-fields\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "XC3LXgjb9A7c6UZqMnIoY",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/custom-fields\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "PQA2dMn1-2RXfEJRjQh8t"
    },
    "results": {
      "languages": [
        {
          "id": "HyDiUD_5SAQ_gzwBvXOgX",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"id\": \"324409076a694255b589d236517a55da\",\n    \"name\": \"Custom field name\",\n    \"description\": \"Custom field description\",\n    \"type\": \"text\",\n    \"createdAt\": \"2023-03-06T11:52:45.000Z\",\n    \"createdBy\": \"624809076a694255b989d236517a55da\",\n    \"archived\": false,\n    \"dropdownItems\": [\n      {\n        \"id\": \"\",\n        \"name\": \"Dropdown item 1\",\n        \"code\": \"Item name\",\n        \"disabled\": false\n      }\n    ]\n  }\n]"
        }
      ],
      "selectedLanguageId": "HyDiUD_5SAQ_gzwBvXOgX"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}