Suggest Edits

Introduction

 

The Kentico Cloud APIs are built around the REST principle and return content in JSON. We provide example requests in Curl and .NET, and example responses in JSON for all endpoints.

API overview

API name API resource Use case
Delivery API https://deliver.kenticocloud.com/<YOUR_PROJECT_ID>/
https://preview-deliver.kenticocloud.com/<YOUR_PROJECT_ID>/
Deliver content from Kentico Cloud to your web applications and mobile applications. Learn more.
Personalization API https://engage-api.kenticocloud.com/v1/visitor/<VISITOR_UID>/ Optimize visitors' experience when visiting your website. Learn more.
Migration API https://api.kenticocloud.com/draft/ Migrate content and content models from Kentico Cloud to a platform of your choice. Learn more.

Trying out the endpoints

For each endpoint, you can use the Try it button to see what it returns in real time.

Try any of the API endpoints in this reference.

Try any of the API endpoints in this reference.

Suggest Edits

Authentication

How and when to authenticate your requests.

 

Authenticate requests to the Kentico Cloud APIs by using API keys. An API key (which comes in the form of a verified JSON Web Token) provides read-only access to a single project. You can find the API keys for your project in the API keys section in the Kentico Cloud app.

To retrieve content from a Kentico Cloud API, you need to authenticate via bearer auth using the Authorization header in the following format:

Authorization: Bearer <YOUR_API_KEY>

Note that all API requests must be made over HTTPS.

curl --request GET \
  --url https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/segments \
  --header 'Authorization: Bearer YOUR_API_KEY'

Make sure to use appropriate key for each API. For example, if you want to preview unpublished content from your project via the Delivery API, you need to use the Delivery Preview API key in your request.

Which APIs need authenticaton?

You need to authenticate your requests when calling the following APIs:

  • Delivery Preview API
  • Personalization API
  • Migration API

Calls with missing or incorrect Authorization header will fail with an error.

Note: You don't need to authorize requests when retrieving published content from your projects via the production Delivery API endpoints.

Suggest Edits

Error responses

Status codes and error responses you can encounter when using the API.

 

Kentico Cloud returns standard HTTP status codes to indicate success or failure of a request. In general, codes in the 2xx range indicate a successful request, codes in the 4xx range indicate errors caused by an incorrect input (for example, providing incorrect API key), and codes in the 5xx range indicate an error on our side.

HTTP error code summary

Status Description
400
Bad Request
The request was not understood. Check for a missing required parameter, or an invalid parameter value.
401
Unauthorized
The provided API key is invalid or missing. See Authentication.
403
Forbidden
The provided API key is invalid for the requested project.
404
Not Found
The requested resource doesn't exist. Try checking the resource name for typos.
405
Method Not Allowed
The requested HTTP method is not supported for the specified resource. Try performing a GET request.
500
Internal Server Error
Something went wrong on our side. Try the request again in a few minutes, or contact us.

Resolving errors

For troubleshooting failed requests, the Kentico Cloud APIs provide error messages defined in a consumable format to help you identify and fix the issue. For example, when you request a content item that does not exist (e.g., you mistype its codename), the API returns a 404 HTTP error along with a JSON message.

If you cannot identify and resolve an issue with your API call, you can contact us with the response status and the unique error ID. Hint: use the chat button in the bottom right corner of this page.

Example error responses

Mistyped codename of a content item:

{
  "message": "The requested content item 'on_roatst' was not found.",
  "request_id": "HyufT6wUgEc=",
  "error_code": 100,
  "specific_code": 0
}

Invalid value of a query parameter:

{
  "message": "Query parameter 'limit' must be a positive integer.",
  "request_id": "GMAQvDLeLbE=",
  "error_code": 1005,
  "specific_code": 0
}
Suggest Edits

Delivery API

 

The Kentico Cloud Delivery API is read-only. You can retrieve content but not add or modify it.

Production vs Preview

You can work with the Delivery API in two ways. Either retrieve published versions of content items or preview their yet unpublished versions. In both cases, you use the same methods to request data but with a different base URL.

Retrieve published content from your project using the production URL:
https://deliver.kenticocloud.com/<YOUR_PROJECT_ID>/

Preview unpublished content from your project using the preview URL:
https://preview-deliver.kenticocloud.com/<YOUR_PROJECT_ID>/

If you want to preview unpublished content in your project, you need to include the Authorization header in your request when working with the API.

curl --request GET \
  --url https://preview-deliver.kenticocloud.com/975bf280-fd91-488c-994c-2f04416e5ee3/items/on_roasts \
  --header 'authorization: Bearer YOUR_PREVIEW_API_KEY'

For more details, see Previewing content via API.

Suggest Edits

Listing response

Object model description of listing responses for content items and content types.

 

When you retrieve a list of content items or content types from your project, the Delivery API returns a listing response.

Content items listing response

Attribute Description Type
items A list of content items array of Content item objects
modular_content A list of content items used in Modular content and Rich text elements collection of Content item objects
pagination Information about the retrieved page Pagination

Content types listing response

Attribute Description Type
types A list of content types array of Content type objects
pagination Information about the retrieved page Pagination

Pagination object

Attribute Description Type Notes
skip Number of content items skipped from the response integer Reflects the value set by the skip query parameter.
limit Number of content items returned in the response integer Reflects the value set by the limit query parameter.
count Number of retrieved content items integer If the limit and skip query parameters aren't set, the count attribute will contain the total number of content items matching the specified filtering parameters.
next_page URL to the next page of results string See Paging for more details.

Example listing response for content items

{
  "items": [
    # array of Content item objects
  ],
  "modular_content": {
    # list of Content item objects
  },
  "pagination": {
    "skip": 0,
    "limit": 10,
    "count": 10,
    "next_page": "https://deliver.kenticocloud.com/<YOUR_PROJECT_ID>/items?limit=10&skip=10"
  }
}

Example listing response for content types

{
  "types": [
    # array of Content type objects
  ],
  "pagination": {
    "skip": 0,
    "limit": 3,
    "count": 3,
    "next_page": "https://deliver.kenticocloud.com/<YOUR_PROJECT_ID>/types?limit=3&skip=3"
  }
}
Suggest Edits

Filtering

Retrieve a filtered listing response from your project by specifying filtering parameters.

 

When retrieving a list of content items from your project, you can filter large sets of content items by building query parameters from content elements and system attributes.

If you want to limit the listing response only to certain elements, see Projection.

Filtering by system values

To filter by a system attribute, you need to use a query parameter in the system.<attribute_name> format. Valid system attributes include id, name, codename, type, sitemap_locations, and last_modified. For example, to retrieve only content items based on the Article content type, you can use system.type=article as a query parameter.

Filtering by element values

To filter by an element value, you need to use a query parameter in the elements.<element_codename>=<value> format. For example, to retrieve only content items whose Number element named Price has a value of 16, you can use elements.price=16 as a query parameter.

Joining multiple query parameters

You can join multiple query parameters by using the & character. Queries with two or more filtering query parameters are more restrictive because the individual query parameters are merged with a logical conjunction.

For example, query system.type=article&system.sitemap_locations[contains]=cafes will return all Article content items which are in the Cafes section of the project sitemap.

Filtering operators

You can use the following filtering operators both with the system attributes and element values:

Operator
Description
Example
Use with

=

Attribute value equals the specified value.

system.type=article
system.language=de-DE

Simple types

[lt]

Attribute value is less than the specified value.

system.last_modified[lt]=2017-03-01
elements.price[lt]=10

Simple types

[lte]

Attribute value is less than or equals the specified value.

system.last_modified[lte]=2017-02-01
elements.price[lte]=4

Simple types

[gt]

Attribute value is greater than the specified value.

system.last_modified[gt]=2016
elements.price[gt]=1000

Simple types

[gte]

Attribute value is greater than or equals the specified value.

system.last_modified[gte]=2017-02-28
elements.price[gte]=50

Simple types

[range]

Attribute value falls in the specified range of two values, both inclusive.

system.last_modified[range]=2017-02,2017-03
elements.price[range]=10.5,50

Simple types

[in]

Attribute value is in the specified list of values.

system.type[in]=cafe,coffee
elements.price[in]=8.5,9,10.5

Simple types

[contains]

Attribute with an array of values contains the specified value.

system.sitemap_locations[contains]=cafes

Arrays

[any]

Attribute with an array of values contains any value from the specified list of values.

elements.personas[any]=barista,coffee_blogger

Arrays

[all]

Attribute with an array of values contains the specified list of values.

elements.personas[all]=barista,coffee_blogger

Arrays

Arrays vs simple types

You can use the [contains], [any], and [all] filters only with arrays. Array attributes in Kentico Cloud include the sitemap locations system object, and the Modular content, Multiple choice, and Taxonomy elements. All the other system attributes and content type elements are represented as simple types, i.e., strings, numbers, or dates.

Suggest Edits

Ordering

Sort the content in a listing response.

 

You can sort the listing response by using the order query parameter. As with filtering, you can use both the system and elements attributes to sort data.

To sort content items in the ascending order, add the order=<attribute>[asc] query parameter. Similarly, to sort in the descending order, you can use the [desc] modifier.

Examples

  • Sort by date – order=system.last_modified[asc]
  • Sort by content item name – order=system.name[asc]
  • Sort by element value – order=elements.<element_codename>[desc]

You can get only a small subset of a large collection of content items with the skip and limit query parameters. Using these parameters, you can display a specific page of results and iterate over a list of content items or types.

For example, when you have a listing response with a page size of 10 items, you can use the skip=10&limit=10 query parameters to retrieve the second page of results.

For details about the pagination data in each listing response, see the Pagination object.

Suggest Edits

Projection

Choose which parts of content to retrieve.

 

You can retrieve only certain elements from a content item by using the elements query parameter. For example, to retrieve only the elements with codenames title, summary, and related_articles, you can use elements=title,summary,related_articles as a query parameter.

Note: You cannot omit the System object from the JSON response using any query.

Suggest Edits

Modular content

 

Content items might reference modular content items using the Modular content element. Recursively, these modular content items can reference another modular content items. By default, only one level of modular content is returned.

  • If you want to include more than one level of modular content items in response, use the depth query parameter.
  • If you want to exclude all modular content, use the depth=0 query parameter.
Suggest Edits

List content items

Retrieve a list of content items in your project. By default, the content items are ordered alphabetically by codename.

 
gethttps://deliver.kenticocloud.com/project_id/items
curl --request GET \
  --url 'https://deliver.kenticocloud.com/975bf280-fd91-488c-994c-2f04416e5ee3/items?system.type=article&elements=title%2Csummary%2Cpost_date%2Cteaser_image&order=elements.post_date%5Bdesc%5D&depth=0&limit=3' \
  --header 'content-type: application/json'
using KenticoCloud.Delivery;

DeliveryClient client = new DeliveryClient("975bf280-fd91-488c-994c-2f04416e5ee3");

// Generate strongly typed models via https://github.com/Kentico/cloud-generators-net
DeliveryItemListingResponse<Article> response = await client.GetItemsAsync<Article>(
    new EqualsFilter("system.type", "article"),
    new ElementsParameter("title", "summary", "post_date", "teaser_image"),
    new ContainsFilter("elements.personas", "coffee_lover"),
    new OrderParameter("elements.post_date", SortOrder.Descending),
    new DepthFilter(0),
    new LimitParameter(3)
    );

var items = response.Items;
import { DeliveryClient, TypeResolver, DeliveryClientConfig, SortOrder } from 'kentico-cloud-delivery-typescript-sdk';

// Create strongly typed models according to https://github.com/Enngage/KenticoCloudDeliveryTypeScriptSDK#creating-models
var typeResolvers = [
    new TypeResolver("article", () => new Article())
];
var config = new DeliveryClientConfig("975bf280-fd91-488c-994c-2f04416e5ee3", typeResolvers);
var deliveryClient = new DeliveryClient(config);

deliveryClient.items<Article>()
    .equalsFilter('system.type', 'article')
    .elementsParameter(['title', 'summary', 'post_date', 'teaser_image'])
    .orderParameter('elements.post_date', SortOrder.desc)
    .limitParameter(3)
    .get()
    .subscribe(response => console.log(response.items));
A binary file was returned

You couldn't be authenticated

{
    "items": [
        {
            "system": {
                "id": "cf106f4e-30a4-42ef-b313-b8ea3fd3e5c5",
                "name": "Coffee Beverages Explained",
                "codename": "coffee_beverages_explained",
                "language": "default",
                "type": "article",
                "sitemap_locations": [
                    "articles"
                ],
                "last_modified": "2017-04-04T13:40:00.1102334Z"
            },
            "elements": {
                "title": {
                    "type": "text",
                    "name": "Title",
                    "value": "Coffee Beverages Explained"
                },
                "summary": {
                    "type": "text",
                    "name": "Summary",
                    "value": "Espresso and filtered coffee are the two main categories of coffee, based on the method of preparation. Learn about individual types of coffee that fall under these categories."
                },
                "post_date": {
                    "type": "date_time",
                    "name": "Post date",
                    "value": "2014-11-18T00:00:00Z"
                },
                "teaser_image": {
                    "type": "asset",
                    "name": "Teaser image",
                    "value": [
                        {
                            "name": "coffee-beverages-explained-1080px.jpg",
                            "type": "image/jpeg",
                            "size": 90895,
                            "description": null,
                            "url": "https://assets.kenticocloud.com:443/975bf280-fd91-488c-994c-2f04416e5ee3/e700596b-03b0-4cee-ac5c-9212762c027a/coffee-beverages-explained-1080px.jpg"
                        }
                    ]
                }
            }
        },
        {
            "system": {
                "id": "23f71096-fa89-4f59-a3f9-970e970944ec",
                "name": "Donate with us",
                "codename": "donate_with_us",
                "language": "default",
                "type": "article",
                "sitemap_locations": [
                    "articles"
                ],
                "last_modified": "2017-04-04T13:40:29.970377Z"
            },
            "elements": {
                "title": {
                    "type": "text",
                    "name": "Title",
                    "value": "Donate with us"
                },
                "summary": {
                    "type": "text",
                    "name": "Summary",
                    "value": "Dancing Goat regularly donates money to Children in Africa, a foundation helping children with food, accommodation, education, and other essentials. Donate with us and create a better world."
                },
                "post_date": {
                    "type": "date_time",
                    "name": "Post date",
                    "value": "2014-11-12T00:00:00Z"
                },
                "teaser_image": {
                    "type": "asset",
                    "name": "Teaser image",
                    "value": [
                        {
                            "name": "donate-with-us-1080px.jpg",
                            "type": "image/jpeg",
                            "size": 133239,
                            "description": null,
                            "url": "https://assets.kenticocloud.com:443/975bf280-fd91-488c-994c-2f04416e5ee3/9b86141d-b667-4c35-82b1-826bc151d72a/donate-with-us-1080px.jpg"
                        }
                    ]
                }
            }
        },
        {
            "system": {
                "id": "b2fea94c-73fd-42ec-a22f-f409878de187",
                "name": "Origins of Arabica Bourbon",
                "codename": "origins_of_arabica_bourbon",
                "language": "default",
                "type": "article",
                "sitemap_locations": [
                    "articles"
                ],
                "last_modified": "2017-04-04T13:45:44.1533096Z"
            },
            "elements": {
                "title": {
                    "type": "text",
                    "name": "Title",
                    "value": "Origins of Arabica Bourbon"
                },
                "summary": {
                    "type": "text",
                    "name": "Summary",
                    "value": "This one particular type of coffee, the Arabica Bourbon, is now sold only in Japan. It has been brought back to life by enthusiasts after being almost forgotten for nearly sixty years."
                },
                "post_date": {
                    "type": "date_time",
                    "name": "Post date",
                    "value": "2014-11-11T00:00:00Z"
                },
                "teaser_image": {
                    "type": "asset",
                    "name": "Teaser image",
                    "value": [
                        {
                            "name": "origins-of-arabica-bourbon-1080px.jpg",
                            "type": "image/jpeg",
                            "size": 132229,
                            "description": null,
                            "url": "https://assets.kenticocloud.com:443/975bf280-fd91-488c-994c-2f04416e5ee3/1cfcb6c9-1fe6-4013-a0bb-b26f8ada2ebf/origins-of-arabica-bourbon-1080px.jpg"
                        }
                    ]
                }
            }
        }
    ],
    "modular_content": {},
    "pagination": {
        "skip": 0,
        "limit": 3,
        "count": 3,
        "next_page": "https://deliver.kenticocloud.com/975bf280-fd91-488c-994c-2f04416e5ee3/items?system.type=article&elements=title%2csummary%2cpost_date%2cteaser_image&order=elements.post_date%5bdesc%5d&depth=0&limit=3&skip=3"
    }
}
{
  "items": [],
  "modular_content": {},
  "pagination": {
    "skip": 0,
    "limit": 0,
    "count": 0,
    "next_page": ""
  }
}

Path Params

project_id
string
required

The ID of your project. Example: 975bf280-fd91-488c-994c-2f04416e5ee3.

Query Params

language
string

The codename of a specific language variant. See Localization. Example: en-US.

elements
string

A comma-separated list of content type element codenames. Use this parameter to choose which elements to retrieve. If not specified, all elements are retrieved. See Projection. Example: title,summary,post_date,teaser_image.

order
string

Order of the retrieved content items. By default, the items are sorted alphabetically by their codenames from A to Z in descending order. Example: elements.post_date[desc].

depth
int32

Content items can contain Modular content elements and reference other content items. By default, only the first level of modular content is returned. If you need to exclude all modular content from the response, use depth=0.

skip
int32

Number of content items to skip. Example: 10.

limit
int32

Number of content items to retrieve in a single request. Example: 10. If the limit is lower than the total number of items matching your query, the next_page attribute in the Pagination object will contain a URL to the next page of results.

 

Returns

A listing response object with a collection of content items. If your query does not match any content items, the API returns a standard listing response with empty items and modular_content attributes.

To learn how you can filter the listing response by individual attributes, see Filtering retrieved content.

Suggest Edits

Content item object

Object model description of a single content item object.

 

When retrieving a single content item, the Delivery API returns a content item object with the following attributes:

Attribute Description Type
item Content item data collection of the system and elements attributes
    system System attributes of the content item System
    elements Content type elements in the content item collection of Element objects
modular_content A list of content items used in Modular content and Rich text elements collection of Content item objects

Every content item in a JSON response from the Delivery API contains a system attribute. This attribute represents the System object with information about the retrieved content item.

System object (content item)

Attribute Description Type Notes
id Unique identifier of the content item string
name Display name of the content item string
codename Codename of the content item string Generated from the content item's display name.
language Codename of the language variant string For details on retrieving content in different languages, see Localization.
type Codename of the content type string
sitemap_locations A list of sitemap locations the content item is in array of strings
last_modified When was the content item last modified string The value is in the ISO 8601 format.

Example content item object

{
  "item": {
    "system": {
      "id": "cf106f4e-30a4-42ef-b313-b8ea3fd3e5c5",
      "name": "Coffee Beverages Explained",
      "codename": "coffee_beverages_explained",
      "language": "en-US",
      "type": "article",
      "sitemap_locations": [
        "articles"
      ],
      "last_modified": "2016-10-27T11:14:58.9229067Z"
    },
    "elements": {
      # collection of Element objects
    }
  },
  "modular_content": {
    # collection of Content item objects
  }
}
Suggest Edits

View a content item

Retrieve a specific content item by specifying its codename.

 
gethttps://deliver.kenticocloud.com/project_id/items/content_item_codename
curl --request GET \
  --url 'https://deliver.kenticocloud.com/975bf280-fd91-488c-994c-2f04416e5ee3/items/on_roasts?elements=title%2Csummary%2Cpost_date%2Cteaser_image%2Crelated_articles' \
  --header 'content-type: application/json'
using KenticoCloud.Delivery;

DeliveryClient client = new DeliveryClient("975bf280-fd91-488c-994c-2f04416e5ee3");

// Generate strongly typed models via https://github.com/Kentico/cloud-generators-net
DeliveryItemResponse<Article> response = await client.GetItemAsync<Article>("on_roasts",
    new ElementsParameter("title", "summary", "post_date", "teaser_image", "related_articles")
    );

ContentItem item = response.Item;
import { DeliveryClient, TypeResolver, DeliveryClientConfig } from 'kentico-cloud-delivery-typescript-sdk';

// Create strongly typed models according to https://github.com/Enngage/KenticoCloudDeliveryTypeScriptSDK#creating-models
var typeResolvers = [
    new TypeResolver("article", () => new Article())
];
var config = new DeliveryClientConfig("975bf280-fd91-488c-994c-2f04416e5ee3", typeResolvers);
var deliveryClient = new DeliveryClient(config);

deliveryClient.item<Article>('on_roasts')
    .elementsParameter(['title', 'summary', 'post_date', 'teaser_image'])
    .depthParameter(1)
    .get()
    .subscribe(response => console.log(response.item));
A binary file was returned

You couldn't be authenticated

{
    "item": {
        "system": {
            "id": "f4b3fc05-e988-4dae-9ac1-a94aba566474",
            "name": "On Roasts",
            "codename": "on_roasts",
            "language": "default",
            "type": "article",
            "sitemap_locations": [
                "articles"
            ],
            "last_modified": "2016-10-20T12:03:48.4628352Z"
        },
        "elements": {
            "title": {
                "type": "text",
                "name": "Title",
                "value": "On Roasts"
            },
            "summary": {
                "type": "text",
                "name": "Summary",
                "value": "Roasting coffee beans can take from 6 to 13 minutes. Different roasting times produce different types of coffee, with varying concentration of caffeine and intensity of the original flavor."
            },
            "post_date": {
                "type": "date_time",
                "name": "Post date",
                "value": "2014-11-07T00:00:00Z"
            },
            "teaser_image": {
                "type": "asset",
                "name": "Teaser image",
                "value": [
                    {
                        "name": "on-roasts-1080px.jpg",
                        "type": "image/jpeg",
                        "size": 0,
                        "description": null,
                        "url": "https://assets.kenticocloud.com:443/5859c8b2-f64d-405f-a306-d65dd5b1da04/f6daed1f-3f3b-4036-a9c7-9519359b9601/on-roasts-1080px.jpg"
                    }
                ]
            },
            "related_articles": {
                "type": "modular_content",
                "name": "Related articles",
                "value": [
                    "coffee_processing_techniques",
                    "origins_of_arabica_bourbon"
                ]
            }
        }
    },
  "modular_content": {
    # list of related Content items
  }
}

Path Params

project_id
string
required

The ID of your project. Example: 975bf280-fd91-488c-994c-2f04416e5ee3.

content_item_codename
string
required

The codename of a specific content item. Example: on_roasts.

Query Params

language
string

The codename of a specific language variant. See Localization. Example: en-US.

elements
string

A comma-separated list of content type element codenames. Use this parameter to choose which elements to retrieve. If not specified, all elements are retrieved. See Projection. Example: title,summary,post_date,teaser_image.

depth
int32

Content items can contain Modular content elements and reference other content items. By default, only the first level of modular content is returned. If you need to exclude all modular content from the response, use depth=0.

 

Returns

A single Content item object if a valid content item codename was specified. When requesting the codename of a content item that is not published or was deleted, the API returns an error response with a 404 HTTP status code.

Suggest Edits

List content types

Retrieve a list of content types in your project.

 
gethttps://deliver.kenticocloud.com/project_id/types
curl --request GET \
  --url 'https://deliver.kenticocloud.com/975bf280-fd91-488c-994c-2f04416e5ee3/types?limit=3' \
  --header 'content-type: application/json'
using KenticoCloud.Delivery;
 
DeliveryClient client = new DeliveryClient("975bf280-fd91-488c-994c-2f04416e5ee3");
 
DeliveryTypeListingResponse response = await client.GetTypesAsync(
    new LimitParameter(3)
    );
 
var types = response.Types;
import { DeliveryClient, TypeResolver, DeliveryClientConfig } from 'kentico-cloud-delivery-typescript-sdk';

var config = new DeliveryClientConfig("975bf280-fd91-488c-994c-2f04416e5ee3", []]);
var deliveryClient = new DeliveryClient(config);

deliveryClient.types()
    .limitParameter(3)
    .get()
    .subscribe(response => console.log(response.types));
A binary file was returned

You couldn't be authenticated

{
  "types": [
    {
      "system": {
        "id": "b7aa4a53-d9b1-48cf-b7a6-ed0b182c4b89",
        "name": "Article",
        "codename": "article",
        "last_modified": "1. 1. 0001 0:00:00"
      },
      "elements": {
        "personas": {
          "type": "taxonomy",
          "name": "Personas",
          "taxonomy_group": "personas"
        },
        "title": {
          "type": "text",
          "name": "Title"
        },
        "teaser_image": {
          "type": "asset",
          "name": "Teaser image"
        },
        "post_date": {
          "type": "date_time",
          "name": "Post date"
        },
        "summary": {
          "type": "text",
          "name": "Summary"
        },
        "body_copy": {
          "type": "rich_text",
          "name": "Body Copy"
        },
        "related_articles": {
          "type": "modular_content",
          "name": "Related articles"
        },
        "meta_keywords": {
          "type": "text",
          "name": "Meta keywords"
        },
        "meta_description": {
          "type": "text",
          "name": "Meta description"
        }
      }
    },
    {
      "system": {
        "id": "7bc932b3-ce2a-4aa7-954e-04cbcbd214fc",
        "name": "Brewer",
        "codename": "brewer",
        "last_modified": "1. 1. 0001 0:00:00"
      },
      "elements": {
        "product_name": {
          "type": "text",
          "name": "Product name"
        },
        "price": {
          "type": "number",
          "name": "Price"
        },
        "image": {
          "type": "asset",
          "name": "Image"
        },
        "product_status": {
          "type": "taxonomy",
          "name": "Product status",
          "taxonomy_group": "product_status"
        },
        "manufacturer": {
          "type": "text",
          "name": "Manufacturer"
        },
        "short_description": {
          "type": "rich_text",
          "name": "Short description"
        },
        "long_description": {
          "type": "rich_text",
          "name": "Long description"
        }
      }
    }
  ],
  "pagination": {
    "skip": 0,
    "limit": 3,
    "count": 3,
    "next_page": "https://kenticodeliver-apiwebapp.azurewebsites.net/975bf280-fd91-488c-994c-2f04416e5ee3/types?limit=3&skip=3"
  }
}

Path Params

project_id
string
required

The ID of your project. Example: 975bf280-fd91-488c-994c-2f04416e5ee3.

Query Params

skip
int32

Number of content types to skip from the response. Example: 10.

limit
int32

Number of content items to retrieve in a single request. Example: 10. If the limit is lower than the total number of items matching your query, the next_page attribute in the Pagination object will contain a URL to the next page of results.

 

Returns

A listing response object with a collection of content types in your project.

Suggest Edits

Content type object

Object model description of a single content type object.

 

When retrieving a single content type, the Delivery API returns a content type object with the following attributes:

Attribute Description Type
system System attributes of the content type System
elements Content type elements in the content item collection of Element objects

Every content type in a JSON response from the Delivery API contains a system attribute. This attribute represents the System object with information about the retrieved content type.

System object (content type)

Attribute Description Type Notes
id Unique identifier of the content item string
name Display name of the content item string
codename Codename of the content item string Generated from the content item's display name.
last_modified When was the content item last modified string The value is in the ISO 8601 format.

Example content type object

{
  "system": {
    "id": "b2c14f2c-6467-460b-a70b-bca17972a33a",
    "name": "About us",
    "codename": "about_us",
    "last_modified": "2016-10-20T12:03:17.4685693Z"
  },
  "elements": {
    # collection of Element objects
  }
}
Suggest Edits

View a content type

Retrieve a specific content type from your project by specifying its codename.

 
gethttps://deliver.kenticocloud.com/project_id/types/content_type_codename
curl --request GET \
  --url 'https://deliver.kenticocloud.com/975bf280-fd91-488c-994c-2f04416e5ee3/types/coffee' \
  --header 'content-type: application/json'
using KenticoCloud.Delivery;

DeliveryClient client = new DeliveryClient("975bf280-fd91-488c-994c-2f04416e5ee3");

ContentType type = await client.GetTypeAsync("coffee");
import { DeliveryClient, TypeResolver, DeliveryClientConfig } from 'kentico-cloud-delivery-typescript-sdk';

var config = new DeliveryClientConfig("975bf280-fd91-488c-994c-2f04416e5ee3", []]);
var deliveryClient = new DeliveryClient(config);

deliveryClient.type('coffee')
    .get()
    .subscribe(response => console.log(response.type));
A binary file was returned

You couldn't be authenticated

{
    "system": {
        "id": "929985ac-4aa5-436b-85a2-94c2d4fbbebd",
        "name": "Coffee",
        "codename": "coffee",
        "last_modified": "2017-02-02T14:58:53.5809087Z"
    },
    "elements": {
        "product_name": {
            "type": "text",
            "name": "Product name"
        },
        "price": {
            "type": "number",
            "name": "Price"
        },
        "image": {
            "type": "asset",
            "name": "Image"
        },
        "short_description": {
            "type": "rich_text",
            "name": "Short description"
        },
        "long_description": {
            "type": "rich_text",
            "name": "Long description"
        },
        "product_status": {
            "type": "taxonomy",
            "name": "Product status",
            "taxonomy_group": "product_status"
        },
        "farm": {
            "type": "text",
            "name": "Farm"
        },
        "country": {
            "type": "text",
            "name": "Country"
        },
        "variety": {
            "type": "text",
            "name": "Variety"
        },
        "processing": {
            "type": "multiple_choice",
            "name": "Processing",
            "options": [
                {
                    "name": "Semi-dry",
                    "codename": "semi_dry"
                },
                {
                    "name": "Wet (Washed)",
                    "codename": "wet__washed_"
                },
                {
                    "name": "Dry (Natural)",
                    "codename": "dry__natural_"
                }
            ]
        },
        "altitude": {
            "type": "text",
            "name": "Altitude"
        }
    }
}

Path Params

project_id
string
required

The ID of your project. Example: 975bf280-fd91-488c-994c-2f04416e5ee3.

content_type_codename
string
required

The codename of a specific content type. Example: coffee.

 

Returns

A single Content type object if a valid content type codename was specified. If your query does not match any content type, the API returns an error response with a 404 HTTP status code.

Suggest Edits

Content type element object

Object model descriptions of individual elements.

 

When retrieving content items or content types, you get an elements collection as a part of the retrieved item or type.

Element object

Each element in the elements collection contains the following attributes:

Attribute Description Type Notes
type Type of the element string Valid values: text, rich_text, number, multiple_choice, date_time, asset, modular_content, taxonomy, url_slug.
name Display name of the element string
value Value of the element varies Data type is based on the type of the element – see examples below for more details.

Note that certain elements, such as Rich text or Taxonomy, can contain additional attributes.

For an overview of the available elements and their limits, see the reference of content type elements in our Help Center.

Text

The value of a Text element is a string.

"meta_keywords": {
  "type": "text",
  "name": "Meta keywords",
  "value": "\"coffee beginner\", beverages"
}
"meta_keywords": {
  "type": "text",
  "name": "Meta keywords"
}

Rich text

Besides formatted text in the element's value attribute, Rich text elements can contain inline images and links to other content items.

Images (single object)

Attribute Description Type Notes
image_id ID of the image string
description Description of the image string Used for the alt attribute of an <img> tag.
url Absolute URL for the image string

Links (single object)

Each object in the links collection represents a content item ID in the GUID format, e.g., f4b3fc05-e988-4dae-9ac1-a94aba566474.

Attribute Description Type Notes
type Content type of the content item string
codename Display name of the element string
url_slug URL slug of the content item string Empty string if the content item's type does not use a URL slug element.

Modular content

A list of content items inserted into rich text as modules. The list is represented as an array of strings, each string being a codename of a content item.

"description": {
  "type": "rich_text",
  "name": "Description",
  "images": {
    "14mio": {
      "image_id": "14mio",
      "description": "Roasting coffee beans",
      "url": "https://assets.kenticocloud.com:443/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/237362b4-5f2b-480e-a1d3-0ad5a6d5f8bd/roaster.jpg"
    }
  },
  "links": {
    "f4b3fc05-e988-4dae-9ac1-a94aba566474": {
      "type": "article",
      "codename": "on_roasts",
      "url_slug": ""
    }
  },
  "modular_content": [
    "coffee_processing_techniques"
  ],
  "value": "<p>We operate our own roasteries, one on every continent we cover, from where we distribute right to the shops. This allows you to experience every cup as if you were right at the very farm it originated from. To achieve this, we use a refurbished 1920s Probat coffee roasters.</p>\n<figure data-image-id=\"14mio\"><img src=\"https://assets.kenticocloud.com:443/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/237362b4-5f2b-480e-a1d3-0ad5a6d5f8bd/roaster.jpg\" alt=\"Roasting coffee beans\" data-image-id=\"14mio\"></figure><p>We know that roasting is something you must keep on constantly perfecting. Each coffee requires a different roast to get the aroma and taste just right. That’s why our experts fine tune the way we <a data-item-id=\"f4b3fc05-e988-4dae-9ac1-a94aba566474\" href=\"\">roast coffees</a> every day. It’s a constant struggle.</p><object type=\"application/kenticocloud\" data-type=\"item\" data-codename=\"coffee_processing_techniques\"></object>"
}
"description": {
  "type": "rich_text",
  "name": "Description"
}

Multiple choice

The value of a Multiple choice element is an array of option objects. Each option object has a name and codename.

"processing": {
  "type": "multiple_choice",
  "name": "Processing",
  "value": [
    {
      "name": "Dry (Natural)",
      "codename": "dry__natural_"
    }
  ]
}
"processing": {
  "type": "multiple_choice",
  "name": "Processing",
  "options": [
    {
      "name": "Dry (Natural)",
      "codename": "dry__natural_"
    },
    {
      "name": "Wet (Washed)",
      "codename": "wet__washed_"
    },
    {
      "name": "Semi-dry",
      "codename": "semi_dry"
    }
  ]
}

Number

The value of a Number element is a decimal number. If empty, the value is null.

"price": {
  "type": "number",
  "name": "Price",
  "value": 8.5
}
"price": {
  "type": "number",
  "name": "Price"
}

Date & time

The value of a Date & time element is a string in the ISO 8601 format. If empty, the value is null.

"post_date": {
  "type": "date_time",
  "name": "Post date",
  "value": "2014-11-18T00:00:00Z"
}
"post_date": {
  "type": "date_time",
  "name": "Post date"
}

Asset

When used in content items, Asset elements can contain multiple assets. The value in the JSON response for an Asset element consists of an array of asset objects.

Asset object

Attribute Description Type
name File name of the asset string
type MIME type of the asset string
size Size of the asset in bytes integer
description Description of the asset string
url Absolute URL for the asset string
"teaser_image": {
  "type": "asset",
  "name": "Teaser image",
  "value": [
    {
      "name": "coffee-beverages-explained-1080px.jpg",
      "type": "image/jpeg",
      "size": "90895",
      "description": null,
      "url": "https://assets.kenticocloud.com:443/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/e700596b-03b0-4cee-ac5c-9212762c027a/coffee-beverages-explained-1080px.jpg"
    }
  ]
}
"teaser_image": {
  "type": "asset",
  "name": "Teaser image"
}

Modular content

The relations to content items saved in a Modular content element are represented as an array of strings. Each string being a codename of a content item.

"facts": {
  "type": "modular_content",
  "name": "Facts",
  "value": [
    "our_philosophy",
    "how_we_source_our_coffees",
    "how_we_roast_our_coffees"
  ]
}
"facts": {
  "type": "modular_content",
  "name": "Facts"
}

Taxonomy

The value of Taxonomy elements is an array of taxonomy item objects.

"personas": {
  "type": "taxonomy",
  "name": "Personas",
  "taxonomy_group": "personas",
  "value": [
    {
      "name": "Coffee lover",
      "codename": "coffee_lover"
    }
  ]
}
"personas": {
  "type": "taxonomy",
  "name": "Personas",
  "taxonomy_group": "personas"
}

URL slug

The value of URL slug elements is a string.

"url_slug": {
  "type": "url_slug",
  "name": "URL slug",
  "value": "brazil-natural-barra-grande"
}
"url_slug": {
  "type": "url_slug",
  "name": "URL slug"
}
Suggest Edits

View a content type element

Retrieve a specific content type element by specifying the codename of itself and its parent content type.

 
gethttps://deliver.kenticocloud.com/project_id/types/content_type_codename/elements/element_codename
curl --request GET \
  --url 'https://deliver.kenticocloud.com/975bf280-fd91-488c-994c-2f04416e5ee3/types/coffee/elements/processing' \
  --header 'content-type: application/json'
using KenticoCloud.Delivery;

DeliveryClient client = new DeliveryClient("975bf280-fd91-488c-994c-2f04416e5ee3");

ContentElement element = await client.GetContentElementAsync("coffee", "processing");
A binary file was returned

You couldn't be authenticated

{
  "type": "multiple_choice",
  "name": "Processing",
  "options": [
    {
      "name": "Semi-dry",
      "codename": "semi_dry"
    },
    {
      "name": "Wet (Washed)",
      "codename": "wet__washed_"
    },
    {
      "name": "Dry (Natural)",
      "codename": "dry__natural_"
    }
  ],
  "codename": "processing"
}

Path Params

project_id
string
required

The ID of your project. Example: 975bf280-fd91-488c-994c-2f04416e5ee3.

content_type_codename
string
required

The codename of a specific content type. Example: coffee.

element_codename
string
required

The codename of a specific element in the selected content type. Note that the element's codename has no relation to the type of the element. Example: processing.

 

Returns

A single content type Element object. If your query does not match any element in the selected content type, the API returns an error response with a 404 HTTP status code.

Suggest Edits

Personalization API

 

The Kentico Cloud Personalization API is read-only. You can retrieve data about your visitors but not add or modify it.

The base URL for all requests is https://engage-api.kenticocloud.com/v1/visitor/VISITOR_UID/.

All requests to the API must be authenticated by including an authorization header containing your Personalization API Key. See Authentication for more details.

curl --request GET \
  --url https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/UsualLocation \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'

User and session ID

All Personalization API methods require a user ID, which defines ID of a specific visitor on your website. Methods retrieving data about current visitor behavior also require a session ID. You can get these values either by parsing content of a cookie stored by the tracking code in your browser or by calling a JavaScript method in your website (this is the recommended way).

You can call the JavaScript function ket(...) defined in global scope.

  • User ID – call ket('getUid', function(uid){ console.log('UID: ' + uid); }); in your browser console.
  • Session ID – call ket('getSid', function(sid){ console.log('SID: ' + sid); }); in your browser console.

Both methods use a callback with string argument containing an ID of your website. Use the values when building a link to the REST interface.

Suggest Edits

Location object

Data model description of a visitor location object

 

When retrieving a visitor's current or usual location, the Personalization API returns a location object with the following attributes:

Attribute
Description
Type
Notes

city

City

string

state

State or region

string

For countries that don't have states, the attribute contains the name of the region. See examples on the right sidebar.

country

Country

string

Example location object

{
  "city": "Boston",
  "state": "Massachusetts",
  "country": "USA"
}
{
  "city": "Edinburgh", 
  "state": "Scotland",
  "country": "United Kingdom"
}
{
  "city": "Brno",
  "state": "South Moravian",
  "country": "Czechia"
}
Suggest Edits

View usual visitor location

Retrieve the location from which the specified visitor most usually connects to your website.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/usuallocation
curl --request GET \
  --url https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/UsualLocation \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;

PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();

LocationResponse location = await client.GetVisitorUsualLocationAsync(uid);
A binary file was returned

You couldn't be authenticated

{
  "city": "Boston",
  "state": "Massachusetts",
  "country": "USA"
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

 

Returns

A Location object with information about the visitor's usual location based on their IP address.

Suggest Edits

View current visitor location

Retrieve the current location of the specified visitor based on their session ID.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/currentlocation
curl --request GET \
  --url 'https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/CurrentLocation?sid=900420c5d646260d' \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;

PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();
string sid = this.Request.GetCurrentPersonalizationSid();

LocationResponse location = await client.GetCurrentLocationAsync(uid, sid);
A binary file was returned

You couldn't be authenticated

{
  "city": "Boston",
  "state": "Massachusetts",
  "country": "USA"
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

Query Params

sid
string
required

Defines a session ID of a specific user. Example: 900420c5d646260d.

 

Returns

A Location object with information about the visitor's current location based on their IP address.

Suggest Edits

Visit object

Data model description of a visit object

 

When retrieving information about a visitor's first or last visit, the Personalization API returns a visit object with the following attributes:

Attribute
Description
Type
Notes

visitDateTime

Date and time of the visit

string

Value is in the ISO 8601 format.

origin

Absolute URL of the website from which the visit originated

string

If empty, the visitor entered the website directly.

Example visit object

{
  "visitDateTime": "2017-02-14T11:24:45+00:00",
  "origin": "https://google.com/search?hl=en&q=kentico%20cloud"
}
Suggest Edits

View first visit

Retrieve time and origin of the first visit of the specified visitor.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/firstvisit
curl --request GET \
  --url https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/FirstVisit \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;

PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();

VisitResponse firstVisit = await client.GetFirstVisitAsync(uid);
A binary file was returned

You couldn't be authenticated

{
  "visitDateTime": "2017-02-14T11:24:45+00:00",
  "origin": ""
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

 

Returns

A Visit object containing time and origin of the first visit.

Suggest Edits

View last visit

Retrieve time and origin of the last visit of the specified visitor.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/lastvisit
curl --request GET \
  --url https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/LastVisit \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json' 
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;

PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();

VisitResponse lastVisit = await client.GetLastVisitAsync(uid);
A binary file was returned

You couldn't be authenticated

{
  "visitDateTime": "2017-02-14T13:18:52+00:00",
  "origin": "https://google.com/search?q=kentico"
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

 

Returns

A Visit object containing time and origin of the last visit.

Suggest Edits

Activity summary object

Object model description of a visitor's activity summary object.

 

When retrieving a summary of visitor's activity, the Personalization API returns an activity summary object with the following attributes:

Attribute
Description
Type
Notes

totalSessions

Total number of visitor's sessions

integer

activityTimeSpan

Total amount of time the visitor spent on your website

string

Value is in the hh:mm:ss format.

avgSessionActions

Average number of actions per session performed by the visitor

integer

Actions are defined as page visits, form submits or your own custom actions.

Example activity summary object

{
  "totalSessions": 3,
  "activityTimeSpan": "01:54:07",
  "avgSessionActions": 9
}
Suggest Edits

View visitor's activity summary

Retrieve a summary of the visitor's overall activity on your website.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/activitysummary
curl --request GET \
  --url https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/ActivitySummary \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;

PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();

ActivitySummaryResponse summary = await client.GetActivitySummaryAsync(uid);
A binary file was returned

You couldn't be authenticated

{
  "totalSessions": 3,
  "activityTimeSpan": "01:54:07",
  "avgSessionActions": 9
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

 

Returns

An Activity summary object.

Suggest Edits

Session object

Object model description of a session object.

 

When retrieving a visitor's current session, the Personalization API returns a session object with the following attributes:

Attribute
Description
Type
Notes

started

Date and time of the session start

string

Value is in the ISO 8601 format.

origin

Absolute URL of the website from which the visit originated

string

If empty, the visitor entered the website directly.

actions

A list of all actions performed by the visitor during the session

Collection of action objects

Action object

Attribute
Description
Type
Notes

type

Type of action

string

Contains one of 3 types of actions: PageVisit, FormSubmit or CustomAction.

pageUrl

URL of the page, where the action was performed

string

Returned without the base URL of your website. See examples on the right sidebar.

Example session object

{
  "started": "2017-04-19T14:41:46+00:00",
  "origin": "http://goat.ngrok.io/products/brazil-natural-barra-grande",
  "actions": [
    {
      "type": "PageVisit",
      "pageUrl": "/"
    },
    {
      "type": "PageVisit",
      "pageUrl": "/product-catalog/coffees"
    },
    {
      "type": "PageVisit",
      "pageUrl": "/articles"
    }
  ]
}
Suggest Edits

View visitor's current session

Retrieve information about the current session of a visitor on your website.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/currentsession
curl --request GET \
  --url 'https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/CurrentSession?sid=900420c5d646260d' \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;
 
PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();
string sid = this.Request.GetCurrentPersonalizationSid();
 
SessionDetailResponse session = await client.GetCurrentSessionAsync(uid, sid);
A binary file was returned

You couldn't be authenticated

{
  "started": "2017-02-14T12:37:11+00:00",
  "origin": "https://google.com/search?q=kentico",
  "actions": [
		{
      "type": "PageVisit",
      "pageUrl": "/help/"
    },
    {
      "type": "PageVisit",
      "pageUrl": "/"
    }
  ]
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

Query Params

sid
string
required

Defines a session ID of a specific user. Example: 900420c5d646260d.

 

Returns

A Session object containing the summary of the visitor's current session.

Suggest Edits

Activity confirmation object

Object model description of a activity confirmation object.

 

When confirming a visitor's activity, the Personalization API returns a location object with the following attributes:

Attribute
Description
Type
Notes

activity

A binary indicator of whether the activity occurred

boolean

Is true if the visitor performed the specified action, otherwise false.

lastOccurrence

Date and time of the last occurrence of the action

string

Value is in the ISO 8601 format.
If the action was not performed, this attribute is not included in the response.

Example activity confirmation object

{
  "activity": true,
  "lastOccurrence": "2016-10-20T15:01:42+00:00"
}
Suggest Edits

Confirm visitor activity

Find out whether the visitor performed a specific action.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/visitoractions
curl --request GET \
  --url 'https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/VisitorActions?type=1&daysAgo=5' \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;

PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();
ActionDetails details = new ActionDetails();
details.DaysAgo = 5;

ActivityResponse visitedRecently = await personalizationClient.GetVisitorActionsAsync(uid, ActionTypeEnum.PageVisit, details);
A binary file was returned

You couldn't be authenticated

{
  "activity": true,
  "lastOccurrence": "2016-10-20T15:01:42+00:00"
}
{
  "activity": false
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

Query Params

type
string
required

Defines the type of the action performed by the user. The type parameter can have these values: 0 (session), 1 (page visit), 2 (form submit), 3 (custom action). Example: 0.

daysAgo
int32

The range of days within which the user performed an action. For example, to check whether a contact performed an action within the last two weeks, use 14.

pageUrl
string

Defines a URL of the page on which the user performed an action. The URL must be relative to the website root. For example, if you need to find out whether a contact performed an action on the home page of your website, use / instead of the full address.

customActionName
string

Defines a custom action. See Tracking custom actions.

 

Default values

If no optional query parameters (i.e., daysAgo, pageUrl, or customActionName) are specified, the Personalization API checks whether the action specified in the type query parameter occurred at any time and on any page on your website.

Returns

An Activity confirmation object.

Suggest Edits

Segments object

Object model description of the segments object.

 

When retrieving a list of contact's segments, the Personalization API returns a segments object with the following attributes:

Attribute
Description
Type

segments

A list of segments the visitor is a member of

a collection of segment objects

Segment object

Attribute
Description
Type

name

Name of the segment

string

Example segments object

{
  "segments": [
    {
      "name": "Regular visitors"
    },
    {
      "name": "Potential job candidates"
    }
  ]
}
Suggest Edits

View contact's segments

Retrieve the names of segments that the specified contact belongs to.

 
gethttps://engage-api.kenticocloud.com/v1/visitor/uid/segments
curl --request GET \
  --url https://engage-api.kenticocloud.com/v1/visitor/e3e9e191a12b9257/segments \
  --header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14' \
  --header 'content-type: application/json'
using KenticoCloud.Personalization;
using KenticoCloud.Personalization.MVC;

PersonalizationClient client = new PersonalizationClient("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJ1c3JfMHZRT0ZLWGtPTnpjclRtQk1RVGlqQiIsInBpZCI6IjU2OTAzMGM3LTUyYTUtNDRmNS1hMjQzLWM1Mjg1YjNlYjI0ZSIsImp0aSI6InhVMDZqRUlrbFRpU2k2RS0iLCJhdWQiOiJlbmdhZ2UtYXBpLmtlbnRpY29jbG91ZC5jb20ifQ.WuvDloUjl3raePT-2kjnc_vZKDWVMK-jRcVf2oUyJ14");

string uid = this.Request.GetCurrentPersonalizationUid();

SegmentsResponse response = await client.GetVisitorSegmentsAsync(uid);
Segment[] segments = response.Segments;
A binary file was returned

You couldn't be authenticated

{
  "segments": [
    {
      "name": "Regular visitors"
    },
    {
      "name": "Potential job candidates"
    }
  ]
}
{
  "segments": []
}

Path Params

uid
string
required

Defines the ID of a user. Example: e3e9e191a12b9257.

 

Returns

A Segments object containing the names of all segments the visitor belongs to. If the specified visitor is not a member of any segments, an empty Segments object is returned.

Suggest Edits

Migration API

 

The Kentico Cloud Migration API is read-only. You can retrieve content but not add or modify it.

You can use the Migration API to import finished content items into a CMS of your choice. Note that if you have already activated the Delivery API for your project, we recommend you use it instead.

Suggest Edits

List projects

Retrieve a list of the projects available to you.

 
gethttps://api.kenticocloud.com/draft/projects
curl --request GET \
  --url 'https://api.kenticocloud.com/draft/projects' \
  --header 'authorization: Bearer ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdlByM0N4ZzlpbjVDQ3YyRE1qaXdUIiwNCiAgImVtYWlsIjogImphbmNlcm1hbmtAZ21haWwuY29tIiwNCiAgImdpdmVuX25hbWUiOiAiQVBJIiwNCiAgImZhbWlseV9uYW1lIjogIkV4YW1wbGVzIiwNCiAgInZlciI6ICIxLjAuMCIsDQogICJqdGkiOiAiVmkzQXB0b285aGFiTzBUMiIsDQogICJhdWQiOiAiYXBpLWRyYWZ0LmtlbnRpY29jbG91ZC5jb20iDQp9.Gs-0zP_xu_oXQ5rM86yyNCUJW8tmt2FwBcyWjZmZhcA' \
  --header 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
  "projects": [
    {
      "project_id": "917bb277-c013-45b9-a6fb-6ca925578f41",
      "name": "Empty Project"
    },
    {
      "project_id": "38af179c-40ba-42e7-a5ca-33b8cdcc0d45",
      "name": "Sample Project"
    }
  ]
}
 

Returns

A list of projects you have access to based on the provided API key in the Authorization header.

Suggest Edits

List content types

Retrieve a list of content types available in your project.

 
gethttps://api.kenticocloud.com/draft/projects/project_id/types
curl --request GET \
  --url 'https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/types' \
  --header 'authorization: Bearer ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdlByM0N4ZzlpbjVDQ3YyRE1qaXdUIiwNCiAgImVtYWlsIjogImphbmNlcm1hbmtAZ21haWwuY29tIiwNCiAgImdpdmVuX25hbWUiOiAiQVBJIiwNCiAgImZhbWlseV9uYW1lIjogIkV4YW1wbGVzIiwNCiAgInZlciI6ICIxLjAuMCIsDQogICJqdGkiOiAiVmkzQXB0b285aGFiTzBUMiIsDQogICJhdWQiOiAiYXBpLWRyYWZ0LmtlbnRpY29jbG91ZC5jb20iDQp9.Gs-0zP_xu_oXQ5rM86yyNCUJW8tmt2FwBcyWjZmZhcA' \
  --header 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
  "types": [
    {
      "type_id": "b2c14f2c-6467-460b-a70b-bca17972a33a",
      "name": "About us",
      "elements": [
        {
          "element_id": "cff560dc-ed24-7036-cbb6-b7a1b61b196a",
          "name": "Facts",
          "type": "modular_content"
        }
      ]
    },
    {
      "type_id": "d9748663-f567-4c51-a922-c24a1d6b935a",
      "name": "Accessory",
      "elements": [
        {
          "element_id": "f9e2672c-5035-412e-3985-d6112b3781bd",
          "name": "Product name",
          "type": "text"
        },
        {
          "element_id": "51d63ac3-d40d-15ea-c219-be207714077c",
          "name": "Price",
          "type": "number"
        },
        {
          "element_id": "f0db12e6-86e4-8597-903b-c5984076d6b3",
          "name": "Image",
          "type": "asset"
        },
        {
          "element_id": "ab75ff46-b629-5ce5-aac9-79ed8a7b869c",
          "name": "Manufacturer",
          "type": "text"
        },
        {
          "taxonomy_group_id": "79b1c5b6-30bc-d076-a236-d9ec9f1ff01b",
          "element_id": "ef13b1f4-b558-f707-35a4-86146dbe4518",
          "name": "Product status",
          "type": "taxonomy"
        },
        {
          "element_id": "9740e2d0-87e8-52f5-ff4c-566fa00b1253",
          "name": "Short description",
          "type": "rich_text"
        },
        {
          "element_id": "1f961774-a589-4e21-9f8e-a8c4908ea476",
          "name": "Long description",
          "type": "rich_text"
        }
      ]
    },
    {
      "type_id": "b7aa4a53-d9b1-48cf-b7a6-ed0b182c4b89",
      "name": "Article",
      "elements": [
        {
          "taxonomy_group_id": "f30c7f72-e9ab-8832-2a57-62944a038809",
          "element_id": "0a16b642-ac3e-584d-a45a-ba354a30b2bd",
          "name": "Personas",
          "type": "taxonomy"
        },
        {
          "element_id": "85d5efc6-f47e-2fde-a6f5-0950fe89ecd1",
          "name": "Title",
          "type": "text"
        },
        {
          "element_id": "62eb9881-e222-6b81-91d2-fdf052726414",
          "name": "Teaser image",
          "type": "asset"
        },
        {
          "element_id": "4ae5f7a9-fe1f-1e8c-bfec-d321455139c4",
          "name": "Post date",
          "type": "date_time"
        },
        {
          "element_id": "90550cbe-7bff-40a9-2947-9c81489fe562",
          "name": "Summary",
          "type": "text"
        },
        {
          "element_id": "108ed7c0-fc8c-c0ec-d0b5-5a8071408b54",
          "name": "Body Copy",
          "type": "rich_text"
        },
        {
          "element_id": "ee7c3687-b469-6c56-3ac6-c8dfdc8b58b5",
          "name": "Related articles",
          "type": "modular_content"
        },
        {
          "element_id": "5efb2425-5987-a4a6-a2d3-b14712b56e73",
          "name": "Meta keywords",
          "type": "text"
        },
        {
          "element_id": "b9dc537c-2518-e4f5-8325-ce4fce26171e",
          "name": "Meta description",
          "type": "text"
        }
      ]
    },
    {
      "type_id": "e097306b-3893-4a42-9973-2525fad14d66",
      "name": "Office",
      "elements": [
        {
          "element_id": "bb81a11d-886c-2a32-e480-29f01cea667f",
          "name": "Name",
          "type": "text"
        },
        {
          "element_id": "f7eb7ab2-4e41-aca0-7e93-dbbbdca330eb",
          "name": "Street",
          "type": "text"
        },
        {
          "element_id": "95477abc-d6b4-a6b3-5b72-c92763da55bf",
          "name": "City",
          "type": "text"
        },
        {
          "element_id": "4fbc7779-652d-7716-2673-7419aaaceed1",
          "name": "Country",
          "type": "text"
        },
        {
          "element_id": "08df2f10-52b8-d451-fab1-b6da8ddb3fd2",
          "name": "State",
          "type": "text"
        },
        {
          "element_id": "e7141da8-8792-a66d-d1c8-1fe704758393",
          "name": "Zip code",
          "type": "text"
        },
        {
          "element_id": "2ac708e2-cd0e-67b0-67f8-71725625dc6d",
          "name": "Phone",
          "type": "text"
        },
        {
          "element_id": "251dc38f-43a3-d924-a328-8708ecb00ef1",
          "name": "Email",
          "type": "text"
        }
      ]
    }
  ]
}

Path Params

project_id
string
required

The ID of your project. Example: 38af179c-40ba-42e7-a5ca-33b8cdcc0d45.

 

Returns

An array of content type objects available in the specified project.

Suggest Edits

List content items

Retrieve a list of content items from your project.

 
gethttps://api.kenticocloud.com/draft/projects/project_id/items
curl --request GET \
  --url 'https://api.kenticocloud.com/draft/projects/fdb012c4-c012-407f-9116-1c78e670ec84/items' \
  --header 'authorization: Bearer ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdlByM0N4ZzlpbjVDQ3YyRE1qaXdUIiwNCiAgImVtYWlsIjogImphbmNlcm1hbmtAZ21haWwuY29tIiwNCiAgImdpdmVuX25hbWUiOiAiQVBJIiwNCiAgImZhbWlseV9uYW1lIjogIkV4YW1wbGVzIiwNCiAgInZlciI6ICIxLjAuMCIsDQogICJqdGkiOiAiVmkzQXB0b285aGFiTzBUMiIsDQogICJhdWQiOiAiYXBpLWRyYWZ0LmtlbnRpY29jbG91ZC5jb20iDQp9.Gs-0zP_xu_oXQ5rM86yyNCUJW8tmt2FwBcyWjZmZhcA' \
  --header 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
  "items": [
    {
      "item_id": "d686ae55-39ea-44e5-a40b-ba97d90e4dec",
      "type_id": "a77e9845-a2d9-4573-bbae-1e0a4cb70637",
      "workflow_status_id": "8eb2388e-682b-45ae-8405-5add40430dfd",
      "name": "Scheduled maintenance 2017/02",
      "sitemap_location": [],
      "last_modified": "2017-02-13T15:16:25.9473812Z",
      "elements": [
        {
          "value": "Another maintenance",
          "element_id": "93969f59-8130-83be-24d7-b7887ccc55a5",
          "name": "Title",
          "type": "text"
        },
        {
          "value": "<h1>Scheduled maintenance</h1>\n<p>Remember, we're doing this for you. It's going to be fine.</p>",
          "element_id": "c222f15f-a72f-3570-574a-975c21036920",
          "name": "Announcement text",
          "type": "rich_text"
        },
        {
          "value": [],
          "element_id": "c460263c-38b4-baff-5349-6440aae49716",
          "name": "Banner",
          "type": "asset"
        }
      ]
    },
    {
      "item_id": "307ba686-a05b-4678-b5ce-bff6fc558d27",
      "type_id": "a77e9845-a2d9-4573-bbae-1e0a4cb70637",
      "workflow_status_id": "8eb2388e-682b-45ae-8405-5add40430dfd",
      "name": "Scheduled maintenance 2017/04",
      "sitemap_location": [],
      "last_modified": "2017-02-13T15:00:18.8425411Z",
      "elements": [
        {
          "value": "Scheduled maintenance 2017/04",
          "element_id": "93969f59-8130-83be-24d7-b7887ccc55a5",
          "name": "Title",
          "type": "text"
        },
        {
          "value": "<h1>Scheduled maintenance</h1>\n<p>You can expect a temporary downtime in two months.&nbsp;</p>",
          "element_id": "c222f15f-a72f-3570-574a-975c21036920",
          "name": "Announcement text",
          "type": "rich_text"
        },
        {
          "value": [],
          "element_id": "c460263c-38b4-baff-5349-6440aae49716",
          "name": "Banner",
          "type": "asset"
        }
      ]
    }
  ],
  "pagination": {
    "total_item_count": 2,
    "page_item_count": 2,
    "page_count": 1,
    "current_page": 1
  }
}

Path Params

project_id
string
required

The ID of your project. Example: 38af179c-40ba-42e7-a5ca-33b8cdcc0d45.

Query Params

sitemap_location
string

Filter the retrieved content items by their location in the project's sitemap. You can use this parameter multiple times to get items from several locations at once. Example: 9ee4e597-40c3-266d-5965-8d3e437b8eed. To retrieve a list of sitemap location IDs, see List sitemap locations.

workflow_status
string

Filter the retrieved content items by their workflow step. This way you can get, for example, only the approved content items by providing the ID of the specific workflow step. Example: 65e025db-1a04-4b9d-b366-408e09b58cb7. To retrieve a list of workflow status IDs, see List workflow steps.

content_type
string

Filter the retrieved content items by their content type. Example: 2e9b7cdd-e623-4918-a3f0-eb237878723c. To retrieve a list of content type IDs, see List content types.

 

Returns

An array of content item objects available in the specified project.

Suggest Edits

View a content item

Retrieve a specific content item from your project.

 
gethttps://api.kenticocloud.com/draft/projects/project_id/items/item_id
curl --request GET \
  --url 'https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/items/baccdc8b-7dd1-40ea-98bb-6a992b0558df' \
  --header 'authorization: Bearer ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdlByM0N4ZzlpbjVDQ3YyRE1qaXdUIiwNCiAgImVtYWlsIjogImphbmNlcm1hbmtAZ21haWwuY29tIiwNCiAgImdpdmVuX25hbWUiOiAiQVBJIiwNCiAgImZhbWlseV9uYW1lIjogIkV4YW1wbGVzIiwNCiAgInZlciI6ICIxLjAuMCIsDQogICJqdGkiOiAiVmkzQXB0b285aGFiTzBUMiIsDQogICJhdWQiOiAiYXBpLWRyYWZ0LmtlbnRpY29jbG91ZC5jb20iDQp9.Gs-0zP_xu_oXQ5rM86yyNCUJW8tmt2FwBcyWjZmZhcA' \
  --header 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
  "item_id": "baccdc8b-7dd1-40ea-98bb-6a992b0558df",
  "type_id": "929985ac-4aa5-436b-85a2-94c2d4fbbebd",
  "workflow_status_id": "13145328-b946-4e47-9c9d-6f40c7aaeaef",
  "name": "Colombia Carlos Imbachi",
  "sitemap_location": [
    "c6e04208-d6dd-1e25-f7ac-526daf042fb6"
  ],
  "last_modified": "2017-03-02T12:20:25.450198Z",
  "elements": [
    {
      "value": "Colombia Carlos Imbachi",
      "element_id": "edaec5c4-e653-9109-eb0d-fc40ccf3c810",
      "name": "Product name",
      "type": "text"
    },
    {
      "value": 10.5,
      "element_id": "624592dc-49b2-330a-7185-e1f2396ce90c",
      "name": "Price",
      "type": "number"
    },
    {
      "value": [
        {
          "asset_id": "80ee78c2-e6cb-4898-8053-91be9e763a4c",
          "name": "colombia.jpg",
          "type": "image/jpeg",
          "size": 75568,
          "last_modified": "2016-09-01T08:38:07.3800056Z",
          "create_download_link": "https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/assets/80ee78c2-e6cb-4898-8053-91be9e763a4c"
        }
      ],
      "element_id": "30ac3ccc-1e7f-1490-e1f6-915c64176a55",
      "name": "Image",
      "type": "asset"
    },
    {
      "value": "<p>The Colombian gold in the form of top quality coffee, also recognizable&nbsp;for its character. &nbsp;</p>",
      "images": [],
      "element_id": "b5a3263a-a1d7-92b7-865a-329f833285fa",
      "name": "Short description",
      "type": "rich_text"
    },
    {
      "value": "<p>As a part of our farmer-direct Colombia program, we bring you a special (above 88!) farm-specific number. We had some very special cupping samples sent to us straight from Colombia. And although they were all fantastic, this one really stood out from the others. Previously, we offered the \"First Place SCAA Coffee of the Year\" Carlos Imbachi. Just so you know what we're on about here, the famous Panama Esmeralda Especial Gesha ended up in 2nd place to Carlos Imbachi. Take this as another testament to the greatness and potential of Colombian coffee.</p>\n<figure data-image-id='9em8m'><img src=\"#\" alt=\"Colombia coffee\" data-image-id='9em8m'></figure><p>One cupping of this specialty was enough to recognize the unprecedented quality and character of this coffee. Mr. Imbachi's farm is located in the San Augustin region of Hulia, where he grows this coffee at an altitude of 5,700 feet.&nbsp;</p>",
      "images": [
        {
          "_id": "c52f0f99-d9bd-2598-d171-c37ab256fb7e",
          "asset": {
            "asset_id": "47b57724-b689-4865-9f12-521ddef2d025",
            "name": "kentico_cloud_rgb_small.png",
            "type": "image/png",
            "size": 8209,
            "last_modified": "2017-02-13T14:04:09.2146055Z",
            "create_download_link": "https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/assets/47b57724-b689-4865-9f12-521ddef2d025"
          }
        },
        {
          "_id": "9em8m",
          "asset": {
            "asset_id": "13e3857f-1fbb-4ec0-b7ec-3829d0325069",
            "name": "colombia.jpg",
            "type": "image/jpeg",
            "size": 75568,
            "last_modified": "2017-03-02T12:17:52.0565686Z",
            "create_download_link": "https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/assets/13e3857f-1fbb-4ec0-b7ec-3829d0325069"
          }
        }
      ],
      "element_id": "d468a0aa-e0fa-0cae-41db-6e006bff2527",
      "name": "Long description",
      "type": "rich_text"
    },
    {
      "value": [],
      "element_id": "1ee64175-fde7-fc1e-5259-511a31c326c3",
      "name": "Product status",
      "type": "taxonomy"
    },
    {
      "value": "Finca Buenavista - Carlos Imbachi",
      "element_id": "e5cf103f-9b84-1ab0-29f1-fb5a1657c6f7",
      "name": "Farm",
      "type": "text"
    },
    {
      "value": "Colombia",
      "element_id": "6eec1918-378d-3b15-8b1a-19c5f0748321",
      "name": "Country",
      "type": "text"
    },
    {
      "value": "Caturra",
      "element_id": "301c6712-962f-b05a-6f6e-2f0e1e959039",
      "name": "Variety",
      "type": "text"
    },
    {
      "options": [
        "41cc0828-8a1c-3714-f86c-dee5faf09f1c"
      ],
      "element_id": "d5a32749-c934-e502-3e02-5512115735ce",
      "name": "Processing",
      "type": "multiplechoice"
    },
    {
      "value": "5700",
      "element_id": "23a772c0-0b2b-588d-9849-e29068701f03",
      "name": "Altitude",
      "type": "text"
    }
  ]
}

Path Params

project_id
string
required

The ID of your project. Example: 38af179c-40ba-42e7-a5ca-33b8cdcc0d45.

item_id
string
required

The ID of the content item. Example: baccdc8b-7dd1-40ea-98bb-6a992b0558df.

 

Returns

A single content item object if a valid content item ID was specified.

Suggest Edits

List workflow steps

Retrieve a list of workflow steps in your project.

 
gethttps://api.kenticocloud.com/draft/projects/project_id/workflow
curl --request GET \
  --url 'https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/workflow' \
  --header 'authorization: Bearer ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdlByM0N4ZzlpbjVDQ3YyRE1qaXdUIiwNCiAgImVtYWlsIjogImphbmNlcm1hbmtAZ21haWwuY29tIiwNCiAgImdpdmVuX25hbWUiOiAiQVBJIiwNCiAgImZhbWlseV9uYW1lIjogIkV4YW1wbGVzIiwNCiAgInZlciI6ICIxLjAuMCIsDQogICJqdGkiOiAiVmkzQXB0b285aGFiTzBUMiIsDQogICJhdWQiOiAiYXBpLWRyYWZ0LmtlbnRpY29jbG91ZC5jb20iDQp9.Gs-0zP_xu_oXQ5rM86yyNCUJW8tmt2FwBcyWjZmZhcA' \
  --header 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
  "statuses": [
    {
      "workflow_id": "88ac5e6e-1c5c-4638-96e1-0d61221ad5bf",
      "name": "Draft",
      "color": "red"
    },
    {
      "workflow_id": "13145328-b946-4e47-9c9d-6f40c7aaeaef",
      "name": "Review",
      "color": "yellow"
    },
    {
      "workflow_id": "48de7f2d-80de-4a8e-9efb-fc23bffbf75a",
      "name": "SEO verification",
      "color": "lime"
    },
    {
      "workflow_id": "99435d07-a9b7-4273-b439-a6e4bc125140",
      "name": "Ready for approval",
      "color": "teal"
    },
    {
      "workflow_id": "a1b9efa3-8270-47e4-8d8d-b182710d1e3b",
      "name": "Approved",
      "color": "blue"
    },
    {
      "workflow_id": "b4363ccd-8f21-45fd-a840-5843d7b7f008",
      "name": "Published",
      "color": "light-green"
    }
  ]
}

Path Params

project_id
string
required

The ID of your project. Example: 38af179c-40ba-42e7-a5ca-33b8cdcc0d45.

 

Returns

A list of workflow steps defined in the specified project.

Suggest Edits

List sitemap locations

Retrieve a list of sitemap locations in your project.

 
gethttps://api.kenticocloud.com/draft/projects/project_id/sitemap
curl --request GET \
  --url 'https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/sitemap' \
  --header 'authorization: Bearer ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdlByM0N4ZzlpbjVDQ3YyRE1qaXdUIiwNCiAgImVtYWlsIjogImphbmNlcm1hbmtAZ21haWwuY29tIiwNCiAgImdpdmVuX25hbWUiOiAiQVBJIiwNCiAgImZhbWlseV9uYW1lIjogIkV4YW1wbGVzIiwNCiAgInZlciI6ICIxLjAuMCIsDQogICJqdGkiOiAiVmkzQXB0b285aGFiTzBUMiIsDQogICJhdWQiOiAiYXBpLWRyYWZ0LmtlbnRpY29jbG91ZC5jb20iDQp9.Gs-0zP_xu_oXQ5rM86yyNCUJW8tmt2FwBcyWjZmZhcA' \
  --header 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
  "nodes": [
    {
      "sitemap_node_id": "778dd673-a341-41db-0735-a9d6bcede0b3",
      "name": "Home",
      "children": []
    },
    {
      "sitemap_node_id": "820563dc-6738-c641-cdd5-18fdcbebff9b",
      "name": "Products",
      "children": [
        {
          "sitemap_node_id": "c6e04208-d6dd-1e25-f7ac-526daf042fb6",
          "name": "Coffee",
          "children": []
        },
        {
          "sitemap_node_id": "0b7a84cd-8547-504e-b1aa-1ae8f7b6b675",
          "name": "Brewers",
          "children": []
        },
        {
          "sitemap_node_id": "fedea22c-4ab7-908e-6ac0-85b9730e3a6c",
          "name": "Accessories",
          "children": []
        },
        {
          "sitemap_node_id": "8fdb2025-e240-1a17-df13-b5914a681730",
          "name": "Grinders",
          "children": []
        }
      ]
    },
    {
      "sitemap_node_id": "a60fe91c-88ea-6990-fe3b-cf8f8504cd33",
      "name": "Cafes",
      "children": [
        {
          "sitemap_node_id": "6f648389-3bce-43ec-2529-e5ff3e12ebe7",
          "name": "North America",
          "children": []
        },
        {
          "sitemap_node_id": "ef86a740-9e4c-0b33-4275-ae78558e71a7",
          "name": "Europe",
          "children": []
        },
        {
          "sitemap_node_id": "98c9e0f1-b6f7-510d-522a-0d39fc62aa1a",
          "name": "Australia",
          "children": []
        }
      ]
    },
    {
      "sitemap_node_id": "45a123f3-1c55-c697-7dae-78369c8f1e2c",
      "name": "Articles",
      "children": []
    },
    {
      "sitemap_node_id": "22110d88-4b92-32a0-db61-9b8dbe401920",
      "name": "Offices",
      "children": []
    },
    {
      "sitemap_node_id": "398551ec-3f19-b177-2661-69bed4f35e20",
      "name": "About us",
      "children": []
    }
  ]
}

Path Params

project_id
string
required

The ID of your project. Example: 38af179c-40ba-42e7-a5ca-33b8cdcc0d45.

 

Returns

A list of sitemap locations defined in the specified project. The API returns the complete sitemap hierarchy with all child sitemap locations.

Suggest Edits

List taxonomy groups

Retrieve a list of taxonomy groups in your project.

 
gethttps://api.kenticocloud.com/draft/projects/project_id/taxonomy
curl --request GET \
  --url 'https://api.kenticocloud.com/draft/projects/38af179c-40ba-42e7-a5ca-33b8cdcc0d45/taxonomy' \
  --header 'authorization: Bearer ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdlByM0N4ZzlpbjVDQ3YyRE1qaXdUIiwNCiAgImVtYWlsIjogImphbmNlcm1hbmtAZ21haWwuY29tIiwNCiAgImdpdmVuX25hbWUiOiAiQVBJIiwNCiAgImZhbWlseV9uYW1lIjogIkV4YW1wbGVzIiwNCiAgInZlciI6ICIxLjAuMCIsDQogICJqdGkiOiAiVmkzQXB0b285aGFiTzBUMiIsDQogICJhdWQiOiAiYXBpLWRyYWZ0LmtlbnRpY29jbG91ZC5jb20iDQp9.Gs-0zP_xu_oXQ5rM86yyNCUJW8tmt2FwBcyWjZmZhcA' \
  --header 'content-type: application/json'
A binary file was returned

You couldn't be authenticated

{
  "taxonomy_groups": [
    {
      "taxonomy_id": "79b1c5b6-30bc-d076-a236-d9ec9f1ff01b",
      "name": "Product status",
      "nodes": [
        {
          "taxonomy_node_id": "6352c8bf-8024-9986-8373-35445e1f0d59",
          "name": "On sale",
          "children": []
        },
        {
          "taxonomy_node_id": "8d808da3-29de-e608-5699-8565687dd474",
          "name": "Bestseller",
          "children": []
        }
      ]
    },
    {
      "taxonomy_id": "f30c7f72-e9ab-8832-2a57-62944a038809",
      "name": "Personas",
      "nodes": [
        {
          "taxonomy_node_id": "6693ca6e-79e0-57e4-000d-d23d5ce8f656",
          "name": "Coffee expert",
          "children": [
            {
              "taxonomy_node_id": "6a372f43-ccd7-e524-6308-c2094e7b6596",
              "name": "Barista",
              "children": []
            },
            {
              "taxonomy_node_id": "cdf2f3c6-89e3-5df1-f7de-7179460bd6b4",
              "name": "Cafe owner",
              "children": []
            }
          ]
        },
        {
          "taxonomy_node_id": "ab2b73a3-473d-4232-0652-495598f5d670",
          "name": "Coffee enthusiast",
          "children": [
            {
              "taxonomy_node_id": "208a9095-1b92-10da-7627-75ae311935cf",
              "name": "Coffee lover",
              "children": []
            },
            {
              "taxonomy_node_id": "4fa27320-c363-3ebe-5ab5-b531300f053f",
              "name": "Coffee blogger",
              "children": []
            }
          ]
        }
      ]
    }
  ]
}

Path Params

project_id
string
required

The ID of your project. Example: 38af179c-40ba-42e7-a5ca-33b8cdcc0d45.

 

Returns

A list of taxonomy groups for the specified project with the taxonomy items each group contains.