Overview

This Experience API is for Contentful Personalization use. If you are looking for the documentation for Studio, see the Studio section.

Overview

The Experience API is the core of Contentful Personalization. It returns profiles, JSON representations of visitors and their activity, in response to events. The Experience API is highly performant because of its deployment on the edge.

Response envelope

All Experience API responses use a standard envelope:

Success (200):

1{
2 "data": { ... },
3 "error": null,
4 "message": "ok"
5}

Error:

1{
2 "message": "<description>",
3 "data": {},
4 "error": {
5 "code": "ERR_..."
6 }
7}

The data field contains the response payload on success. On error, data is an empty object and error contains a machine-readable error code.

Error responses

All endpoints can return the following errors:

HTTPerror.codeCause
400ERR_INVALID_DATARequest body or query parameters fail validation.
404ERR_CONFIG_NOT_FOUNDOrganization or environment not found.
404ERR_PROFILE_NOT_FOUNDProfile ID does not exist.
404ERR_NAMESPACE_MISMATCHProfile belongs to a different organization/environment.
429ERR_PROFILE_OVERLOADToo many concurrent requests to this profile’s state. To resolve this issue, send events less frequently, e.g. by implementing a backoff.
500ERR_INTERNAL_SERVER_ERRORUnhandled server error.