> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Contentful Graphql

> The Contentful GraphQL Content API allows developers to query and deliver content using GraphQL, providing a flexible and efficient way to access content stored in Contentful.

![Contentful Graphql logo](https://mintcdn.com/composio-preview/NPf8agM6UrvZD-Iu/images/toolkits/contentful_graphql.svg?fit=max\&auto=format\&n=NPf8agM6UrvZD-Iu\&q=85\&s=f55c924f198d6c7371ff90a831a8987b)

* **Category:** developer tools
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 2
* **Triggers:** 0
* **Slug:** `CONTENTFUL_GRAPHQL`
* **Version:** 20261101\_00

## Tools

> [accordion] Get CMA Token
>
> **Slug:** `CONTENTFUL_GRAPHQL_GET_CMA_TOKEN`
>
> Return authorization and content-type headers for Contentful Management API calls. The returned credential is not verified for CMA access.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] GraphQL Content API Persisted Query
>
> **Slug:** `CONTENTFUL_GRAPHQL_GRAPH_QL_CONTENT_API_PERSISTED_QUERY`
>
> Execute a GraphQL query using Automatic Persisted Queries (APQ). APQ reduces bandwidth by sending only a SHA256 hash instead of the full query text after initial registration. Workflow: 1. First request: Include both sha256\_hash and query text to register the query 2. Subsequent requests: Send only sha256\_hash and variables - the server uses the cached query Common errors: - PersistedQueryNotFound: Query not cached; include the full query text - PersistedQueryMismatch: Hash doesn't match query text; recompute the hash - UNKNOWN\_SPACE: Invalid space\_id or access\_token for the space
>
> #### Input Parameters
>
> **query** `string`
>
> Full GraphQL query text. Include on first request to register the query; omit on subsequent requests to use cached version by hash only.
>
> **version** `integer`
>
> APQ protocol version. Must be 1.
>
> **space\_id** `string` *required*
>
> Contentful Space ID. Example: 'cfexampleapi' for the public demo space.
>
> **variables** `object`
>
> Variables for parameterized GraphQL queries. Example: \{"limit": 10}
>
> **sha256\_hash** `string` *required*
>
> SHA256 hash of the exact GraphQL query text (64 hex characters). Compute with: echo -n 'query text' | sha256sum. Uppercase is auto-converted to lowercase.
>
> **access\_token** `string`
>
> Content Delivery API (CDA) access token. Overrides the token in metadata if provided.
>
> **environment\_id** `string` *required*
>
> Contentful Environment ID. Use 'master' for the default environment.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
