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

# Contentful

> Connect Contentful to your Atako agents — 8 read and 5 write actions.

Let your agents read and write the content of one Contentful space — browse content types, search entries and assets, then create, update, publish, unpublish or archive entries.

## Connection

* **Authentication**: API key (Personal content management token).
* **Required settings**:
  * **Space ID** — Contentful → Settings → General settings → Space ID (12 lowercase letters and digits)
  * **Environment ID** — Contentful → Settings → Environments. Use master unless your agents must target a sandbox environment.

<Note>
  Sign in at app.contentful.com → Settings → API keys → Content management tokens → Generate personal token. Name it and copy the token (starts with CFPAT-). A personal token carries all the rights of your own Contentful account, so connect it from an account whose space roles are limited to what your agents need.

  See [Contentful's documentation](https://www.contentful.com/developers/docs/references/content-management-api/).
</Note>

## Read actions (8)

| Action               | Description                                                                                                                                                                                                                                                                                                                         |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get_asset`          | Retrieve one asset by id, with its localized title, description and file (url, content type, size).                                                                                                                                                                                                                                 |
| `get_content_type`   | Retrieve one content type by id, with the full definition of its fields (ids, types, required, localized).                                                                                                                                                                                                                          |
| `get_entry`          | Retrieve one entry by id, with its localized fields and its sys block (sys.version is what update\_entry / publish\_entry need).                                                                                                                                                                                                    |
| `list_assets`        | List assets (media). Optional: query (full-text search), mimetype\_group (image, video, audio, pdfdocument, archive, plaintext, richtext, presentation, spreadsheet, markup, code, attachment), filters (object of extra search keys → values), order, limit (1-1000), skip.                                                        |
| `list_content_types` | List the content types (models) of the connected space/environment — start here to learn the content type ids and field names the other actions need.                                                                                                                                                                               |
| `list_entries`       | Search entries. Optional: content\_type (content type id), query (full-text search), filters (object of extra search keys → values, e.g. \{"fields.slug":"hello","sys.id\[ne]":"abc"} — a fields.\* key only works together with content\_type), order (e.g. -sys.updatedAt), select (comma-separated paths), limit (1-1000), skip. |
| `list_locales`       | List the locales of the environment — their codes (en-US, fr-FR…) are the keys every localized field of an entry is written under.                                                                                                                                                                                                  |
| `list_tags`          | List the tags of the environment — their ids are what create\_entry and update\_entry accept in tagIds.                                                                                                                                                                                                                             |

## Write actions (5)

| Action            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `archive_entry`   | Archive an entry so it no longer appears in the content list (it must already be unpublished). Argument: entryId (string). No body, no version.                                                                                                                                                                                                                                                                                                                                         |
| `create_entry`    | Create a draft entry (not published — call publish\_entry next). Arguments: contentTypeId (string, a content type id from list\_content\_types, sent as the X-Contentful-Content-Type header); fields (object, ALWAYS localized — field id → locale code → value, e.g. \{"title":\{"en-US":"Hello"},"tags":\{"en-US":\["a","b"]}}; a link field takes \{"en-US":\{"sys":\{"type":"Link","linkType":"Entry","id":"\<id>"}}}); tagIds (optional array of tag id strings from list\_tags). |
| `publish_entry`   | Publish an entry (makes its current draft live). Arguments: entryId (string); version (bare integer, the entry's current sys.version from get\_entry, sent as the X-Contentful-Version header — a stale value is rejected with 409). No body.                                                                                                                                                                                                                                           |
| `unpublish_entry` | Unpublish an entry — it goes back to draft, nothing is deleted. Argument: entryId (string). No version needed.                                                                                                                                                                                                                                                                                                                                                                          |
| `update_entry`    | Replace the fields of an entry (this is a full PUT — read it with get\_entry first and resend every field you want to keep). Arguments: entryId (string); version (bare integer, the entry's current sys.version from get\_entry, sent as the X-Contentful-Version header — a stale value is rejected with 409); fields (object, same localized shape as create\_entry: field id → locale code → value); tagIds (optional array of tag id strings, replaces the entry's tags).          |

## Permissions

Every action above must be explicitly granted to an agent before it can be used. See [Permissions](/integrations/permissions) for the grant model and [Security](/integrations/security) for how credentials are protected.
