---
title: "ContentType"
description: "ContentType"
url: "https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/ios/reference/contenttype"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-21"
---

# ContentType

## ContentType

ContentType provides Entry and Query instance.

## setHeader:forKey:

Set a header for Stack.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" <span>environmentName:@"ENVIRONMENT"];
ContentType * contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
[contentType setHeader:@"MyValue" forKey:@"My-Custom-Header"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
let contentType = stack.contentTypeWithName("CONTENT_TYPE_UID")
contentType.setHeader("MyValue", forKey: "My-Custom-Header")
```

The header value

The header key

## addHeadersWithDictionary:

Set a header for Stack ContentType

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType * contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
[stack addHeadersWithDictionary:@{@"My-Custom-Header": @"MyValue"}];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
let contentType = stack.contentTypeWithName("CONTENT_TYPE_UID")
contentType.addHeadersWithDictionary(["My-Custom-Header":"MyValue"])
```

The headers as dictionary which needs to be added to the application.

## removeHeaderForKey:

Removes a header from this Stack.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" <span>environmentName:@"ENVIRONMENT"];
ContentType * contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
[contentType removeHeaderForKey:@"key"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
let contentType = stack.contentTypeWithName("CONTENT_TYPE_UID")
contentType.removeHeaderForKey("key")
```

The header key that needs to be removed.

## entryWithUID:

Gets the new instance of Entry object with specified UID.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];

ContentType * contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry *entryObj = [contentType entryWithUID:@"ENTRY_UID"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let contentType = stack.contentTypeWithName("CONTENT_TYPE_UID")
let entryObj:Entry = contentType.entryWithUID("ENTRY_UID")
```

Uid of the Entry object to fetch.

## query

Represents a Query on ‘ContentType’ which can be executed to retrieve entries that pass the query condition

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];

ContentType * contentType = [stack contentTypeWithName:@"<content_type_id>"]
Query *queryObj = [contentTypeObj query];
Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
let contentType = stack.contentTypeWithName("<content_type_id>")
var queryObj:Query = contentTypeObj.query()
```

## fetch:completion:

Gets ContentType Schema definition.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" <span>environmentName:@"ENVIRONMENT"];

ContentType * contentType = [stack contentTypeWithName:@"<content_type_id>"];
[contentType fetch:params completion:^(NSDictionary * _Nullable contentType, NSError * _Nullable error)  

}];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let contentType = stack.contentTypeWithName("<content_type_id>")
contentType.fetch(params, { (contentType, error) in
})
```

Fetch query parameters

Block to be called once operation is done.

## ContentType | iOS Delivery SDK | Contentstack

ContentType provides Entry and Query instances so you can access content of a content type in the Contentstack iOS Delivery SDK.