> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Get a content type

GET https://preview.contentful.com/spaces/{space_id}/environments/{environment_id}/content_types/{content_type_id}

Reference: https://contentful.com/developers/docs/references/content-preview-api/content-types/get-a-content-type

## Request

### Path parameters

- `space_id` (string, required) — ID of the space in form of a string
- `environment_id` (string, required) — ID of the environment in form of a string
- `content_type_id` (string, required) — ID of the content type in form of a string

### Query parameters

- `access_token` (string, required) — A *preview* Content Preview API key.

## Response

### 200

OK - Request successful

- `map from string to any`

## Examples

**Response**

```json
{
  "displayField": "productName",
  "fields": [
    {
      "id": "productName",
      "localized": false,
      "name": "Product name",
      "required": true,
      "type": "Text"
    },
    {
      "id": "slug",
      "localized": false,
      "name": "Slug",
      "required": false,
      "type": "Symbol"
    },
    {
      "id": "productDescription",
      "localized": false,
      "name": "Description",
      "required": false,
      "type": "Text"
    },
    {
      "id": "sizetypecolor",
      "localized": false,
      "name": "Size/Type/Color",
      "required": false,
      "type": "Symbol"
    },
    {
      "id": "image",
      "items": {
        "linkType": "Asset",
        "type": "Link"
      },
      "localized": false,
      "name": "Image",
      "required": false,
      "type": "Array"
    },
    {
      "id": "tags",
      "items": {
        "type": "Symbol"
      },
      "localized": false,
      "name": "Tags",
      "required": false,
      "type": "Array"
    },
    {
      "id": "categories",
      "items": {
        "linkContentType": "6XwpTaSiiI2Ak2Ww0oi6qa",
        "linkType": "Entry",
        "type": "Link",
        "validations": ""
      },
      "localized": false,
      "name": "Categories",
      "required": false,
      "type": "Array"
    },
    {
      "disabled": true,
      "id": "price",
      "localized": false,
      "name": "Price",
      "required": false,
      "type": "Number"
    },
    {
      "id": "brand",
      "linkType": "Entry",
      "localized": false,
      "name": "Brand",
      "required": false,
      "type": "Link"
    },
    {
      "id": "quantity",
      "localized": false,
      "name": "Quantity",
      "required": false,
      "type": "Integer"
    },
    {
      "id": "sku",
      "localized": false,
      "name": "SKU",
      "required": false,
      "type": "Symbol"
    },
    {
      "id": "website",
      "localized": false,
      "name": "Available at",
      "required": false,
      "type": "Symbol"
    }
  ],
  "name": "Product",
  "sys": {
    "createdAt": "2026-02-02T05:37:00.000Z",
    "id": "2PqfXUJwE8qSYKuM0U6w8M",
    "revision": 1,
    "space": {
      "sys": {
        "id": "yadj1kx9rmg0",
        "linkType": "Space",
        "type": "Link"
      }
    },
    "type": "ContentType",
    "updatedAt": "2026-02-02T05:37:00.000Z"
  }
}
```

**SDK Code**

```android Android
// Create the Contentful client.
final CDAClient client =
    CDAClient
        .builder()
        // Only difference to cda client creation.
        .preview()
        .setToken("<access_token>")
        .setSpace("<space_id>")
        .build();

client
    .observe(CDAContentType.class)
    .one("<content_type_id>")
    // Execute result handling on the `main thread`.
    .observeOn(AndroidSchedulers.mainThread())
    // Networking should happen on io thread.
    .subscribeOn(io.reactivex.schedulers.Schedulers.io())
    .subscribe(
        new DisposableSubscriber<CDAContentType>() {
          CDAContentType result;

          @Override public void onComplete() {
            // Do something with the result.
            new AlertDialog.Builder(context)
                .setTitle("Contentful")
                .setMessage("Content type: "
                    + (result == null ? "<null>" : result.toString()))
                .show();
          }

          @Override public void onError(Throwable e) {
            // Handle error case.
            new AlertDialog.Builder(context)
                .setTitle("Contentful")
                .setMessage("An error occurred: " + e.toString())
                .show();
          }

          @Override public void onNext(CDAContentType type) {
            // Array received, maybe more to come.
            result = type;
          }
        }
    );
```

```java Java
// Create the Contentful client.
final CDAClient client =
    CDAClient
        .builder()
        // Only difference to cda client creation.
        .preview()
        .setToken("<access_token>")
        .setSpace("<space_id>")
        .build();

final CDAArray all =
    client
        .fetch(CDAContentType.class)
        .all();
```

```kotlin Kotlin
// Create the Contentful client.
val client = CDAClient
        .builder()
        // Only difference to cda client creation.
        .preview()
        .setToken("<access_token>")
        .setSpace("<space_id>")
        .build()

val all = client
        .fetch(CDAContentType::class.java)
        .all()
```

```swift Swift
import Contentful

// Retain the client as a property on a type you define so that
// the client's asynchronous network callbacks are executed.
let client = Client(spaceId: "<space_id>",
                    environmentId: "<environment_id>", // Defaults to "master" if omitted
                    accessToken: "<access_token>",
                    host: Host.preview)


client.fetch(ContentType.self, id: "<content_type_id>") { (result: Result<ContentType>) in
  switch result {
  case .success(let contentType):
    print(contentType)
  case .error(let error):
    print(error)
  }
}
```

```javascript JavaScript
import { createClient } from 'contentful-management'

const client = createClient({
  space: '<space_id>',
  accessToken: '<content_preview_api_key>',
  host: 'preview.contentful.com'
})

client.getContentType('<content_type_id>')
.then((contentType) => console.log(contentType))
.catch(console.error)
```

```php PHP
// contentful.php 3.0

$client = new Contentful\Delivery\Client(
  '<content_preview_api_key>',
  '<space_id>',
  '<environment_id>', // Defaults to "master" if ommitted
  true
);

$contentType = $client->getContentType('<content_type_id>');
```

```ruby Ruby
require 'contentful'

client = Contentful::Client.new(
  space: '<space_id>',
  access_token: '<content_preview_api_key>',
  api_url: 'preview.contentful.com',  # Configure the client to connect to the Content Preview API.
  environment: 'master',  # Optional - defaults to 'master'.
  dynamic_entries: :auto  # Enable Content Type caching.
)

content_type = client.content_type('<content_type_id>')
```

```python Python
from contentful import Client

client = Client(
    '<space_id>',
    '<content_preview_api_key>',
    api_url='preview.contentful.com',  # Configure the client to connect to the Content Preview API.
    environment='master'  # Optional - it will default to 'master'
)

content_type = client.content_type('<content_type_id>')
```

```.net .NET
// This client should only be created once per application.
var httpClient = new HttpClient();

var client = new ContentfulClient(httpClient, "<content_delivery_api_key>", "<content_preview_api_key>", "<space_id>", true);

var contentType = await client.GetContentType("<content_type_id>");
```