---
title: "Fields"
description: "<p>Define and manage custom metadata fields.</p>"
url: "https://www.contentstack.com/docs/developers/apis/assets-api/fields"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-08-21"
---

# Fields

Define and manage custom metadata fields.

## Create a field

### Create a field

**POST** `/api/fields`

The Create a field request creates a custom metadata field in your organization. Associate it with one or more asset types afterwards to make it available on assets.

Every field requires title, uid, display\_type, is\_system, is\_mandatory, is\_multiple, and field\_metadata.

Choose uid deliberately and treat it as permanent: it is the key you read and write in user\_defined\_fields on an asset. Use display\_type to select the input: TEXT, GROUP, URL, MULTITEXT, SELECT, NUMBER, BOOLEAN, DATE, RADIO, or CHECKBOX. Values are case-sensitive, so text is rejected with 422.

Set is\_mandatory to require a value before an asset can be saved, and is\_multiple to accept more than one value, which turns the field into a list. Set is\_system to false for fields you create, because it marks a Contentstack-managed field.

Use field\_metadata for per-type configuration, such as validation rules or the options of a choice field, and child to nest fields under a group field so related values stay together.  
  

##### Mandatory field accepting several values:

```
{
  "display_type": "TEXT",
  "field_metadata": {},
  "is_mandatory": true,
  "is_multiple": true,
  "is_system": false,
  "title": "Usage Rights",
  "uid": "usage_rights"
}
```

undefined  
  

##### Group field with nested children:

```
{
  "child": [
    {
      "display_type": "DATE",
      "is_mandatory": true,
      "title": "Expires On",
      "uid": "expires_on"
    }
  ],
  "display_type": "GROUP",
  "field_metadata": {},
  "is_mandatory": false,
  "is_multiple": false,
  "is_system": false,
  "title": "Licence",
  "uid": "licence"
}
```

undefined

#### Headers

- **authorization** (optional)
  OAuth access token authentication. Pass the token in the authorization header as Bearer <token>. This header takes an OAuth access token. It does not take a management token, and management tokens are not supported by this API.

Authentication is required. Every request must carry either this header or the authtoken header; a request with neither is rejected.
- **authtoken** (optional)
  Contentstack authtoken authentication. Pass your Contentstack authtoken in the authtoken header.

This is your authtoken, not your stack api\_key and not a management token. OpenAPI classifies any credential sent in a header as an API key, which is why some documentation viewers label this scheme apiKey. That label refers to the transport, not to a Contentstack API key.

Authentication is required. Every request must carry either this header or the authorization header; a request with neither is rejected.
- **x-cs-api-version** (required)
  Enter the Assets API version. Default is 4.
- **organization_uid** (optional)
  REQUIRED when using authtoken authentication. You must explicitly provide this header. It is optional with Authorization Bearer token authentication, where the organization\_uid is derived from the token.

#### Sample Response

```json
{
  "notice": "string",
  "field": {
    "uid": "string",
    "title": "string",
    "display_type": "string",
    "asset_types_count": 0,
    "is_system": true,
    "is_mandatory": true,
    "is_multiple": true,
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "updated_by": "string"
  },
  "job_id": "string"
}
```

## Get all fields

### Get all fields

**GET** `/api/fields`

The Get all fields request fetches a paginated list of all custom metadata fields in your organization.

#### Query Parameters

- **skip** (optional)
  The skip parameter skips a specific number of items in the output. For example, if there are 20 items and you want to skip the first 2 to get only the last 18 in the response body, specify 2 here.
- **limit** (optional)
  The limit parameter returns a specific number of items (between 0 and 100) in your response based on the value you provide.
- **include_count** (optional)
  Set to true to include the total number of fields in the response. Default is false.

#### Headers

- **authorization** (optional)
  OAuth access token authentication. Pass the token in the authorization header as Bearer <token>. This header takes an OAuth access token. It does not take a management token, and management tokens are not supported by this API.

Authentication is required. Every request must carry either this header or the authtoken header; a request with neither is rejected.
- **authtoken** (optional)
  Contentstack authtoken authentication. Pass your Contentstack authtoken in the authtoken header.

This is your authtoken, not your stack api\_key and not a management token. OpenAPI classifies any credential sent in a header as an API key, which is why some documentation viewers label this scheme apiKey. That label refers to the transport, not to a Contentstack API key.

Authentication is required. Every request must carry either this header or the authorization header; a request with neither is rejected.
- **x-cs-api-version** (required)
  Enter the Assets API version. Default is 4.
- **organization_uid** (optional)
  REQUIRED when using authtoken authentication. You must explicitly provide this header. It is optional with Authorization Bearer token authentication, where the organization\_uid is derived from the token.

#### Sample Response

```json
{
  "count": 0,
  "relation": "string",
  "fields": [
    {
      "uid": "string",
      "title": "string",
      "display_type": "string",
      "asset_types_count": 0,
      "is_system": true,
      "is_mandatory": true,
      "is_multiple": true,
      "description": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": "string",
      "updated_at": "2019-08-24T14:15:22Z",
      "updated_by": "string"
    }
  ]
}
```

## Update a field

### Update a field

**PUT** `/api/fields/{field_uid}`

The Update a field request updates the details of a specific custom metadata field, such as its title, description, or validation rules.

If the update removes a child from a group field, the request returns 202 with a job\_id: a background job then removes the values of the removed child from existing assets.

#### URL Parameters

- **field_uid** (required)
  Enter the uid of the field that you want to retrieve.

#### Headers

- **authorization** (optional)
  OAuth access token authentication. Pass the token in the authorization header as Bearer <token>. This header takes an OAuth access token. It does not take a management token, and management tokens are not supported by this API.

Authentication is required. Every request must carry either this header or the authtoken header; a request with neither is rejected.
- **authtoken** (optional)
  Contentstack authtoken authentication. Pass your Contentstack authtoken in the authtoken header.

This is your authtoken, not your stack api\_key and not a management token. OpenAPI classifies any credential sent in a header as an API key, which is why some documentation viewers label this scheme apiKey. That label refers to the transport, not to a Contentstack API key.

Authentication is required. Every request must carry either this header or the authorization header; a request with neither is rejected.
- **x-cs-api-version** (required)
  Enter the Assets API version. Default is 4.
- **organization_uid** (optional)
  REQUIRED when using authtoken authentication. You must explicitly provide this header. It is optional with Authorization Bearer token authentication, where the organization\_uid is derived from the token.

#### Sample Response

```json
{
  "notice": "string",
  "field": {
    "uid": "string",
    "title": "string",
    "display_type": "string",
    "asset_types_count": 0,
    "is_system": true,
    "is_mandatory": true,
    "is_multiple": true,
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "updated_by": "string"
  },
  "job_id": "string"
}
```

## Get a field

### Get a field

**GET** `/api/fields/{field_uid}`

The Get a field request fetches the details of a specific custom metadata field using its uid.

#### URL Parameters

- **field_uid** (required)
  Enter the uid of the field that you want to retrieve.

#### Headers

- **authorization** (optional)
  OAuth access token authentication. Pass the token in the authorization header as Bearer <token>. This header takes an OAuth access token. It does not take a management token, and management tokens are not supported by this API.

Authentication is required. Every request must carry either this header or the authtoken header; a request with neither is rejected.
- **authtoken** (optional)
  Contentstack authtoken authentication. Pass your Contentstack authtoken in the authtoken header.

This is your authtoken, not your stack api\_key and not a management token. OpenAPI classifies any credential sent in a header as an API key, which is why some documentation viewers label this scheme apiKey. That label refers to the transport, not to a Contentstack API key.

Authentication is required. Every request must carry either this header or the authorization header; a request with neither is rejected.
- **x-cs-api-version** (required)
  Enter the Assets API version. Default is 4.
- **organization_uid** (optional)
  REQUIRED when using authtoken authentication. You must explicitly provide this header. It is optional with Authorization Bearer token authentication, where the organization\_uid is derived from the token.

#### Sample Response

```json
{
  "field": {
    "_id": "string",
    "uid": "string",
    "title": "string",
    "display_type": "string",
    "description": "string",
    "field_metadata": {
      "default_value": null,
      "instruction": "string",
      "helper_text": "string",
      "placeholder_text": "string",
      "max_multiple_count": 1,
      "multiple_value": true,
      "min": 0,
      "max": 0,
      "format": "string",
      "data_type": "string",
      "hide_time": true,
      "choices": [
        {}
      ]
    },
    "is_mandatory": true,
    "is_multiple": true,
    "is_system": true,
    "child": [
      {}
    ],
    "path": [
      {
        "uid": "string",
        "title": "string"
      }
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "created_by": "string",
    "updated_at": "2019-08-24T14:15:22Z",
    "updated_by": "string"
  }
}
```

## Delete a field

### Delete a field

**DELETE** `/api/fields/{field_uid}`

The Delete a field request deletes a specific custom metadata field using its uid.

The request returns 202: the field is deleted, and a background job then removes its values from existing assets. The response includes the job's job\_id. Until the job finishes, some assets may still return a value for the field.

#### URL Parameters

- **field_uid** (required)
  Enter the uid of the field that you want to retrieve.

#### Headers

- **authorization** (optional)
  OAuth access token authentication. Pass the token in the authorization header as Bearer <token>. This header takes an OAuth access token. It does not take a management token, and management tokens are not supported by this API.

Authentication is required. Every request must carry either this header or the authtoken header; a request with neither is rejected.
- **authtoken** (optional)
  Contentstack authtoken authentication. Pass your Contentstack authtoken in the authtoken header.

This is your authtoken, not your stack api\_key and not a management token. OpenAPI classifies any credential sent in a header as an API key, which is why some documentation viewers label this scheme apiKey. That label refers to the transport, not to a Contentstack API key.

Authentication is required. Every request must carry either this header or the authorization header; a request with neither is rejected.
- **x-cs-api-version** (required)
  Enter the Assets API version. Default is 4.
- **organization_uid** (optional)
  REQUIRED when using authtoken authentication. You must explicitly provide this header. It is optional with Authorization Bearer token authentication, where the organization\_uid is derived from the token.

#### Sample Response

```json
{
  "notice": "string",
  "uid": "string",
  "job_id": "string"
}
```