Headless

Discover how to integrate Umbraco.Engage.Headless package with Umbraco 12.0+ for a Content Delivery API.

Umbraco Engage offers the Umbraco.Engage.Headless package for seamless integration with Umbraco 12.0 and later. This package enables access to the Headless Content Delivery API, enabling personalized content, A/B tests, and segmentation.

Requirements

To install Umbraco.Engage.Headless, ensure the following prerequisites:

{
"Umbraco": {
    "CMS": {
        "DeliveryApi": {
            "Enabled": true
        }
    }
}
}

Installing the Umbraco Engage Headless API

To install the Umbraco Engage Headless API, follow these steps:

  1. Install the Umbraco.Engage.Headless package:

  • Using an IDE: Install the Umbraco.Engage.Headless package from NuGet in Visual Studio or JetBrains Rider.

  • Using the command line:

    • Navigate to your Umbraco website root folder in your terminal.

    • Run the following command:

dotnet add package Umbraco.Engage.Headless

Updating Program.cs

To update the Program.cs file, follow these steps:

  1. Open your Program.cs file.

  2. Add the line .AddEngageApiDocumentation() after .AddDeliveryApi(). Your CreateUmbracoBuilder method should look like this:

builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddDeliveryApi()
    .AddEngageApiDocumentation()
    .AddComposers()
    .Build();
  1. Rebuild and run your site.

  2. Navigate to /umbraco/swagger in your browser.

  3. Check for the Umbraco Engage API from the top right definition dropdown.

Umbraco Engage API

Last updated