Contentful Personalization & Analytics
    Preparing search index...

    Configuration for ExperienceApiClient.

    interface ExperienceApiClientConfig {
        baseUrl?: string;
        clientId: string;
        enabledFeatures?: Feature[];
        environment?: string;
        fetchOptions?: Omit<ProtectedFetchMethodOptions, "apiName">;
        ip?: string;
        locale?: string;
        plainText?: boolean;
        preflight?: boolean;
    }

    Hierarchy (View Summary)

    • ApiConfig
    • RequestOptions
      • ExperienceApiClientConfig
    Index

    Properties

    baseUrl?: string

    Base URL for the API.

    When omitted, the concrete client is expected to construct full URLs internally.

    clientId: string

    Client identifier used for authentication or tracking.

    enabledFeatures?: Feature[]

    Enabled features (for example, "ip-enrichment") which the API should use for this request.

    When omitted, a default set of features may be applied.

    environment?: string

    Contentful environment identifier.

    Defaults to main when not provided.

    fetchOptions?: Omit<ProtectedFetchMethodOptions, "apiName">

    Options used to configure the underlying protected fetch method.

    apiName is derived from the client name and must not be provided here.

    ip?: string

    IP address to override the API behavior for IP analysis.

    Commonly used in ESR or SSR environments, as the API would otherwise use the server IP.

    locale?: string

    Locale used to translate location.city and location.country.

    When omitted, a server-side default may be used.

    plainText?: boolean

    When true, sends performance-critical endpoints in plain text.

    The Ninetailed API accepts certain endpoints in plain text to avoid CORS preflight requests, which can improve performance in browser environments.

    preflight?: boolean

    When true, instructs the API to aggregate a new profile state but not store it.

    This is commonly used in ESR or SSR environments where you want to preview the result without persisting changes.