---
title: Setup and Using ESNI
slug: market-switching/setup-and-using-esni
docTags: 
createdAt: 2025-06-01T20:40:57.970Z
---

## Setup

## The ESNI Server&#x20;

To leverage Zixi’s ESNI implementation, please request that ESNI be enabled for your account by your Zixi account team. Once done, valid ESNI/SCTE-224 element XML payloads can be added to the ESNI database via **HTTP PUT**.

### URL Endpoint &#x20;

The production URL is: [https://esni.zen.zixi.com/](https://esni.zen.zixi.com/)**\<customer-zenmaster-prefix>/**

### Authentication&#x20;

Per ESNI standard, use [Amazon Signature version 4 for API Requests](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html).

:::hint{type="info"}
*Access Key and Secret Key can be rotated by request. Reach out to your Zixi account rep as required.*
:::



### HTTP Methods&#x20;

- **PUT** – Adding a new XML payload to the Database / Updating the XML payload in the database&#x20;
- **DELETE** – Removing an XML payload from the database&#x20;
- **GET** – Retrieving XML payloads from the database&#x20;

### XML HTTP PUT ordering&#x20;

Within the XML payloads are hrefs that reference other media elements. Referenced XMLs must be added to the database prior to broadcasting the media that references these XMLs.

1. Audience 
2. Viewingpolicy&#x20;
3. Policy&#x20;
4. Media&#x20;

## Working with ESNI Elements

**Media**, **Policy**, **ViewingPolicy**, and **Audience** all have **@lastUpdated** XML attributes. These **must** be updated each time a new ESNI element is posted. **If @lastUpdated is older than what is currently in the database, the XML will not update.**

:::hint{type="success"}
**Tip**: When using postman use this variable: `lastUpdated="{{$isoTimestamp}}"` to ensure current time stamp.
:::

## Adding an ESNI Element&#x20;

- **PUT**: https\://esni.zen.zixi.com/***\{customer-zenmaster-prefix}*/*\{element}****/*&#x69;d/of/element
- **BODY**: XML formatted Media
- When creating the other ESNI elements, replace “\{element}” from the URL above with the ESNI element type – **media**, **policy**, **viewingpolicy**, **audience**.

## Modifying/Viewing an ESNI Element&#x20;

- **PUT/GET**: https\://esni.zen.zixi.com/***\{customer-zenmaster-prefix}/\{element}***/id/of/element
- **BODY** for **PUT**: XML formatted Media with edits and updated **\<lastUpdated>** value.

## Deleting an ESNI Element&#x20;

- **DELETE: &#x20;**&#x68;ttps\://esni.zen.zixi.com/***\{customer-zenmaster-prefix}/\{element}***/id/of/element
- **BODY**: empty

## Viewing all elements of a certain type in the database

- **GET:** https\://esni.zen.zixi.com/***\{customer-zenmaster-prefix}***/?role=***\{element}***
- Replace “***\{element}***” from the URL above with a capitalized version of the ESNI element type – **Media**, **Policy**, **ViewingPolicy**, **Audience**.

## Validating ESNI element XML&#x20;

**PUT**: https\://esni.zen.zixi.com/***\{customer-zenmaster-prefix}***/\_\_validate

**BODY:&#x20;**&#x58;ML formatted Media

This request will return any errors in the XML preventing a successful upload

## Checking Zixi ESNI Decisioning service version

**GET**: https\://esni.zen.zixi.com/***\{customer-zenmaster-prefix}***/\_\_status/about

**BODY**: empty

### Configuration notes:

1. Audience tags. By default, the Zixi ESNI backend will only be aware of audience ID’s, Vird tags and DMA tags for associating ZEN Master Targets with Audience files for timing optimization purposes. Options can be added as needed.
2. UPID Formats. By default, SCTE-224 UPID asserts will match with SCTE-35 payloads presented in Hex, Base64, or Text. If your deployment requires this to be limited to a specific format, this can be arranged.
3. Schedule offset. Depending on upstream workflows, streaming latency can cause a timing disparity between UTC schedule timing and currently displayed content on the stream. An offset can be applied so that matchTime and SCTE-35 effective windows align with video stream.

