Contentstack introduces the Agentic Experience Platform | Press release
Contentstack introduces the Agentic Experience Platform | Press release
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs
  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing
  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases
  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP
  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support
  • Overview
  • Find a partner
  • Login
  • About us
  • News
  • Customer support portal
  • Contact
  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.

AI Assistant

Ask a question below...

infoAI responses may contain mistakes.
/
  1. Home
  2. APIs
  3. Content Management API
  4. Global Fields

Global Fields

markdownView as Markdown

A Global field is a reusable field (or group of fields) that you can define once and reuse across multiple content types within your stack. This eliminates the need to recreate the same set of fields multiple times, saving effort and ensuring consistency.

NoteIf your Global field contains nested Global fields, they will appear as part of the schema in the API response.

You can pass the branch header in API requests to fetch or manage modules within specific branches of the stack. Additionally, setting the include_branch query parameter to true includes the _branch key in the response, specifying the unique ID of the branch where the module resides.

Additional ResourceYou can create dynamic and flexible Global Fields by nesting Global fields within a Modular Block, Global, or a Group fields.

Get all global fields

GEThttps://api.contentstack.io/v3/global_fields

The Get all global fields request returns comprehensive information of all the global fields available in a particular stack in your organization.

Note
  • Information about Global fields can be retrieved by all users, regardless of their role or access level.
  • If your Global field contains nested Global fields, they will appear as part of the schema in the API response.
  • To configure the permissions for your application via OAuth, please include the cm.global-fields.management:read scope.

Sample Response
Status|200 OK
12345678910111213141516171819202122232425262728293031323334353637383940414243
{
    "global_fields": [
        {
            "created_at": "2019-09-06T11:30:02.108Z",
            "updated_at": "2019-09-06T11:30:02.108Z",
            "title": "Servlet",
            "uid": "servlet",
            "_version": 1,
            "inbuilt_class": false,
            "schema": [
                {
                    "display_name": "Name",
                    "uid": "name",
                    "data_type": "text",
                    "multiple": false,
                    "mandatory": false,
                    "unique": false,
                    "non_localizable": false
                },
                {
                    "data_type": "text",
                    "display_name": "Rich text editor",
                    "uid": "description",
                    "field_metadata": {
                        "allow_rich_text": true,
                        "description": "",
                        "multiline": false,
                        "rich_text_type": "advanced",
                        "options": [],
                        "version": 3
                    },
                    "multiple": false,
                    "mandatory": false,
                    "unique": false,
                    "non_localizable": false
                }
            ],
            "last_activity": {},
            "maintain_revisions": true,
            "description": ""
        }
    ]
}

Get a single global field

GEThttps://api.contentstack.io/v3/global_fields/{global_field_uid}

The Get a single global field request allows you to fetch comprehensive details of a specific global field.

When executing the API call, in the 'URL Parameters' section, provide the unique ID of your global field.

Note
  • Information about Global fields can be retrieved by all users, regardless of their role or access level.
  • If your Global field contains nested Global fields, they will appear as part of the schema in the API response.
  • To configure the permissions for your application via OAuth, please include the cm.global-fields.management:read scope.
Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041
{
    "global_field": {
        "created_at": "2019-09-06T11:30:02.108Z",
        "updated_at": "2019-09-06T11:30:02.108Z",
        "title": "Servlet",
        "uid": "servlet",
        "_version": 1,
        "inbuilt_class": false,
        "schema": [
            {
                "display_name": "Name",
                "uid": "name",
                "data_type": "text",
                "multiple": false,
                "mandatory": false,
                "unique": false,
                "non_localizable": false
            },
            {
                "data_type": "text",
                "display_name": "Rich text editor",
                "uid": "description",
                "field_metadata": {
                    "allow_rich_text": true,
                    "description": "",
                    "multiline": false,
                    "rich_text_type": "advanced",
                    "options": [],
                    "version": 3
                },
                "multiple": false,
                "mandatory": false,
                "unique": false,
                "non_localizable": false
            }
        ],
        "last_activity": {},
        "maintain_revisions": true,
        "description": ""
    }
}

Create a global field

POSThttps://api.contentstack.io/v3/global_fields

The Create a global field request allows you to create a new global field in a particular stack of your Contentstack account. You can use this global field in any content type within your stack.

To configure the permissions for your application via OAuth, please include the cm.global-fields.management:write scope.

NoteOnly the stack owner, administrator, and developer can create global fields.

To create a nested global field, follow the schema in the request body:

{
"global_field": {
"title": "Nested Global Field",
"uid": "nested_global_field",
"description": "",
"schema": [
{
"data_type": "text",
"display_name": "Single Line Textbox",
"uid": "single_line",
"field_metadata": {
"description": "",
"default_value": "",
"version": 3
},
"format": "",
"error_messages": {
"format": ""
},
"mandatory": false,
"multiple": false,
"non_localizable": false,
"unique": false,
"indexed": false,
"inbuilt_model": false
},
{
"data_type": "global_field",
"display_name": "Global",
"reference_to": "global_field_1",
"field_metadata": {
"description": ""
},
"uid": "global_field",
"mandatory": false,
"multiple": false,
"non_localizable": false,
"unique": false,
"indexed": false,
"inbuilt_model": false
}
]
}
}
Sample Request
1234567891011121314151617181920212223242526272829303132333435363738394041424344
{
    "global_field": {
        "title": "Nested Global Field",
        "uid": "nested_global_field",
        "description": "",
        "schema": [
            {
                "data_type": "text",
                "display_name": "Single Line Textbox",
                "uid": "single_line",
                "field_metadata": {
                    "description": "",
                    "default_value": "",
                    "version": 3
                },
                "format": "",
                "error_messages": {
                    "format": ""
                },
                "mandatory": false,
                "multiple": false,
                "non_localizable": false,
                "unique": false,
                "indexed": false,
                "inbuilt_model": false
            },
            {
                "data_type": "global_field",
                "display_name": "Global",
                "reference_to": "global_field_1",
                "field_metadata": {
                    "description": ""
                },
                "uid": "global_field",
                "mandatory": false,
                "multiple": false,
                "non_localizable": false,
                "unique": false,
                "indexed": false,
                "inbuilt_model": false
            }
        ]
    }
}
Sample Response
Status|201 Created
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
{
    "notice": "Global Field created successfully.",
    "global_field": {
        "created_at": "2024-08-07T07:39:11.410Z",
        "updated_at": "2024-08-07T07:40:02.343Z",
        "title": "Nested Global Field",
        "uid": "nested_global_field",
        "description": "",
        "_version": 1,
        "inbuilt_class": false,
        "schema": [
            {
                "data_type": "text",
                "display_name": "Single Line Textbox",
                "uid": "single_line",
                "field_metadata": {
                    "description": "",
                    "default_value": "",
                    "version": 3
                },
                "format": "",
                "error_messages": {
                    "format": ""
                },
                "mandatory": false,
                "multiple": false,
                "non_localizable": false,
                "unique": false,
                "indexed": false,
                "inbuilt_model": false
            },
            {
                "data_type": "global_field",
                "display_name": "Global",
                "reference_to": "global_field_1",
                "field_metadata": {
                    "description": ""
                },
                "uid": "global_field",
                "mandatory": false,
                "multiple": false,
                "non_localizable": false,
                "unique": false,
                "indexed": false,
                "inbuilt_model": false
            }
        ],
        "last_activity": {},
        "maintain_revisions": true
    }
}

Update a global field

PUThttps://api.contentstack.io/v3/global_fields/{global_field_uid}

The Update a global field request allows you to update the schema of an existing global field.
To configure the permissions for your application via OAuth, please include the cm.global-fields.management:write scope.

When executing the API call, in the 'URL Parameters' section, provide the unique ID of your global field.

Sample Request
1234567891011121314151617181920212223242526
{
        "global_field": {
            "title": "Servlet",
            "uid": "servlet",
            "schema": [{
                "display_name": "Name",
                "uid": "name",
                "data_type": "text"
            }, {
                "data_type": "text",
                "display_name": "Rich text editor",
                "uid": "description",
                "field_metadata": {
                    "allow_rich_text": true,
                    "description": "",
                    "multiline": false,
                    "rich_text_type": "advanced",
                    "options": [],
                    "version": 3
                },
                "multiple": false,
                "mandatory": false,
                "unique": false
            }]
        }
    }
Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142
{
    "notice": "Global Field updated successfully.",
    "global_field": {
        "created_at": "2019-09-06T11:30:02.108Z",
        "updated_at": "2019-09-06T11:30:02.108Z",
        "title": "Servlet",
        "uid": "servlet",
        "_version": 1,
        "inbuilt_class": false,
        "schema": [
            {
                "display_name": "Name",
                "uid": "name",
                "data_type": "text",
                "multiple": false,
                "mandatory": false,
                "unique": false,
                "non_localizable": false
            },
            {
                "data_type": "text",
                "display_name": "Rich text editor",
                "uid": "description",
                "field_metadata": {
                    "allow_rich_text": true,
                    "description": "",
                    "multiline": false,
                    "rich_text_type": "advanced",
                    "options": [],
                    "version": 3
                },
                "multiple": false,
                "mandatory": false,
                "unique": false,
                "non_localizable": false
            }
        ],
        "last_activity": {},
        "maintain_revisions": true,
        "description": ""
    }
}

Delete global field

DELETEhttps://api.contentstack.io/v3/global_fields/{global_field_uid}?force=true

The Delete global field request allows you to delete a specific global field.

To configure the permissions for your application via OAuth, please include the cm.global-fields.management:write scope.

WarningIf your Global field has been referred within a particular content type, then you will need to pass an additional query parameter force:true to delete the Global field.

When executing the API call, in the 'URL Parameters' section, provide the unique ID of your global field.

Sample Response
Status|200 OK
123
{
  "notice": "Global Field deleted successfully."
}

Import a global field

POSThttps://api.contentstack.io/v3/global_fields/import

The Import a global field call imports a global field into a stack.

To import, you need to provide/upload a JSON file that contains the schema of the global field that you wish to import.

TipYou can try the call manually in any REST API client, such as Postman, by passing a 'Body' parameter named global_field and selecting the input type as 'File'. Then, select the JSON file of the global field that you wish to import.

Sample Response
Status|201 Created
12345678910111213141516171819202122232425262728293031323334353637383940414243
{
  "notice": "Global Field imported successfully.",
  "global_field": {
    "created_at": "2019-08-22T05:29:37.701Z",
    "updated_at": "2019-08-22T05:29:37.701Z",
    "title": "five",
    "uid": "five",
    "_version": 1,
    "inbuilt_class": false,
    "schema": [
      {
        "display_name": "Name",
        "uid": "name",
        "data_type": "text",
        "multiple": false,
        "mandatory": false,
        "unique": false,
        "non_localizable": false
      },
      {
        "display_name": "Add",
        "uid": "add",
        "data_type": "text",
        "multiple": false,
        "mandatory": false,
        "unique": false,
        "non_localizable": false
      },
      {
        "display_name": "std",
        "uid": "std",
        "data_type": "text",
        "multiple": false,
        "mandatory": false,
        "unique": false,
        "non_localizable": false
      }
    ],
    "last_activity": {},
    "maintain_revisions": true,
    "description": ""
  }
}

Export a global field

GEThttps://api.contentstack.io/v3/global_fields/{global_field_uid}/export

This request is used to export a specific global field and its schema. The data is exported in JSON format. The exported file won’t get downloaded automatically. To download the exported file, a REST API client, such as Postman can be used.
To configure the permissions for your application via OAuth, please include the cm.global-fields.management:write scope.

Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839
{
    "created_at": "2019-11-26T09:18:18.850Z",
    "updated_at": "2019-11-26T09:18:49.861Z",
    "title": "Servlet",
    "uid": "servlet",
    "_version": 1,
    "inbuilt_class": false,
    "schema": [
        {
            "display_name": "Name",
            "uid": "name",
            "data_type": "text",
            "multiple": false,
            "mandatory": false,
            "unique": false,
            "non_localizable": false
        },
        {
            "data_type": "text",
            "display_name": "Rich text editor",
            "uid": "description",
            "field_metadata": {
                "allow_rich_text": true,
                "description": "",
                "multiline": false,
                "rich_text_type": "advanced",
                "options": [],
                "version": 3
            },
            "multiple": false,
            "mandatory": false,
            "unique": false,
            "non_localizable": false
        }
    ],
    "last_activity": {},
    "maintain_revisions": true,
    "description": ""
}
Hide Parameters

Query Parameters

include_global_field_schemaoptionalstring

Set this parameter to 'true' to include in response the schema of the nested Global field.

Example:

true
include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

true
include_content_typesoptionalstring

Set this parameter to 'true' to include in response the details of the content types where the current Global field is referred.

Example:

ture
include_global_fieldsoptionalstring

Set this parameter to 'true' to include in response the details of Global fields where the current Global field is referred.

Example:

true
include_countoptionalstring

Set this parameter to 'true' to include in response the total count of Global fields available in a stack.

Example:

true
deletedoptionalstring

Set this parameter to 'true' to retrieve only deleted Global fields within a stack.

Example:

true

Headers

api_keyrequiredstring

Enter the API key of your stack.

Example:

your_api_key
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

global_field_uidrequiredstring

Enter the unique ID of the Global field of which you want to retrieve the details. The UID of a Global field is unique across a stack. Execute the 'Get all Global fields' request to retrieve the UID of a Global field.

Example:

category

Query Parameters

versionoptionalstring

Specify the version number of the specified Global field of which you want to retrieve details.

Example:

4
include_global_field_schemaoptionalstring

Set this parameter to 'true' to include in response the schema of the Global field.

Example:

true
include_global_fieldsoptionalstring

Set this parameter to 'true' to include in response the count of Global fields.

Example:

true
include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

true
include_content_typesoptionalstring

Set this parameter to 'true' to include in response the details of the content types.

Example:

true
deletedoptionalstring

Set this parameter to 'true' to retrieve only deleted Global fields within a stack.

Example:

false

Headers

api_keyrequiredstring

Enter the API key of your stack.

Example:

your_api_key
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

Headers

api_keyrequiredstring

Enter the API key of your stack.

Example:

your_api_key
authtokenoptionalstring

Enter your authtoken.

Example:

your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

global_field_uidrequiredstring

Enter the unique ID of the global field that you wish to update. The UID is generated based on the title of the global field. The unique ID of a global field is unique across a stack.

Example:

global_field_uid

Query Parameters

include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Example:

blt20962a819b57e233
authtokenoptionalstring

Enter your authtoken.

Example:

Your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

global_field_uidrequiredstring

Enter the unique ID of the global field that you wish to update. The UID is generated based on the title of the global field. The unique ID of a global field is unique across a stack.

Example:

global_field_uid

Query Parameters

forcerequiredstring

Set the force parameter to 'true' to delete the Global field.

Example:

true

Headers

api_keyrequiredstring

Example:

blt20962a819b57e233
authtokenoptionalstring

Enter your authtoken.

Example:

Your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

Query Parameters

include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Example:

blt20962a819b57e233
authtokenoptionalstring

Enter your authtoken.

Example:

Your_authtoken
authorizationrequiredstring

Example:

Your_management_token
Content-Typerequiredstring

Example:

multipart/form-data
branchoptionalstring

Enter your branch unique ID.

Example:

main
Hide Parameters

URL Parameters

global_field_uidrequiredstring

Enter the unique ID of the global field that you wish to update. The UID is generated based on the title of the global field. The unique ID of a global field is unique across a stack.

Example:

global_field_uid

Query Parameters

include_branchoptionalstring

Set this to 'true' to include the '_branch' top-level key in the response. This key states the unique ID of the branch where the concerned Contentstack module resides.

Example:

false

Headers

api_keyrequiredstring

Example:

blt20962a819b57e233
authtokenoptionalstring

Enter your authtoken.

Example:

Your_authtoken
authorizationrequiredstring

Enter your OAuth token or management token. Learn more about authentication

Example:

[Bearer <OAuth token>] or [your_management_token]
branchoptionalstring

Enter your branch unique ID.

Example:

main