---
agentTools:
  projectIndex: https://dataforms.readme.io/llms.txt
---

# Index Fields

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "DataForms.io API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.dataforms.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/templates/{template_id}/fields": {
      "get": {
        "summary": "Index Fields",
        "description": "",
        "operationId": "index-fields",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data\": [\n        {\n            \"id\": \"field_section_XXXXX\",\n            \"type\": \"section\",\n            \"label\": \"Section 1\",\n            \"section_id\": null,\n            \"order\": 1,\n            \"data\": {\n                \"headline\": \"My Section\",\n                \"description\": \"This is the description of my section.\"\n            }\n        },\n        {\n            \"id\": \"field_XXXXX\",\n            \"type\": \"text_input\",\n            \"label\": \"Text Input\",\n            \"section_id\": \"field_section_XXXXX\",\n            \"order\": 0,\n            \"data\": {\n                \"size\": \"md\",\n                \"label\": \"Text Input Label\",\n                \"stretch\": false,\n                \"required\": true,\n                \"validation\": \"text\",\n                \"description\": \"\",\n                \"placeholder\": \"\"\n            }\n        },\n        {\n            \"id\": \"field_XXXXXX\",\n            \"type\": \"select_cards\",\n            \"label\": \"Select-Cards Field\",\n            \"section_id\": \"field_section_XXXXX\",\n            \"order\": 1,\n            \"data\": {\n                \"size\": \"md\",\n                \"label\": \"Select-Cards Field\",\n                \"options\": [\n                    {\n                        \"label\": \"Business-To-Customer\",\n                        \"value\": \"business-to-customer\",\n                        \"description\": \"\"\n                    },\n                    {\n                        \"label\": \"Business-To-Business\",\n                        \"value\": \"business-to-business\",\n                        \"description\": \"\"\n                    },\n                    {\n                        \"label\": \"Business-To-Administration\",\n                        \"value\": \"business-to-administration\",\n                        \"description\": \"\"\n                    }\n                ],\n                \"required\": true,\n                \"description\": \"\",\n                \"multiple_choice\": false\n            }\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "field_section_XXXXX"
                          },
                          "type": {
                            "type": "string",
                            "example": "section"
                          },
                          "label": {
                            "type": "string",
                            "example": "Section 1"
                          },
                          "section_id": {},
                          "order": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "data": {
                            "type": "object",
                            "properties": {
                              "headline": {
                                "type": "string",
                                "example": "My Section"
                              },
                              "description": {
                                "type": "string",
                                "example": "This is the description of my section."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66e3d8b4130b6f004fcc958c:66e40cd6718c4f0018060771"
}
```