# Content Models

> Source: https://agilitycms.com/docs/developers/content-models

## What is a Content Model and what are the Features and Benefits?

Content Models are the most important aspect of our Content First approach and allow you to make reusable, flexible, and easy to manage content within Agility, enabling Editors to make updates and publish content with ease, across all your digital products. 

Simply put, a Content Model allows you to define the structure and needs of a piece of content, which you can then re-use anywhere.

**Features and Benefits **

- Customize content models directly in Agility using our visual builder 
- Easily edit content models, evolving them over time with quick and easy updates 
- Optimize the experience of your Editors by grouping fields together, setting required fields, and much more
- Future-proof your content with defined structure that’s decoupled from your presentation layer 
- The flexibility of a content model that can be re-used for various types of content 

## Creating a Content Model

To create a new Content Model


1. Navigate to the **Models** section in your Agility Instance and click **Content Models**


![](https://cdn.aglty.io/agility-cms-docs/images/block-editor/Refresh%20-%20Content%20Models-03012024152446.png)

2. Click the **New Content Model** button located at the top of your screen 

![](https://cdn.aglty.io/agility-cms-docs/images/block-editor/Refresh%20-%20Content%20Model%20Name-03012024152525.png)

3. **Choose a Name **and click **Add Model**


4. You should now see a blank screen with some Field options on the right-hand side that you can use to create your Content Model 

![](https://cdn.aglty.io/agility-cms-docs/images/block-editor/Refresh%20-%20Content%20Model%20Title%20Field-03012024152557.png)

## Creating a Content List

Now that you have your Content Model, you can create a content list based on it. You can do this from the Content section or from the model itself.

### From the Content section

1. Go to **Content** and click the **+** button next to the locale picker at the top of the left panel (its tooltip reads **Add Container**).

2. In **Content Model**, choose the model to use. If your instance has more than 10 models, open the list and type to search.

3. Enter a **Container Name**.

4. Optionally, choose a **Group** to file it under, or tick **Restrict to a single content item** if you need only one item rather than a list.

5. Click **Create Container**. Agility opens your new Content List or Single Content Item so you can start adding content.

### From the model

1. Open the model in **Models** > **Content Models**, click **Usage** on the right-hand side and then **Add**.

![](https://cdn.aglty.io/agility-cms-docs/images/block-editor/Refresh%20-%20Content%20Model%20Add%20Container-03012024152653.png)

2. Enter a **Container Name**, optionally choose a **Group**, or tick **Restrict to a single content item**, then click **Create Container**.

3. You'll now see your new Content List or Single Content Item in the Content section, ready for content.

**Note:** Creating content lists requires **Manage**, **Develop** or **Full Control** permission. Users without one of these don't see the **+** button in the Content section.

## Access your Content using the Content Fetch API

Once you've created a new **Content Model**, 
created a new **Content List** and populated it with some content, we are ready to 
request the content from the API.

When 
using the Content Fetch API, you can make a direct HTTP request to the 
REST service or use an SDK in your favorite programming language to 
simplify making requests.

**Step One:** You 
need to know what the **Reference Name** for your list is, which is the 
required parameter in order to retrieve all content items in a list. 

****
 It's important to note that ALL reference names MUST be lowercase when
 using the REST API. If you don't know your Reference Name, you can 
retrieve this in Agility by navigating to Content, selecting a List, clicking the Properties tab and noting the Reference Name property.*

![](https://cdn.aglty.io/agility-cms-docs/images/block-editor/Refresh%20-%20Container%20Ref%20Name-03012024152816.png)

**Step Two: **In this example, we'll use a simple curl command to illustrate how to access the content we just created.

```
curl https://api.glty.io/046a1a87/fetch/en-us/list/myfirstlist 
 --header "APIKey: defaultlive.2b7f3a91559d794bedb688358be5e13af2b1e3ae8cd39e8ed2433bbef5d8d6ac"
```

**Step Three: **The response returned from the API is shown below.

```
{
  "items": [
    {
      "contentID": 25,
      "properties": {
        "state": 2,
        "modified": "2019-08-14T13:07:25.99",
        "versionID": 142,
        "referenceName": "myfirstlist",
        "definitionName": "myFirstModel",
        "itemOrder": 0
      },
      "fields": {
        "title": "myFirstTitle"
      },
      "seo": null
    }
  ],
  "totalCount": 1
}
```

**Further Reading**


The following guides will help you if this is your first time building a Content Model 

- [Using Fields](https://agilitycms.com/docs/developers/fields)

---

## Related pages

- [Content-first Approach](https://agilitycms.com/docs/developers/content-first.md)
- [Component Models ](https://agilitycms.com/docs/developers/component-models.md)
- [Fields](https://agilitycms.com/docs/developers/fields.md)
- [Nest, Link or Share? Choosing Linked Content Field Types](https://agilitycms.com/docs/developers/linked-content-field-types.md)
- [Getting Started with Linked Content](https://agilitycms.com/docs/developers/getting-started-with-linked-content.md)
- [Sitemaps](https://agilitycms.com/docs/developers/sitemaps.md)
- [Page Models](https://agilitycms.com/docs/developers/page-models.md)
- [Setting Up Preview](https://agilitycms.com/docs/developers/setting-up-preview.md)
- [Handling Agility URLs](https://agilitycms.com/docs/developers/handling-agility-urls.md)
- [Deployment & Code Repositories](https://agilitycms.com/docs/developers/deployment-code-repositories.md)
- [Tagging Content in Agility](https://agilitycms.com/docs/developers/tagging-content-in-agility.md)
- [Managing SEO for Developers](https://agilitycms.com/docs/developers/manging-seo-for-developers.md)
- [Mastering Nested Linked Content in Agility CMS: Enhance Hierarchical Data Management](https://agilitycms.com/docs/developers/nested-linked-content.md)
- [Advanced Field Validation with Regular Expressions](https://agilitycms.com/docs/developers/advanced-field-validation-with-regular-expressions.md)
- [Dynamic Content Control: Implementing Hide/When Formulas in Your Headless CMS Content Model](https://agilitycms.com/docs/developers/dynamic-content-control-implementing-hide-when-formulas-in-your-headless-cms-content-model.md)
- [Grouping Components into Tabs, Accordions, and Sections](https://agilitycms.com/docs/developers/grouping-components-into-tabs.md)
- [Conditional & Cross-Field Validation](https://agilitycms.com/docs/developers/conditional-and-cross-field-validation.md)
- [Set Up Web Studio with Any Framework](https://agilitycms.com/docs/developers/web-studio-setup-any-framework.md)
- [Troubleshooting Web Studio](https://agilitycms.com/docs/developers/troubleshooting-web-studio.md)
- [Content Modeling Anti-Patterns](https://agilitycms.com/docs/developers/content-modeling-anti-patterns.md)
- [Designing a Taxonomy That Scales](https://agilitycms.com/docs/developers/designing-a-taxonomy.md)
- [Map Your Design System to Component Models](https://agilitycms.com/docs/developers/design-system-to-component-models.md)
- [Structured Content Explained](https://agilitycms.com/docs/developers/structured-content-explained.md)
- [Beyond the Website: Apps, Kiosks, Email and In-App](https://agilitycms.com/docs/developers/beyond-the-website.md)
- [Make Your Content Model Agent-Friendly](https://agilitycms.com/docs/developers/agent-friendly-content-models.md)
- [Component Visibility](https://agilitycms.com/docs/developers/component-visibility.md)

Index of every docs page: https://agilitycms.com/docs/llms.txt
