Create and configure Context API engines, including access controls and attribute selection.
Context API must be enabled for your account before you can create engines. Contact support to enable it.
Create an engine
Ensure profile changes have been published before selecting engine attributes.
The Filter Rule field in the details screen is only visible after the profile has been migrated to versioned storage. For more information, see Migrate engine configuration.
To create an engine, complete the following steps:
Go to Activate > Context API and click + New Engine.
In the Details screen, configure the following engine details:
- Name: Enter a name for the engine.
- Enable Engine: Toggle the engine on and off. The engine endpoint is off by default. Data for visitors becomes available after you enable the engine and visitors log active sessions and generate events in the system.
Authentication and Allow PII are only available by request. If you are interested in trying these features, contact support.
- Authentication: Controls whether requests to this endpoint require authentication.
- Public (default): Any caller with the engine ID can call the endpoint.
- Require Authentication: Only authenticated clients can call the engine. Unauthenticated requests return a 401 error. Callers must subscribe to the Context API in the Developer Portal and include a bearer token in the
Authorizationheader. For more information, see Developer Portal subscriptions.
- Allow PII: Available only when Require Authentication is selected. When on, restricted (PII-marked) attributes are available for selection in the Response screen alongside standard attributes. Nothing is selected automatically.
- Turning off Allow PII removes all restricted attributes from the engine immediately. A confirmation dialog lists the affected attributes before the change takes effect. These attributes cannot be restored.
- Turning off Allow PII does not delete previously saved PII. To make previously stored data inaccessible, purge the engine data after turning off Allow PII. For more information, see Purge data.
- Switching back to Public turns off Allow PII automatically and triggers the same confirmation dialog.
- Filter Rule: Optionally add a rule to limit which visitors are written to and read from this engine. For more information, see About Context API: Filter rule.
- Domain Allow List: Specify domains that can use this endpoint. For more information, see About Context API: Domain allow list.
Click Next.
In the Response screen, select the audiences, badges, and attributes to include in the engine. Verify your selections using the Example Response panel.
If you use the Select all current and future audiences feature, if an audience is deleted later, it could still be included in the Context API engine until you purge the engine data or the data expires.
Select whether to use the ID (UID) or name for audiences and visitor attributes in the payload. Using audience, badge, and attribute names instead of IDs in large responses may impact payload size.
Click Next to create the engine.
On the Summary screen, review endpoint details, including the unique endpoint URL.
Click Done, then click Save and Publish to apply the engine configuration.
Visitor data is collected after the engine is enabled and your visitors have active sessions.
Edit engine
To edit an engine, go to the Context API screen and click the engine you want to update. From the edit screen, you can update the engine details and response configuration, purge engine data, toggle engines on and off, and adjust authentication and PII settings.
Turning off Allow PII from the edit screen triggers the same confirmation dialog described in Create an engine.
Click Save and Publish after editing an engine to apply your changes.
Add a filter rule
The Filter Rule section is only visible after the profile has been migrated to versioned storage. If you do not see it, see Migrate engine configuration.
A filter rule limits which visitors are written to and read from an engine. For a conceptual overview, see About Context API: Filter rule.
To add a filter rule to an existing engine:
- Go to Activate > Context API and click the engine you want to update.
- In the Details tab, go to the Filter Rule section.
- Click + Add Rule.
- In the rule builder, configure the conditions using visitor attributes. Only visitor attributes are available. The has changed operator is not available.
- Click Save.
After the filter rule is active, only visitors that match the conditions are written to and returned from the engine. Visitors that do not match return a 404 on read.
To remove a filter rule, open the Filter Rule section, click the drop-down arrow next to + Add Rule, and select Remove rule.
Purge data
We recommend purging engine data in the following situations:
- Renaming or deleting an audience, badge, or attribute included in your engine configuration.
- Removing an audience, badge, or attribute from an engine configuration.
- Turning off Allow PII on an engine. Restricted attributes are removed from future responses immediately, but previously stored data remains in the engine until you purge. Purging makes that data inaccessible.
For more information about purging data, see About Context API: Purge data.
Context API provides two ways for you to purge engine data when needed:
- In the Context API screen, click the action menu next to the engine you want to purge data from and select Purge Data.
- In the Edit Engines screen, click Purge Data from the slideout actions.
After a data purge, previously stored engine data is no longer returned.
Migrate engine configuration
Starting September 30, 2026, Context API engine configurations are moving into the standard save and publish workflow. After migration, engine configuration changes are versioned and roll back with your profile.
To help you migrate your legacy configuration, a migration pop-up appears when you log in. The pop-up explains the migration and gives you the option to migrate or dismiss the message and migrate later.
The migration pop-up appears when all of the following conditions are met:
- You have publish permissions on the profile.
- The profile is on its current published version.
- There are no other pending unsaved changes.
Users without publish permissions are not prompted to migrate and can continue using Context API as normal. To complete the migration, a user with publish permissions must accept the prompt and click Save and Publish.
If you select Not now, the prompt closes and reappears on future page loads until you complete the migration.
To migrate your engine configuration:
- When the migration prompt appears, click Migrate engines.
- Click Save and Publish to apply the changes and complete the migration.
Accepting the migration prompt moves your existing engine configuration to the save and publish workflow. No engines are deleted or replaced. Engine configuration is versioned going forward from the point of migration. Changes made before migration are not retroactively versioned.
New engines are versioned on profiles that have already completed migration. New engines added to profiles that have not yet migrated are not versioned until migration is complete.
This page was last updated: September 30, 2026