> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/context/overview/integrations/contentful.md).

# Contentful

<figure><img src="/files/aOSo8Gf5Qz7pZj7FRFnI" alt=""><figcaption></figcaption></figure>

The Contentful Integration allows you to create, list, get, and update entries.

## Authentication

1. **Generate a Personal Access Token from Contentful:**
   * Log in to your Contentful account.
   * Navigate to settings, then click on "CMA Tokens."
   * Press the "Create Personal Access To" button.
   * Provide a descriptive name for the token to identify its usage easily.
   * After the token is generated, make sure to copy and securely store it immediately, as it will not be displayed again.
2. **Add the Personal Access Token to Your Workspace:**
   * Go to <https://app.airops.com/account/integrations>
   * Find the section for Contentful integration and click on the "Configure" button.
   * In the modal that appears, paste the copied Personal Access Token into the designated field.
   * Click "Add" to complete the setup.

**Security Note:** Treat your Personal Access Token like a password. It provides full access to your Contentful space, and it should not be shared. Store it securely and only use it in server-side or secure, authenticated environments.

## Functions and Their Parameters

#### Create Entry

1. **Space**: Select a Contentful space.
2. **Environment**: Select a Contentful environment
3. **Content Type**: Select a Contentful content type
4. **Locale (optional)**: Content locale. By default en-US

* After you select the Content Type, new fields will appear according to the option selected.

#### Create Entry (JSON)

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Content Type ID**
4. **JSON**: A JSON object containing the fields for your entry, example:

```
{
   "fields": {
      "title": {
         "en-US": "Hello, World!"
      },
      "body": {
         "en-US": "Is bacon healthy?"
      }
   }
}
```

#### List Entries

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Limit (optional)**: How many entries to fetch.
4. **Skip (optional)**: How many entries to skip first when collecting the response.

#### Get Entry

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Entry ID**: The ID or slug of the entry you want to retrieve
4. **Locale (optional)**: Content locale. By default en-US

#### Update Entry (JSON)

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Content Type ID**: The ID of the Content Type you are going to create.
4. **Entry ID**: The ID of the entry you want to update
5. **JSON**: A JSON object containing the fields to update, example:

```
{
   "title": {
      "en-US": "Hello, World!"
   },
   "body": {
      "en-US": "Bacon is healthy!"
   }
}
```

#### Upload Image

1. **Space ID**: The ID of your contentful space. e.g. yadj1kx9rmg0
2. **Environment**: The name of your environment. This is usually master
3. **Image Url**
4. **Title (optional)**
5. **Description (optional)**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.airops.com/context/overview/integrations/contentful.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
