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

# Content Types

> Query content type schemas

## List Content Types

Fetch a paginated list of content types with optional search.

```graphql theme={null}
query GetContentTypes($search: String, $cursor: String, $limit: Int) {
  contentTypes(search: $search, cursor: $cursor, limit: $limit) {
    data {
      id
      name
      description
      packageVersion
    }
    pagination {
      cursor
      hasMore
      limit
    }
  }
}
```

### Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `search` | String | - | Filter by name |
| `cursor` | String | null | Cursor for pagination |
| `limit` | Int | 20 | Items per page |

### Example

```graphql theme={null}
query {
  contentTypes(search: "Article", limit: 10) {
    data {
      id
      name
      description
      packageVersion
    }
    pagination {
      cursor
      hasMore
    }
  }
}
```

Response:

```json theme={null}
{
  "data": {
    "contentTypes": {
      "data": [
        {
          "id": "ct123",
          "name": "Article",
          "description": "Blog articles and news posts",
          "packageVersion": "2.0.0"
        },
        {
          "id": "ct124",
          "name": "ArticleSummary",
          "description": "Compact article display",
          "packageVersion": "2.0.0"
        }
      ],
      "pagination": {
        "cursor": null,
        "hasMore": false
      }
    }
  }
}
```

## Get Single Content Type

Fetch a specific content type by ID.

```graphql theme={null}
query GetContentType($id: ID!) {
  contentType(id: $id) {
    id
    name
    description
    packageVersion
    schema
    createdAt
    updatedAt
  }
}
```

### Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | ID! | Yes | Content type ID |

### Example

```graphql theme={null}
query {
  contentType(id: "ct123") {
    id
    name
    description
    packageVersion
    schema
  }
}
```

Response:

```json theme={null}
{
  "data": {
    "contentType": {
      "id": "ct123",
      "name": "Article",
      "description": "Blog articles and news posts",
      "packageVersion": "2.0.0",
      "schema": "{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"},\"body\":{\"type\":\"string\"},\"author\":{\"type\":\"string\"}}}"
    }
  }
}
```

## Content Type Fields

| Field | Type | Description |
| - | - | - |
| `id` | ID! | Unique identifier |
| `name` | String! | Content type name |
| `description` | String! | Description |
| `packageVersion` | String! | Bound package version |
| `schema` | String! | JSON Schema defining content structure |
| `createdAt` | DateTime! | Creation timestamp |
| `updatedAt` | DateTime! | Last update timestamp |

## Schema Structure

The `schema` field contains a JSON Schema that defines the content structure:

```json theme={null}
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Article title"
    },
    "body": {
      "type": "string",
      "description": "Article body content"
    },
    "author": {
      "type": "string",
      "description": "Author name"
    },
    "publishDate": {
      "type": "string",
      "format": "date-time"
    },
    "tags": {
      "type": "array",
      "items": { "type": "string" }
    }
  },
  "required": ["title", "body"]
}
```

Content items of this type must conform to this schema.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.