Introducing Miniloop Agents: AI agents that connect to your appsRead more

How to Find Your Contentful API Token

Last updated April 1, 2026

To create and manage content in Contentful programmatically, you need a Content Management API (CMA) token. Here's how to get one.

Step 1: Find Your Space ID

Your Space ID is in your Contentful URL. When you're in your space, look at the address bar:

https://app.contentful.com/spaces/abc123xyz/home
                                   ↑
                              This is your Space ID

Copy this value.

Step 2: Create a CMA Token

The Content Management API (CMA) token is different from Delivery or Preview tokens.

  1. In Contentful, go to Settings (gear icon in the top right)
  2. Click CMA tokens in the sidebar
  3. Click Create personal access token
  4. Give it a name (e.g., "My Integration")
  5. Set an expiration date
  6. Click Generate

Important: Copy the token immediately. You won't be able to see it again. It starts with CFPAT-.

Step 3: Authorize the Token

This step is easy to miss but critical.

After generating your token, you'll see it listed in the CMA tokens table. Look for an Authorize button next to it and click it. This grants the token access to your space.

Without this step, you'll get an "Invalid access token" error.

What Can You Do with the Contentful API?

  • Create entries: Add new content programmatically
  • Update entries: Modify existing content
  • Publish content: Push content live
  • Manage assets: Upload and organize media files

Troubleshooting

"Invalid access token" error

  • Make sure you clicked Authorize after creating the token
  • Verify you're using a CMA token (starts with CFPAT-), not a Delivery or Preview token
  • Check the token hasn't expired

"Space or environment not found"

  • Double-check your Space ID from the URL
  • Verify the environment name (it's case-sensitive, usually master)

Automate Your Content Workflows

Once you have your API credentials, you can connect Contentful to Miniloop to automate content creation, blog publishing, and content management using natural language. Describe what content you need, and Miniloop handles the rest.

Frequently Asked Questions

What's the difference between CMA and CDA tokens?

CMA (Content Management API) tokens allow creating and editing content. CDA (Content Delivery API) tokens are read-only for fetching published content. You need a CMA token to create and update entries.

Can I use one token for multiple spaces?

Personal access tokens can access multiple spaces, but you need to authorize them for each space individually. Click the Authorize button next to your token for each space you want to use.

How do I revoke a token?

Go to Settings > CMA tokens in Contentful and delete the token. This immediately revokes access.

What permissions does a CMA token have?

The CMA token inherits your user permissions. Make sure your account has Editor-level access to the content types you want to manage programmatically.