Skip to main content
ZenHub houses documentation to support you if you’re using Contensis Classic. Contensis Classic includes our WYSIWYG and templating features. If you’re working with a newer version of Contensis, is your go-to place to find anything Contensis-related when building with content types.
There is a newer version of Contensis. Click to find out more and download the latest version.

Get started with the Contacts API

The Contacts API is a RESTful API with a .NET client wrapper that can be used in razor and bespoke projects that provides programmatic access to read and write Populo contact information.

The API has been designed to be easy to use, and this documentation assumes you are going to be using the Contacts API in razor but most of the code examples can be used in a bespoke .NET project.

Populo directives

Add the following import directives to access the Populo API.

@using Zengenti.Populo;

Current contact

Accessing information about the current contact is the main goal of the CXM. To do this you would use the following code:

Returning contact properties

Data is grouped into facets to better facilitate the user’s understanding. An example of this is that a user may have two phone numbers, one for work and one for home. To access this information we would do the following for the home number.

Note: A full list of properties available in Populo can be found in the Contact properties article.

In order to access their work number we would use the following code:

Graceful handling

The API is designed to be as safe to use as possible, consider the following code:

Even though there is no facet called DoesNot and no property called Exist the API gracefully handles the situation and returns a null value rather than giving an error.