> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contentful

> Connect Contentful to Iru Compliance with a Content Management API personal access token to collect spaces, content models, environments, and team membership.

### About Contentful

Iru reads **spaces**, **content models**, **environments**, and **membership** via the **Content Management API (CMA)** using a **Personal Access Token** (**PAT**) sent as **`Authorization: Bearer`**. Do **not** use **Content Delivery API (CDA)** preview tokens - they lack management scope.

### How It Works

```http theme={null}
Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN
```

| Detail             | Value                     |
| ------------------ | ------------------------- |
| **Category**       | Headless CMS              |
| **Authentication** | CMA personal access token |

Official references: [Authentication](https://www.contentful.com/developers/docs/references/authentication/), [Personal access tokens](https://www.contentful.com/help/token-management/personal-access-tokens/), [CMA reference](https://www.contentful.com/developers/docs/references/content-management-api/).

### Prerequisites

* Contentful user with access to the **spaces** you need for evidence.

### Connect Contentful to Iru

<Tabs>
  <Tab title="Contentful">
    <Note>
      Complete this tab before you connect the source in Compliance.
    </Note>

    <Steps>
      <Step title="Sign in to Contentful">
        Open the [Contentful web app](https://app.contentful.com) and sign in with a user who can access the **spaces** Iru should read.
      </Step>

      <Step title="Open Settings">
        Select **Settings** (gear or workspace settings, depending on your UI) for the organization or space that owns the token.
      </Step>

      <Step title="Open CMA tokens">
        Choose **CMA tokens** (Content Management API tokens) or the equivalent **Personal access tokens** screen.
      </Step>

      <Step title="Create a personal access token">
        Select **Create personal access token** (or **Generate token**). Enter a name such as **Iru Compliance**.
      </Step>

      <Step title="Set optional expiration">
        If Contentful offers **expiration**, set a date aligned with your key-rotation policy, or leave unset only if your security team allows non-expiring tokens.
      </Step>

      <Step title="Generate and copy the token">
        Generate the token and copy the value **once**. Store it securely; you will paste it into Iru as the **Bearer** token.
      </Step>
    </Steps>

    <Note>
      Continue on the [**Iru Compliance**](#iru-compliance) tab.
    </Note>
  </Tab>

  <Tab title="Iru Compliance">
    <Note>
      Finish the [**Contentful**](#contentful) tab first.
    </Note>

    <Steps>
      <Step title="Open Sources">
        In Iru Compliance, on the left navigation bar, expand **Compliance** and select **Sources**.

        <Frame>
          <img src="https://mintcdn.com/iru/7HsGH7lnQ8GpVmI0/assets/media/images/iru-navigation-compliance-sources.png?fit=max&auto=format&n=7HsGH7lnQ8GpVmI0&q=85&s=595982441fd777b333b3ecfea24adc24" alt="Left navigation: Compliance expanded, Sources selected" width="424" height="1056" data-path="assets/media/images/iru-navigation-compliance-sources.png" />
        </Frame>
      </Step>

      <Step title="Turn on Contentful">
        Find **Contentful** (use **Category** or **Search by name or description**). On that card, turn on the **toggle**. A browser tab or window may open for the connector wizard.
      </Step>

      <Step title="Paste the personal access token">
        Paste the PAT into the **Bearer** field.
      </Step>

      <Step title="Finish the connection">
        Click **Submit Bearer Token**. When the connection succeeds, the wizard shows **Connection Configured**.
      </Step>

      <Step title="Confirm the source is Active">
        Close the **Iru is requesting access to external services** browser tab, then return to **Compliance** → **Sources** and confirm the **Contentful** card is **Active**.
      </Step>
    </Steps>
  </Tab>
</Tabs>

### Troubleshooting

<AccordionGroup>
  <Accordion title="Nothing opens when you turn the source on">
    Check **pop-up blocker** settings for the Iru site and try again.
  </Accordion>

  <Accordion title="401 Unauthorized">
    PAT not CDA token; paste exact string.
  </Accordion>

  <Accordion title="Expired PAT">
    Rotate at **Settings** → **CMA tokens**, update Iru.
  </Accordion>

  <Accordion title="Missing spaces">
    PAT inherits user membership - grant space access first.
  </Accordion>
</AccordionGroup>

### Considerations

<CardGroup cols={2}>
  <Card title="Revoke leaked tokens immediately and recreate: PUT…" icon="circle-info">
    Revoke leaked tokens immediately and recreate - **PUT** revoke endpoint documented by Contentful for automation.
  </Card>
</CardGroup>

### Related Articles

<CardGroup cols={2}>
  <Card title="Sources Management" icon="plug" href="/en/compliance/sources-management">
    Browse and manage every Compliance source.
  </Card>

  <Card title="Getting Started With Compliance" icon="rocket" href="/en/compliance/getting-started-with-compliance">
    Frameworks, actions, and **Artifacts**.
  </Card>

  <Card title="Iru Overview" icon="layer-group" href="/en/iru/platform-overview/iru-overview">
    How Endpoint, Compliance, and Identity fit together.
  </Card>

  <Card title="Artifacts Management" icon="folder-open" href="/en/compliance/artifacts-management">
    Upload, review, and organize evidence from sources and actions.
  </Card>
</CardGroup>
