Experience

An experience is a hydrated representation of content authored in Contentful — the visual structure, personalization variants, and content of a published experience, ready for a client application to render.

The XDA returns experiences in two ways:

  • By ID — a straightforward GET request returns the hydrated experience.
  • With personalization input — a POST request lets you send personalization overrides in the request body, which the API applies while hydrating the experience.

Both operations support locale selection, variant targeting, and optimization profiles via query parameters.

Getting localized experiences

By default, a request to the experience endpoint returns the experience hydrated with content in the environment’s default locale:

GET https://xdn.contentful.com/spaces/{spaceId}/environments/{envId}/experiences/{expId}

To hydrate the experience with a different locale, add a locale query parameter with the locale code:

GET https://xdn.contentful.com/spaces/{spaceId}/environments/{envId}/experiences/{expId}?locale=en-US

Experience fields aren’t localized, so changing the locale never affects the layout or the personalization rules applied — the experience and its rules stay the same. Only the content pulled from bound entries and assets changes: if a bound entry or asset has localized fields, the API returns the value matching the requested locale, following the fallback chain configured for the environment’s locales.

Locale selection also applies when requesting a variant of an experience:

GET https://xdn.contentful.com/spaces/{spaceId}/environments/{envId}/experiences/{expId}?locale=en-US&variant=Experience:3foFgkr9iq8bWSZQtb2H1G:1b414538-5894-483a-9441-2cbfa65a0aab
On the production host, entries and assets must be published for the requested locale. Requesting a locale that hasn’t been published, or that doesn’t exist for the environment, returns a 404.