---
title: Get custom field
slug: project-api/get-custom-field
docTags: 
createdAt: 2024-06-10T16:48:55.566Z
---

{
  "id": "ZHwzmiFnyXc93m7_nO2n-",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.catenda.com/v2/projects/{project-id}/custom-fields/{custom-field-id}",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/custom-fields/{custom-field-id}"
      }
    ],
    "name": "Get custom field",
    "description": "Get a single custom field.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        },
        {
          "kind": "required",
          "name": "custom-field-id",
          "type": "string",
          "description": "Id of the custom field"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "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": "object",
            "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": "7ScSIIQ7DX75QGIoOVU9P",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.catenda.com/v2/projects/{project-id}/custom-fields/{custom-field-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "2Fc6DYSTCzg__zggTkgoM",
          "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/{custom-field-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "RFiKUC8mhqc3Q7GTQwN6p",
          "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/{custom-field-id}\")\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": "8cdg_Xf1UQr5FLPM_T-Q1",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/custom-fields/{custom-field-id}\"\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": "7ScSIIQ7DX75QGIoOVU9P"
    },
    "results": {
      "languages": [
        {
          "id": "Ygs4TpdSCLFC_kMVqYL6I",
          "language": "200",
          "code": "// OK\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}"
        }
      ],
      "selectedLanguageId": "Ygs4TpdSCLFC_kMVqYL6I"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}