Skip to content
Consent API (v3)

Consent API (v3)

The Consent v3 API requires Fides Cloud or Fides Enterprise. For more information, talk to our solutions team. (opens in a new tab)

The Consent v3 API is the new interface for managing privacy preferences in Fides. It provides a unified set of endpoints for writing, reading, and reporting on consent data, with support for flexible identity types, notice hierarchies, and fine-grained filtering.

For conceptual background on how Fides handles consent, see Consent records.

⚠️

The v3 API is actively being developed and does not yet support all the features of the Consent v1 API.

Endpoints overview

All v3 endpoints require OAuth authentication. Include a valid access token in the Authorization header: Authorization: Bearer <access_token>. See Generating OAuth tokens for how to obtain one.


EndpointMethodPurpose
/api/v3/definitions/identitiesGETList registered identity types
/api/v3/definitions/identitiesPOSTRegister an identity type
/api/v3/definitions/identities/{identity_key}DELETERemove an identity type
/api/v3/privacy-preferencesGETList preference records over time
/api/v3/privacy-preferencesPOSTSave preferences for an identity
/api/v3/privacy-preferences/currentGETGet current preferences for an identity
/api/v3/privacy-preferences/filter-statsPOSTCount records matching a filter

Writing preferences

Save preferences

POST /api/v3/privacy-preferences

Saves one or more consent preferences for an identity and returns the resulting current preferences.

Query parameters

ParameterTypeDescription
asyncbooleanWhen true, returns 202 Accepted and processes asynchronously. Default: false.
policystringPropagation policy to apply across notice hierarchies. Default: cascade_down_opt_out.
response_notice_keys[]string[]Filter which notice keys appear in the response. Does not affect what is saved.

Request body

FieldTypeRequiredDescription
identityobjectYesA map of identity keys to objects containing a value field. Built-in types like email and phone_number work out of the box; custom types must be registered as identity definitions first.
preferencesarrayYesList of preference objects.
preferences[].notice_keystringYesStable key identifying the privacy notice.
preferences[].notice_history_idstringYesVersion of the notice the user was shown.
preferences[].valuestringYesOne of: opt_in, opt_out, acknowledge.
preferences[].collected_atstringNoISO-8601 timestamp. Defaults to current server time if omitted.
preferences[].metaobjectNoPer-preference metadata. See Preference metadata.
metaobjectNoTop-level metadata about how and where consent was collected. See Preference metadata.

Example

curl -X POST 'http://localhost:8080/api/v3/privacy-preferences?policy=cascade_down_opt_out' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "identity": {
      "email": { "value": "user@example.com" }
    },
    "preferences": [
      {
        "notice_key": "marketing_advertising",
        "notice_history_id": "pri_notice-history-abc-123",
        "value": "opt_out"
      },
      {
        "notice_key": "analytics",
        "notice_history_id": "pri_notice-history-def-456",
        "value": "opt_in"
      }
    ],
    "meta": {
      "method": "banner",
      "url": "https://example.com/products"
    }
  }'

Response

Returns the current preferences document for the identity after the save. If async=true, returns 202 Accepted with no body.


Reading preferences

Get current preferences

GET /api/v3/privacy-preferences/current

Retrieves the effective current preferences for a specific identity. Includes saved preferences and default values for any active notices where no explicit choice exists.

Query parameters

ParameterTypeDescription
identity.<key>stringRequired. At least one identity filter. Format: identity.email=user@example.com.
notice_keys[]string[]Only return preferences for the specified notice keys.
include_descendantsbooleanWhen notice_keys is provided, also include descendant notices. Default: false.

Example

curl -X GET 'http://localhost:8080/api/v3/privacy-preferences/current?identity.email=user@example.com' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Accept: application/json'

Response

Returns the current preferences document with one entry per active notice. Each preference includes metadata indicating whether it was explicitly set, generated by a propagation policy, or assigned as a default.

List preference records

GET /api/v3/privacy-preferences

Retrieves stored preference records over time with cursor-based pagination. Supports filtering by identity, time window, and record type.

Query parameters

ParameterTypeDescription
identity.<key>stringFilter by identity. Format: identity.email=user@example.com. Any registered identity type is supported.
cursorstringPagination cursor from a previous response's next_cursor field.
sizeintegerRecords per page. Default: 100.
start_timestringISO-8601 timestamp. Records collected at or after this time.
end_timestringISO-8601 timestamp. Records collected at or before this time.
time_inclusivitystringBoundary behavior for time filters: both, start, end, or neither. Default: both.
include_latestbooleanInclude the most recent record per identity. Default: true.
include_historicalbooleanInclude older (non-latest) records. Default: true.

Example

curl -X GET 'http://localhost:8080/api/v3/privacy-preferences?identity.email=user@example.com&include_historical=true&size=50' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Accept: application/json'

Response

{
  "items": [
    {
      "identity": {
        "email": { "value": "user@example.com" }
      },
      "preferences": [
        {
          "notice_key": "marketing_advertising",
          "value": "opt_out",
          "collected_at": "2025-12-01T10:30:00Z"
        }
      ],
      "is_latest": true
    }
  ],
  "next_cursor": "eyJpZCI6ICIxMjM0NTY3ODkwIn0=",
  "total_count": 42
}

total_count is only included on the first page (when no cursor is supplied). Subsequent pages omit it to avoid the performance overhead.


Reporting

Count records

POST /api/v3/privacy-preferences/filter-stats

Returns an exact count of preference records matching the specified filters without returning the records themselves.

Request body

FieldTypeDescription
start_timestringISO-8601 timestamp.
end_timestringISO-8601 timestamp.
time_inclusivitystringOne of: both, start, end, neither.
include_latestbooleanInclude latest records in the count.
include_historicalbooleanInclude historical records in the count.

Example

curl -X POST 'http://localhost:8080/api/v3/privacy-preferences/filter-stats' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "start_time": "2025-01-01T00:00:00Z",
    "end_time": "2025-12-31T23:59:59Z",
    "include_latest": true,
    "include_historical": false
  }'

Preference metadata

Privacy preferences support metadata at two levels: a top-level meta object that describes the overall submission, and an optional per-preference meta on each individual preference item. Both levels accept arbitrary custom fields alongside a reserved fides namespace for standardized properties.

Top-level metadata

The top-level meta object captures context about how and where the preferences were collected. The fides namespace provides standardized fields for common consent metadata:

FieldTypeRead-onlyDescription
fides.geographystringNoThe user's geography
fides.methodstringNoHow consent was collected (e.g., button, dismiss, gpc, save)
fides.request_originstringNoThe request origin from headers
fides.truncated_ip_addressstringNoTruncated IP address for reporting
fides.recorded_urlstringNoThe referring URL from request headers
fides.user_agentstringNoThe user agent string
fides.property_idstringNoThe Fides property ID
fides.created_atstringYesISO-8601 timestamp of when the preference record was created in Fides

You can also include any custom key-value pairs alongside the fides namespace. Values can be strings, numbers, or nested objects:

{
  "meta": {
    "fides": {
      "geography": "US-CA",
      "method": "button",
      "property_id": "prop_123"
    },
    "campaign_id": "summer-2026",
    "source": {
      "platform": "mobile_app",
      "app_version": "3.2.1"
    }
  }
}

There are no restrictions on the keys or structure of custom metadata -- use whatever fields make sense for your reporting and auditing needs.

Per-preference metadata

Each preference item can also carry its own meta object. The fides namespace at this level supports:

FieldTypeRead-onlyDescription
fides.property_idstringNoThe Fides property ID where the preference was collected
fides.experience_config_history_idstringNoIdentifier for the experience config history
fides.preference_typestringYesHow the preference was created: explicit (user-submitted), policy (propagation policy-generated), or default (system-generated default)
fides.policy_keystringYesThe propagation policy that created this preference (only present when preference_type is policy)
fides.source_preferenceobjectYesThe explicit preference that triggered propagation (only present when preference_type is policy). Contains notice_key and notice_history_id of the source.

Custom fields are accepted here as well.


Identity definitions

Identity definitions register the identity types your organization uses for storing and querying preferences. For conceptual background, see Identities.

List identity definitions

GET /api/v3/definitions/identities

Returns all registered identity definitions.

curl -X GET 'http://localhost:8080/api/v3/definitions/identities' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Accept: application/json'

Register an identity definition

POST /api/v3/definitions/identities

Registers a new identity type for use with privacy preferences.

FieldRequiredDescription
identity_keyYesA unique key for the identity type (e.g., loyalty_id)
nameYesA human-readable display name
typeYesThe data type: string, uuid, integer, email, or phone_number
descriptionNoAn optional description
curl -X POST 'http://localhost:8080/api/v3/definitions/identities' \
  -H 'Authorization: Bearer <access_token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "identity_key": "loyalty_id",
    "name": "Loyalty ID",
    "type": "string"
  }'

Remove an identity definition

DELETE /api/v3/definitions/identities/{identity_key}

Unregisters an identity type.

curl -X DELETE 'http://localhost:8080/api/v3/definitions/identities/loyalty_id' \
  -H 'Authorization: Bearer <access_token>'