---
title: "Create Extra Field for Resource"
method: POST
path: "/extrafields/VALUE"
tags: ["Extra Fields / Entity"]
---

# Create Extra Field for Resource

`POST /extrafields/VALUE`

## Request

- Base URL: `https://api.forcemanager.com/api/v4`
- URL: `https://api.forcemanager.com/api/v4/extrafields/VALUE`
- Auth: API key in header `X-Session-Key`

This endpoint allows you to create an Extra Field for a specific entity.

You will only be able to create an Extra Field after first providing the Session Key. To know how you can obtain the Session Key, [go to Authentication](#tag/authentication/POST/login).

**HEADERS**

| **Parameter** | **Type** | **Description** |
| --- | --- | --- |
| Content-Type | application/json | Language in which all request and response bodies are encoded |
| Accept | \*/\* | Any data of whatever mime type is accepted |
| X-Session-Key | AUTH_TOKEN | This field must be completed with the token obtained at the authentication |

**REQUEST BODY**

| **Attribute** | **Type** | **Description** |
| --- | --- | --- |
| entity (*Required*) | String | The name of the entity the Extra Field is linked to |
| description | String | Field name in Spanish |
| fieldName (*Required*) | String | Field name in the ForceManager database |
| type (*Required*) | Integer | Define the Extra Field's data type. The allowed types are: `datetime`, `text`, `decimal`, `bit`, `list`, `multivalue` |
| valueListRelated | String | If `type` is `list` or `multivalue`, it has to contain the database name of table that the Extra Field is sticked to |
| defaultValue | String | The default value that the field should have |
| descriptionEN | String | Field name in English |
| descriptionIT | String | Field name in Italian |
| descriptionFR | String | Field name in French |
| descriptionDE | String | Field name in German |
| descriptionPT | String | Field name in Portuguese |
| descriptionUS | String | Field name in American English |
| descriptionRU | String | Field name in Russian |
| descriptionBR | String | Field name in Brasilian Portuguese |
| descriptionDK | String | Field name in Dutch |
| branches | Array | Branches in which the Extra Field is visibile |
| id | Integer | The Extra Field unique identifier |
| length | Integer | If Type is Text, define the length of this field |
| mandatory | Boolean | If true, the Extra Field is mandatory |
| mandatoryRestApi | Boolean | If true, the Extra Field is mandatory in the API requests |
| readOnly | Boolean | If true, the Extra Field is read only |
| order | Integer | Define its position inside the Tab |
| tabId | Integer | The id of the tab that contains the Extra Field |
| searchable | Boolean | If true, you can search by the Extra Field |
| visibleInList | Boolean | If true, the Extra Field is visible in the entity list views of the web app |
| visibleInPhoneCallForm | Boolean | If true, the Extra Field is visible in the Phone Call form |
| webVisibility | Boolean | If true, the Extra Field is visible in all the devices |
| mobileVisibility | Boolean | If true, the Extra Field is visible in the mobile version |
| restApi | String | If true, the Extra Field will be visible in the API requests |
| dynamicField | String | The database name of the table that the Extra Field visibility depends from |
| dynamicFieldValues | Array | The values of the table that make the Extra Field visibile |
| dependenceField | String | If `type` is `list` or `multivalue`, it has to contain the databae name fo the dependent table. This also requires to fill the `idParent` field of each Value of the `valueListRelated` table, to make the dependency effective |
| fuzzySearch | Boolean | If `type` is `list` or `multivalue`, a value of the table can be selected through a search input instead of a option drop down menu, inside the entity create/update form |
| includeTime | Boolean | If `type` is `datetime`, it lets you specify if the field has to include time values |

**RESPONSE**

| **Attribute** | **Type** | **Description** |
| --- | --- | --- |
| id | Integer | Id assigned to the new ExtraField |
| Message | String | Shows the operation status |

**RESPONSE CODES**

| **Status** | **Description** |
| --- | --- |
| 200 OK | Shows if operation succeeded |
| 400 Bad Request | Shows when an invalid request or the requested service is not available |

## Headers

- `Accept` string

## Request body

- object
  - `fieldName` string
  - `valueListRelated` string
  - `description` string
  - `searchable` boolean
  - `visibleInList` boolean
  - `order` integer
  - `webVisibility` boolean
  - `tabId` integer
  - `multilanguage` boolean
  - `mobileVisibility` boolean
  - `mandatory` boolean
  - `readOnly` boolean
  - `descriptionEN` string
  - `descriptionIT` string
  - `descriptionFR` string
  - `descriptionDE` string
  - `descriptionPT` string
  - `descriptionUS` string
  - `descriptionRU` string
  - `descriptionBR` string
  - `descriptionDK` string
  - `branches` unknown[]
    - unknown
  - `defaultValue` string
  - `restApi` boolean
  - `visibleInPhoneCallForm` boolean
  - `type` string
  - `length` integer

## Response `200`

Create Extra Field for Resource

---

[API](https://skmtc.dev/forcemanager/apis/sage-sales-management-public-api-documentation-for-developer.md) · [All operations](https://skmtc.dev/forcemanager/apis/sage-sales-management-public-api-documentation-for-developer/llms.txt) · [OpenAPI document](https://skmtc.dev/forcemanager/apis/sage-sales-management-public-api-documentation-for-developer/revisions/87db17204e2f?raw)
