Adding Privacy Center Configuration to Properties
A default property is automatically created for you. You can manage your privacy center configuration through the API or by directly editing configuration files.
Recommended: API-based Configuration
The recommended way to configure your privacy center is through the API by linking your privacy center configurations to one of your properties. This method requires Fides Cloud or Fides Enterprise and provides additional features:
- Support for unique privacy center configurations for each property (see Multiple Privacy Centers)
- Different appearances for each Property
- Location-based actions
Adding Privacy Center Configuration to Your Property
- List your properties by calling
GET /api/v1/plus/properties
to get your property ID - Update the property using
PUT /api/v1/plus/property/{property_id}
with your desiredprivacy_center_config
and/orstylesheet
- (Optional) Create a new property and add your configuration to it by:
- First creating a new property via the admin UI
- Then calling
POST /api/v1/plus/property
with your configuration
Note: For API authentication, see the API Authentication documentation.
The request body adds three new properties to your existing property configuration:
{
"privacy_center_config": {
// See example config.json
},
"stylesheet": "body { background-color: cyan; }",
"paths": ["/"]
}
privacy_center_config
The main configuration object that defines your privacy center's behavior and content. See an example of the privacy_center_config structure (opens in a new tab) for all available configuration options.
stylesheet
Custom CSS styles to control the visual appearance of your privacy center. This field contains the CSS content that would otherwise be in config.css
. See an example with customizable CSS variables (opens in a new tab) and the Appearance section for styling examples and best practices.
paths
Defines which URLs your privacy center configuration applies to. This property allows you to set different paths for each of your properties on the same domain. See the Multiple Privacy Centers section for examples and configuration details.
File-Based Configuration
Configure your privacy center by editing config.json
and config.css
in your privacy center's configuration directory.
This method is simpler but has limitations:
- Cannot manage multiple privacy centers
- Cannot set different styles for different Properties
- Cannot use location-based actions
- Changes require direct file access and deployment
For detailed configuration options, see Consent Options and Appearance.
Migrating to API-based Configuration
If you're currently using file-based configuration and want to migrate to API-based configuration:
-
Backup Current Configuration
- Make a copy of your existing
config.json
andconfig.css
files - Keep these backups until you've verified the migration
- Make a copy of your existing
-
Get Your Property ID
- Call
GET /api/v1/plus/properties
to list your properties - Note your default property ID
- Call
-
Update Property Configuration
{ "privacy_center_config": { /* Your existing config.json content */ }, "stylesheet": "/* Your existing config.css content */", "paths": ["/"] }
- Use
PUT /api/v1/plus/property/{property_id}
to update your property
- Use
-
Update Consent Experiences
- If you have any consent experiences of the privacy center type, update them to match your default property
- This ensures your consent management continues to work with the new API-based configuration
- See Privacy Center Properties for more details
-
Enable API Configuration
- Fides Cloud: Contact support to enable
FIDES_PRIVACY_CENTER__USE_API_CONFIG=true
- Self-hosted: Set
FIDES_PRIVACY_CENTER__USE_API_CONFIG=true
in your deployment configuration
- Fides Cloud: Contact support to enable
-
Verify Configuration
- Your privacy center should maintain the same appearance and behavior
- Try making a small change to styles or text to confirm it's manageable through the API
Admin UI Privacy Requests Configuration
Note: This configuration will no longer be required in a future release as it will be handled through the API-based configuration.
If you want to submit privacy requests from the Admin UI, you'll need to submit part of your privacy center configuration to a separate endpoint. This configuration defines the available privacy request types and their required fields in the Admin UI.
Here's an example of the configuration you can submit to PUT /api/v1/plus/privacy-center-config
:
{
"actions": [
{
"policy_key": "default_access_policy",
"title": "Access your data",
"identity_inputs": {
"email": "required"
},
"custom_privacy_request_fields": {
"site_id": {
"label": "Site ID",
"required": false,
"hidden": false
}
}
},
{
"policy_key": "default_erasure_policy",
"title": "Erase your data",
"identity_inputs": {
"email": "required"
}
}
]
}
This configuration should match the relevant parts of your privacy center configuration. All features available in the Privacy Center, such as policies, custom identities, and custom privacy request fields, can be configured for the Admin UI as well.