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

# Entry

## Entry

An initializer is responsible for creating Entry object.

## setHeader:forKey:

Set a header for Entry

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

The header value

The header key

## addHeadersWithDictionary:

Set a header for Entry

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

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

## removeHeaderForKey:

Removes a header from this Entry.

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

The header key that needs to be removed.

## configureWithDictionary:

Configure user properties with built object info.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry configureWithDictionary:@{@"key_name":@"MyValue"}];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
var hashKey:Bool = entry.hasKey("key")
entry.configureWithDictionary(["key_name":"MyValue"])
```

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

## hasKey:

Checks whether an entry has a given property.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
BOOL hashKey = [entry hasKey:@"key"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
var hashKey:Bool = entry.hasKey("key")
```

The property to be checked

## assetForKey:

Get the info of the specified key of Asset object and returns instance of Assets.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
Asset *asset = [entry assetForKey:@"asset"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
let asset = entry.assetForKey("asset")
```

Key containing the reference value of Asset

## assetsForKey:

Get the array containing instance of Assets mentioned in key specified.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
NSArray *assetArray = [entry assetsForKey:@"asset"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
let assetArray = entry.assetsForKey("asset")
```

Key containing the colection reference value of Assets.

## groupForKey:

Get the info of the specified key of Group object and returns instance of Group.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
Group *detailsGroup = [entry groupForKey:@"details"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
let detailsGroup = entry.groupForKey("details")
```

Key containing the value of Group

## groupsForKey:

Get the info of the specified key of content type and returns array of Group.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry groupsForKey:@"addresses"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.groupsForKey("addresses")
```

Key containing the value of Group array

## HTMLStringForMarkdownKey:

Converts Markdown to String of HTML String for specified key

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry HTMLStringForMarkdownKey:@"multiple_markdown"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.HTMLStringForMarkdownKey("Multiple_markdown")
```

Key is Multiple Markdown Parameter

## HTMLArrayForMarkdownKey:

Converts Markdown to Array of HTML String for specified key.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry HTMLArrayForMarkdownKey:@"multiple_markdown"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.HTMLArrayForMarkdownKey("Multiple_markdown")
```

Key is Multiple Markdown Parameter

## includeSchema

This method also includes the schema for the entries returned in the response.

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

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeSchema()
```

## includeContentType

This method also includes the contenttype for the entries returned in the response.

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

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeContentType()
```

## includeFallback

Retrieve the published content of the fallback locale entry if the entry is not localized in specified locale.

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

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeFallback()
```

## includeBranch

Retrieve the branch for the published content.

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

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeBranch()
```

## includeReferenceContentTypeUid

This method also includes the content type UIDs of the referenced entries returned in the response.

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

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeReferenceContentTypeUid()
```

## includeEmbeddedItems

Include Embedded Objects (Entries and Assets) along with entry/entries details.

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

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeEmbeddedItems()
```

## includeOnlyFields:

Specifies an array of ‘only’ keys in BASE object that would be included in the response.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry includeOnlyFields:@["name"]];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeOnlyFields(["name"])
```

Array of the ‘only’ keys to be included in response.

## includeAllFieldsExcept:

Specifies an array of keys in reference class object that would be ‘excluded’ from the response.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry includeAllFieldsExcept:@["name"]];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeAllFieldsExcept(["name"])
```

Array of keys to be excluded from the response.

## includeRefFieldWithKey:

Include reference objects with given key in response.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry includeRefFieldWithKey:@[@"detail"]];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeRefFieldWithKey(["detail"])
```

Array of reference keys to include in response.

## includeRefFieldWithKey:andOnlyRefValuesWithKeys:

Specifies an array of ‘only’ keys in reference class object that would be included in the response.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack  contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry* entry = [contentType  entryWithUID:@"ENTRY_UID"];
[entry includeRefFieldWithKey:@[@"detail"] andOnlyRefValuesWithKeys:@[@"description"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
var entry: Entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeRefFieldWithKey(["detail"], andOnlyRefValuesWithKeys:["description"])
```

Key who has reference to some other class object.

Array of the ‘only’ reference keys to be included in response.

## includeRefFieldWithKey:excludingRefValuesWithKeys:

Specifies an array of keys in reference class object that would be ‘excluded’ from the response.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry* entry = [stack includeRefFieldWithKey:@[@"detail"] excludingRefValuesWithKeys:@[@"description"];
[entry addParamKey:@"key" andValue:@"value"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
var entry: Entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.includeRefFieldWithKey(["detail"], excludingRefValuesWithKeys:["description"])
```

Key who has reference to some other class object.

Array of the ‘only’ reference keys to be ‘excluded’ from the response.

## addParamKey:andValue:

This method adds key and value to an Entry.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry* entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry addParamKey:@"key" andValue:@"value"];Swift
let stack:Stack = Contentstack.stackWithAPIKey("API_KEY",accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
var entry: Entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.addParamKey("key", andValue:"value")
```

The key as string which needs to be added to an Entry

The value as string which needs to be added to an Entry

## fetch:

Fetches an entry asynchronously provided entry UID.

```
Obj-C
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
ContentType *contentType = [stack contentTypeWithName:@"CONTENT_TYPE_UID"];
Entry * entry = [contentType entryWithUID:@"ENTRY_UID"];
[entry fetch:^(ResponseType type, NSError *error) 

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

let entry = stack.contentTypeWithName("CONTENT_TYPE_UID").entryWithUID("ENTRY_UID")
entry.fetch({ (responseType, error!) ->  in

})
```

Block to be called once operation is done.

## Variants

The variants method retrieves details of a specific entry variant or an array of entry variants based on the applied query.

```
Example 1:
#import <Contentstack/Contentstack.h>;

Stack* stack = [Contentstack stackWithAPIKey:<api_key> accessToken:<delivery_token> environmentName:<env_name>];

ContentType* ct = [stack contentTypeWithName:<ct_uid>];
Entry* entry = [ct entryWithUid:<entry_uid>];
[entry variantUid:<variant_uid/variant-alias>];

[entry fetch:^(ResponseType type, NSError *error) {
  if(error) {
    // catch error
  } else {
    // get response
  }
}];
Example 2:
#import <Contentstack/Contentstack.h>;

Stack* stack = [Contentstack stackWithAPIKey:<api_key> accessToken:<delivery_token> environmentName:<env_name>];

ContentType* ct = [stack contentTypeWithName:<ct_uid>];
Entry* entry = [ct entryWithUid:<entry_uid>];
[entry variantUids/variantAliases:[@"variantUid1/variantAlias1", @"variantUid2/variantAlias2",@"variantUid3/variantAlias3"]];

[entry fetch:^(ResponseType type, NSError *error) {
  if(error) {
    // catch error
  } else {
    // get response
  }
}];
```

Enter the UID of the variant

Readonly property to check value of entry’s uid

Readonly property to check if entry is deleted.

Readonly property to check tags of entry

Readonly property to check ContentType name of entry

Readonly property to check title of entry.

Readonly property to check url of entry.

Readonly property to check Language of entry

Readonly property to check createAt of entry

Readonly property to check createdBy of entry

Readonly property to check updatedAt of entry

Readonly property to check updatedBy of entry

Readonly property to check deletedAt of entry

Readonly property to check deletedBy of entry

The property to assign cache policy like CACHE\_THEN\_NETWORK, NETWORK\_ELSE\_CACHE, NETWORK\_ONLY, etc.

Readonly property to get data of entry.

## Entry | iOS Delivery SDK | Contentstack

Entry creates an object to retrieve a single piece of content created from a content type in the Contentstack iOS Delivery SDK.