Content items represent specific pieces of content based on a specific content type. By default, the API returns content items in the default language.
The content item with metadata and individual elements.
Retrieve a list of content items from the specified environment. By default, the API returns an unfiltered paginated list of content items in the default language, ordered alphabetically by codename. The response size is limited to 2000 items.The modular_content object property will contain both components and linked items in the API response. See Linked content and components for more details.If you need to export all content items, we recommend you enumerate content items.
A paginated list of content items matching the specified criteria.
Retrieve a content item by its codename.The response size is limited to 2000 items.
A single content item object.
Retrieve a dynamically paginated list of content items ordered alphabetically by codename.We recommend using this endpoint for scenarios such as:
Warming up your app's cache, that is getting all content into the cache after the app starts.
Exporting the content of your project's environment.
This endpoint, unlike the List content items endpoint, guarantees to enumerate all content items in the specified environment. The modular_content object property will contain only components used in rich text elements in the API response. See Linked content and components for more details.PagingIf the response comes with the X-Continuation header, it means that there are more pages to retrieve. To get the next page of results, send the X-Continuation header with your request as you received it.
A dynamically paginated feed of content items and components.
Returns a list of content items that contain references to a specific asset.What is a used asset?For a content item to be included in the Used in list of a specific asset, at least one of the following must occur:
References to unavailable assetsYou can use the endpoint even for assets that were deleted. For example, when you get a webhook notification about asset deletion, you can check whether the asset is still used anywhere in your published content.Filtering
Content items that reference the specified content item.
Returns a list of content items that contain references to a specific content item.What is a used content item?For an item to be included in the Used in list of a specific content item, at least one of the following must occur:
The content item links to itself within a rich text or linked items element.
References to unavailable itemsYou can use the endpoint even for content items that were archived or deleted. For example, when you get a webhook notification about content item unpublishing or deletion, you can check whether the content item is still used anywhere in your published content.
Content items that reference the specified content item.
. For example, if you're interested only in items referencing the specified asset within a specific collection, you can filter by the
system.collection
.
Localization
By default, the endpoint returns content items in the default language. If you want to check an asset's usage across multiple languages, you can specify the languages using the system.language parameter, for example system.language[in]=english,spanish.
If the response comes with the X-Continuation header, it means that there are more pages to retrieve. To get the next page of results, send the X-Continuation header with your request as you received it.
Filtering
You can filter the returned list of content items by the following content item system properties: type, collection, workflow, workflow_step, and language. For example, if you're interested only in items referencing the specified content item within a specific collection, you can filter by the system.collection.
Localization
By default, the endpoint returns content items in the default language. If you want to check an item's usage across multiple languages, you can specify the languages using the system.language parameter, for example system.language[in]=english,spanish.
If the response comes with the X-Continuation header, it means that there are more pages to retrieve. To get the next page of results, send the X-Continuation header with your request as you received it.
Determines which language variant of content items to return. By default, the API returns content in the default language.
Determines which content elements to retrieve. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
Retrieve a single element – elements=title
Retrieve multiple elements – elements=title,summary,related_articles
Usage notes
The filter applies to all content items within the response. That is both the items array and modular_content object property.
If the specified elements don't match the elements present in the content items, the API returns the content items without any elements.
The filter doesn't apply to
Determines which content elements to exclude. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
Exclude a single element – excludeElements=title
Exclude multiple elements – excludeElements=title,summary,related_articles
Usage notes
The filter applies to all content items within the response. That is both the items array and modular_content object property.
If the specified elements don't match the elements present in the content items, the API response returns all elements of the content items without any exclusion.
The filter doesn't apply to
Determines the order of the returned content items. By default, the content items are sorted alphabetically by their codenames from A to Z.To sort the items in a specific order, use the asc and desc modifiers in square brackets. For example, to sort by the value of the Title element in ascending order, use order=elements.title[asc], or to sort by content item codenames in descending order, use order=system.codename[desc].You can sort by any content item properties in the items array of the API response.Examples
Sort by the date of last modification from oldest to newest – order=system.last_modified[desc]
Sort by a content item name from A to Z –
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
Determines which language variant of content items to return. By default, the API returns content in the default language.
Determines which content elements to retrieve. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
Retrieve a single element – elements=title
Retrieve multiple elements – elements=title,summary,related_articles
Usage notes
The filter applies to all content items within the response. That is both the items array and modular_content object property.
If the specified elements don't match the elements present in the content items, the API returns the content items without any elements.
The filter doesn't apply to
Determines which content elements to exclude. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
Exclude a single element – excludeElements=title
Exclude multiple elements – excludeElements=title,summary,related_articles
Usage notes
The filter applies to all content items within the response. That is both the items array and modular_content object property.
If the specified elements don't match the elements present in the content items, the API response returns all elements of the content items without any exclusion.
The filter doesn't apply to
Determines the nesting level for linked content items that the API returns. By default, only the first level of linked items is returned, which is the same as setting depth=1.
To include more than one level of linked items in the response, set depth to 2 or more.
To exclude all linked items from the response, set depth to 0.
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
The content item with metadata and individual elements.
Determines which language variant of content items to return. By default, the API returns content in the default language.
Determines which content elements to retrieve. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
Retrieve a single element – elements=title
Retrieve multiple elements – elements=title,summary,related_articles
Usage notes
The filter applies to all content items within the response. That is both the items array and modular_content object property.
If the specified elements don't match the elements present in the content items, the API returns the content items without any elements.
The filter doesn't apply to
Determines which content elements to exclude. The elements are specified as a comma-separated list of element codenames. By default, all elements are retrieved.Examples
Exclude a single element – excludeElements=title
Exclude multiple elements – excludeElements=title,summary,related_articles
Usage notes
The filter applies to all content items within the response. That is both the items array and modular_content object property.
If the specified elements don't match the elements present in the content items, the API response returns all elements of the content items without any exclusion.
The filter doesn't apply to
Determines the order of the returned content items. By default, the content items are sorted alphabetically by their codenames from A to Z.To sort the items in a specific order, use the asc and desc modifiers in square brackets. For example, to sort by the value of the Title element in ascending order, use order=elements.title[asc], or to sort by content item codenames in descending order, use order=system.codename[desc].You can sort by any content item properties in the items array of the API response.Examples
Sort by the date of last modification from oldest to newest – order=system.last_modified[desc]
Sort by a content item name from A to Z –
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
Determines the next page of results to retrieve. By default, when the header is not set, the API returns the first page of results.If there are more items to enumerate, the response will come with the X-Continuation header. To get the next page of results, use the X-Continuation header from the response in your request.
Determines the next page of results to retrieve. By default, when the header is not set, the API returns the first page of results.If there are more items to enumerate, the response will come with the X-Continuation header. To get the next page of results, use the X-Continuation header from the response in your request.
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
The content items that reference the specified item.
The content item's internal ID.
The content item's collection codename. For projects without collections enabled, the value is default.
Determines the next page of results to retrieve. By default, when the header is not set, the API returns the first page of results.If there are more items to enumerate, the response will come with the X-Continuation header. To get the next page of results, use the X-Continuation header from the response in your request.
Determines whether the API waits while fetching latest content. By default, the header is not set and the API serves stale content (if cached by the CDN) while fetching the new content to minimize wait time.The header can be useful if you know that the requested content had changed since your last request in a reaction to a webhook notification.
The content items that reference the specified item.
The content item's internal ID.
The content item's collection codename. For projects without collections enabled, the value is default.
content components
. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
content components
. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
order=system.name[asc]
Sort by an element value from A to Z – order=elements.<element_codename>[asc]
content components
. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
content components
. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
content components
. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
content components
. For example, if you retrieve only rich text elements, you need complete components used in the rich text to construct the rich text content.
order=system.name[asc]
Sort by an element value from A to Z – order=elements.<element_codename>[asc]
Determines the nesting level for linked content items that the API returns. By default, only the first level of linked items is returned, which is the same as setting depth=1.
To include more than one level of linked items in the response, set depth to 2 or more.
To exclude all linked items from the response, set depth to 0.
Sets the number of objects to skip when requesting a list of objects. The skip parameter must be combined with the limit parameter to work. If skip is not specified, the API returns the first page of results.You can combine the limit and skip parameters to specify page size and page number. For example, using limit=10&skip=10 sets the page size to 10 and gets the second page of results.
Sets the number of objects to retrieve in a single request. If the limit parameter is not specified, the API returns all requested objects by default.If limit is lower than the total number of objects matching your query, the next_page property in the pagination object of the API response will contain a URL to the next page of results.The limit parameter affects only the number of items in the items property. It doesn't reduce the number of linked items in the modular_content property so you may hit the response size limit unexpectedly. You can set depth=0 to avoid that.
Adds the information about the total number of content items matching your query. Only the content filtering parameters affect the resulting number. Other parameters in your query, such as limit,skip, or order, don't have an effect on it.The number doesn't include linked items returned as part of the modular_content property. For the total number of items returned within the response, see the X-Request-Charge header.When set to true, the pagination object returned in the API response contains an additional total_count property.
The content item's codename. By default, generated from the item's display name.
The codename of the language that the content is in.For details on retrieving content in different languages, see Getting localized content.
The codename of the item's type.
ISO-8601 formatted date and time of the last change to user-content of the content item.
The codename of the content item's current workflow. By default, generated from the workflow's display name.This property is not present for components.
The codename of the content item's current workflow step. By default, generated from the workflow step's display name.This property is not present for components.
The content item's display name.
The content item's codename. By default, generated from the item's display name.
The codename of the language that the content is in.For details on retrieving content in different languages, see Getting localized content.
The codename of the item's type.
ISO-8601 formatted date and time of the last change to user-content of the content item.
The codename of the content item's current workflow. By default, generated from the workflow's display name.This property is not present for components.
The codename of the content item's current workflow step. By default, generated from the workflow step's display name.This property is not present for components.
Get only the items you needTo retrieve specific content items, use the filtering parameters in your requests. For example, you can request items tagged with a taxonomy term, items of a specific type, or items modified in the past three days.
Get only the items you needTo retrieve specific content items, use the filtering parameters in your requests. For example, you can request items tagged with a taxonomy term, items of a specific type, or items modified in the past three days.
If the requested content is not available in the specified language variant, the API follows the language fallbacks as configured in the Localization settings.
If the requested content is not available in the specified language variant, the API follows the language fallbacks as configured in the Localization settings.
If the requested content is not available in the specified language variant, the API follows the language fallbacks as configured in the Localization settings.
{ "item": { "system": { "id": "7b11fe14-6282-4daa-b901-e59e231cd93c", "name": "How to write error messages", "codename": "how_to_error_message", "language": "en-US", "type": "article", "collection": "default", "sitemap_locations": [], "last_modified": "2020-12-16T15:08:53.2391808Z", "workflow": "default", "workflow_step": "published" }, "elements": { "title": { "type": "text", "name": "Title", "value": "Writing good error messages" }, "body_copy": { "type": "rich_text", "name": "Body", "images": {}, "links": {}, "modular_content": [ "n78ee300e_7a58_0117_819e_529b2294067b" ], "value": "<p>The 3 most important things when writing error messages</p>\n<ol>\n <li>Don’t abuse alerts for upselling or showing superfluous information. People will stop reading the messages that are actually important.</li>\n <li>Don’t just assume people know about the context of a message. They might toggle between apps and see your message days after it happened. Always include enough information for users to make sense of it.</li>\n <li>Use a friendly, non-technical, non-threatening tone of voice.</li>\n</ol>\n<p><em><strong>TL;DR Write actionable error messages that laypeople can understand.*</strong></em></p>\n<p><em>*Not sure if they do? Show them to a non-technical person and ask them to explain it back to you.</em></p>\n<p><em>Read the full story on </em><a href=\"https://medium.com/@thomasfuchs/how-to-write-an-error-message-883718173322\" data-new-window=\"true\" title=\"How to write a great error message\" target=\"_blank\" rel=\"noopener noreferrer\"><em>Medium</em></a><em>.</em></p>\n<object type=\"application/kenticocloud\" data-type=\"item\" data-rel=\"component\" data-codename=\"n78ee300e_7a58_0117_819e_529b2294067b\"></object>" }, "author": { "type": "modular_content", "name": "Author", "value": [ "jenny_brown" ] }, "url": { "type": "url_slug", "name": "URL pattern", "value": "writing-good-error-messages" } } }, "modular_content": { "jenny_brown": { "system": { "id": "59838cfd-ba15-4607-8e6a-d91931fc7ce6", "name": "Jenny Brown", "codename": "jenny_brown", "language": "en-US", "type": "author", "sitemap_locations": [], "last_modified": "2020-02-05T11:33:54.5271987Z", "collection": "default", "workflow": "default", "workflow_step": "published" }, "elements": { "name": { "type": "text", "name": "Name", "value": "Jenny Brown" }, "bio": { "type": "rich_text", "name": "Bio", "images": {}, "links": {}, "modular_content": [], "value": "<p>Jenny is here for all things wildlife and, newly, climate changes.</p>" } } }, "n78ee300e_7a58_0117_819e_529b2294067b": { "system": { "id": "78ee300e-7a58-0117-819e-529b2294067b", "name": "78ee300e-7a58-0117-819e-529b2294067b", "codename": "n78ee300e_7a58_0117_819e_529b2294067b", "language": "en-US", "type": "blockquote", "collection": "default", "sitemap_locations": [], "last_modified": "2020-12-16T15:08:53.2391808Z" }, "elements": { "quote": { "type": "text", "name": "Quote", "value": "Don't quote me on this." }, "source": { "type": "text", "name": "Source", "value": "Jeff Loomis" } } } }}
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { createDeliveryClient } from '@kontent-ai/delivery-sdk';const deliveryClient = createDeliveryClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID',});// Gets a feed of all articles in the projectconst response = await deliveryClient .itemsFeed() .type('article') .toAllPromise();
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { createDeliveryClient } from '@kontent-ai/delivery-sdk';const deliveryClient = createDeliveryClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID',});// Gets feed of all strongly typed parent content items of type article for asset 'my_asset'const response = await deliveryClient .assetUsedIn('my_asset') .type('article') .toAllPromise();
TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { createDeliveryClient } from '@kontent-ai/delivery-sdk';const deliveryClient = createDeliveryClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID',});// Gets feed of all strongly typed parent content items of type article for item 'my_article'const response = await deliveryClient .itemUsedIn('my_article') .type('article') .toAllPromise();
TypeScript
C#
Java
PHP
Ruby
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { createDeliveryClient } from '@kontent-ai/delivery-sdk';import { Article } from './models/Article';const deliveryClient = createDeliveryClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID',});const response = await deliveryClient .items<Article>() .type('article') .limitParameter(3) .toPromise();
TypeScript
C#
Java
PHP
Ruby
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascriptimport { createDeliveryClient, IContentItem, Elements,} from '@kontent-ai/delivery-sdk';const deliveryClient = createDeliveryClient({ environmentId: 'KONTENT_AI_ENVIRONMENT_ID',});export type Article = IContentItem<{ title: Elements.TextElement; summary: Elements.RichTextElement; post_date: Elements.DateTimeElement; teaser_image: Elements.AssetsElement; related_articles: Article[];}>;// Tip: Create strongly typed models according to https://kontent.ai/learn/strongly-typed-modelsconst response = await deliveryClient.item<Article>('my_article').toPromise();