openapi: 3.0.2 info: title: Personalization API description: | The Personalization API lets you access user profiles built from the personalization strategy. ## Base URLs The base URLs for requests to the Personalization API are: - `https://personalization.us.algolia.com` - `https://personalization.eu.algolia.com` Use the URL that matches your [analytics region](https://dashboard.algolia.com/account/infrastructure/analytics). **All requests must use HTTPS.** ## Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Request bodies must be JSON objects. ## Response status and errors The Personalization API returns JSON responses. Since JSON doesn't guarantee any specific ordering, don't rely on the order of attributes in the API response. Successful responses return a `2xx` status. Client errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` property with more information. ## Version The current version of the Personalization API is version 1, as indicated by the `/1/` in each endpoint's URL. version: 1.0.0 externalDocs: url: https://www.algolia.com/doc/guides/personalization/what-is-personalization/ description: | Related guide: Algolia Personalization. components: securitySchemes: appId: $ref: '../common/securitySchemes.yml#/appId' apiKey: $ref: '../common/securitySchemes.yml#/apiKey' servers: - url: https://personalization.{region}.algolia.com variables: region: enum: - us - eu default: us security: - appId: [] apiKey: [] tags: - name: profiles x-displayName: Profiles description: | User profiles represent the affinities each user profile has for the different facets in your index. The more a user viewed and clicked search results with a specific facet, the higher the affinity for that facet. - name: strategies x-displayName: Strategies description: | The personalization strategy defines how personalization should affect the search results, and how much each facet and event type impact the personalization. x-tagGroups: - name: General tags: - profiles - strategies paths: # ###################### # ### Custom request ### # ###################### /{path}: $ref: '../common/paths/customRequest.yml' /1/profiles/personalization/{userToken}: $ref: 'paths/getUserTokenProfile.yml' /1/profiles/{userToken}: $ref: 'paths/deleteUserProfile.yml' /1/strategies/personalization: $ref: 'paths/personalizationStrategy.yml' # ############### # ### Helpers ### # ############### /setClientApiKey: $ref: '../common/helpers/setClientApiKey.yml#/method'