> For the complete documentation index, see [llms.txt](https://docs.omnidesk.io/omnidesk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omnidesk.io/omnidesk/api-specification/formfield.md).

# Formfield

**All the endpoints that can be called on the Formfield controller.**

Each endpoint requires the `FORM_CUD` permission, except for `GET` index, which requires the `FORM_READ` permission.

## index

> \*\*Returns all form fields with optional filters such as search queries, views and result limits.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Formfield","description":"**All the endpoints that can be called on the Formfield controller.**\n\nEach endpoint requires the `FORM_CUD` permission, except for `GET` index, which requires the `FORM_READ` permission."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/formfield":{"get":{"tags":["Formfield"],"summary":"index","description":"**Returns all form fields with optional filters such as search queries, views and result limits.**","responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## index

> \*\*Creates a new form field.\*\*\
> \
> If you want to add multiple required statuses, multiply the required\_statuses key and give the empty brackets indices.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Formfield","description":"**All the endpoints that can be called on the Formfield controller.**\n\nEach endpoint requires the `FORM_CUD` permission, except for `GET` index, which requires the `FORM_READ` permission."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/formfield":{"post":{"tags":["Formfield"],"summary":"index","description":"**Creates a new form field.**\n\nIf you want to add multiple required statuses, multiply the required_statuses key and give the empty brackets indices.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"form_id":{"type":"string","description":"type: `number`"},"title":{"type":"string","description":"type: `string`"},"input_type":{"type":"string","description":"type: `^(text(area|readonly|hidden)?|select(readonly|hidden)?)$`"},"field_order":{"type":"string","description":"type: `number` = null"},"required_statuses[]":{"type":"string","description":"type: `^(open|pending|holding|solved)$` = null"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Returns this specific form field by ID.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Formfield","description":"**All the endpoints that can be called on the Formfield controller.**\n\nEach endpoint requires the `FORM_CUD` permission, except for `GET` index, which requires the `FORM_READ` permission."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/formfield/{id}":{"get":{"tags":["Formfield"],"summary":"item","description":"**Returns this specific form field by ID.**","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Updates this form field.\*\*\
> \
> Identical to \`POST\` index, except this one also has an external code parameter.\
> \
> If you want to update multiple required statuses, multiply the required\_statuses key and give the empty brackets indices.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Formfield","description":"**All the endpoints that can be called on the Formfield controller.**\n\nEach endpoint requires the `FORM_CUD` permission, except for `GET` index, which requires the `FORM_READ` permission."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/formfield/{id}":{"put":{"tags":["Formfield"],"summary":"item","description":"**Updates this form field.**\n\nIdentical to `POST` index, except this one also has an external code parameter.\n\nIf you want to update multiple required statuses, multiply the required_statuses key and give the empty brackets indices.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"form_id":{"type":"string","description":"type: `number`"},"title":{"type":"string","description":"type: `string`"},"input_type":{"type":"string","description":"type: `^[a-z]+$`"},"field_order":{"type":"string","description":"type: `number` = null"},"external_code":{"type":"string","description":"type: `string` = null"},"required_statuses[]":{"type":"string","description":"type: `^(open|pending|holding|solved)$` = null"}}}}}},"parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Permanently deletes this form field.\*\*

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Formfield","description":"**All the endpoints that can be called on the Formfield controller.**\n\nEach endpoint requires the `FORM_CUD` permission, except for `GET` index, which requires the `FORM_READ` permission."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/formfield/{id}":{"delete":{"tags":["Formfield"],"summary":"item","description":"**Permanently deletes this form field.**","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```
