Lytics Personalization API

Entity API, ie Personalization or Profile API. Retrieve attributes and segments an entity (most likely a user) is a member of. The *Entity* is a *User* most likely, but since Lytics is organized as a Graph Database, other types of entities may be modeled such as Accounts, or Company, Content, or custom. ``` # read a single user curl -s -H "Authorization: $LIOKEY" \ -XGET "https://api.lytics.io/api/entity/user/user_id/user123" | jq '.' ```

Operations 5

GET /api/me/{fieldname}/{fieldval} User Me #
GET /api/entity/{table}/{fieldname}/{fieldval} Personalization #
DELETE /api/entity/{table}/{fieldname}/{fieldval} Profile Delete Request #
GET /api/entity/{table}/{fieldval} Web Personalization #
GET /api/entity/deletestatus/{request_id} ProfileDeletion Status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lytics-personalization-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lytics-personalization-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: V1 Lytics Personalization API
  version: 1.0.0
  description: 'The Lytics API is a _restful_ *JSON* api that includes:

    * *Data Collection* api''s for collection, and upload of custom data.'
servers:
- url: https://api.lytics.io
tags:
- name: Personalization
  description: 'Entity API, ie Personalization or Profile API.


    Retrieve attributes and segments an entity (most likely a user) is a member of.


    The *Entity* is a *User* most likely, but since Lytics is organized as a Graph Database,

    other types of entities may be modeled such as Accounts, or Company, Content, or custom.


    ```

    # read a single user

    curl -s -H "Authorization: $LIOKEY" \

    -XGET "https://api.lytics.io/api/entity/user/user_id/user123" | jq ''.''


    ```'
paths:
  /api/me/{fieldname}/{fieldval}:
    get:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalizationModel'
              examples:
                response:
                  value:
                    data:
                      segments:
                      - email_us_based
                      - web_users
                      - all
                    message: success
                    meta:
                      by_fields:
                      - user_id
                      - email
                      - fbuid
                      - _uids
                      format: json
                      name: user
                    status: 200
      security:
      - ApiKeyAuth: []
      summary: User Me
      operationId: User Me
      description: Get single User Entity. This is an alias for `/api/entity/user`.
      tags:
      - Personalization
      parameters:
      - name: account_id
        in: query
        description: Your Lytics account ID.
        required: false
        schema:
          type: string
      - name: fieldname
        in: path
        description: Field name of identity to use as lookup
        required: true
        example: email
        schema:
          type: string
      - name: fieldval
        in: path
        description: Field value of identity
        required: true
        example: bob@gmail.com
        schema:
          type: string
      - name: fields
        in: query
        description: comma delimited field list to be returned
        required: false
        example: name,org,city
        schema:
          type: string
      - name: fieldBlocklist
        in: query
        description: comma delimited list of fields to exclude
        required: false
        example: name,org,city
        schema:
          type: string
      - name: include_fields
        in: query
        description: if true include all the whitelisted fields
        required: false
        example: true
        schema:
          type: boolean
      - name: segments
        in: query
        description: Should segments this user is member of be included?
        required: false
        example: 'true'
        schema:
          type: boolean
          default: 'true'
      - name: meta
        in: query
        description: Should Meta Fields be included?
        required: false
        example: 'true'
        schema:
          type: boolean
          default: 'true'
      - name: download
        in: query
        description: Should the content-disposition header set to attachment to download the user as a file?
        required: false
        example: 'false'
        schema:
          type: boolean
          default: 'false'
  /api/entity/{table}/{fieldname}/{fieldval}:
    get:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalizationModel'
              examples:
                response:
                  value:
                    data:
                      segments:
                      - email_us_based
                      - web_users
                      - all
                    message: success
                    meta:
                      by_fields:
                      - user_id
                      - email
                      - fbuid
                      - _uids
                      format: json
                      name: user
                    status: 200
      security:
      - ApiKeyAuth: []
      summary: Personalization
      operationId: Personalization
      description: 'Get single User Entity.


        ```

        # get user whose user_id = user123

        curl -s -H "Authorization: $LIOKEY" \

        -XGET "https://api.lytics.io/api/entity/user/user_id/user123" | jq ''.''


        # get user whose email = aaron@aaron.com

        curl -s -H "Authorization: $LIOKEY" \

        -XGET "https://api.lytics.io/api/entity/user/email/aaron@aaron.com" | jq ''.''


        ```'
      tags:
      - Personalization
      parameters:
      - name: account_id
        in: query
        description: Your Lytics account ID.
        required: false
        schema:
          type: string
      - name: table
        in: path
        description: ''
        required: true
        schema:
          type: string
          default: user
      - name: fieldname
        in: path
        description: ''
        required: true
        schema:
          type: string
          default: _uid
      - name: fieldval
        in: path
        description: Field value of identity
        required: true
        example: bob@gmail.com
        schema:
          type: string
      - name: fields
        in: query
        description: comma delimited field list to be returned
        required: false
        example: name,org,city
        schema:
          type: string
      - name: fieldBlocklist
        in: query
        description: comma delimited list of fields to exclude
        required: false
        example: name,org,city
        schema:
          type: string
      - name: include_fields
        in: query
        description: if true include all the whitelisted fields
        required: false
        example: true
        schema:
          type: boolean
      - name: segments
        in: query
        description: Should segments this user is member of be included?
        required: false
        example: 'true'
        schema:
          type: boolean
          default: 'true'
      - name: meta
        in: query
        description: Should Meta Fields be included?
        required: false
        example: 'true'
        schema:
          type: boolean
          default: 'true'
      - name: download
        in: query
        description: Should the content-disposition header set to attachment to download the user as a file?
        required: false
        example: 'false'
        schema:
          type: boolean
          default: 'false'
    delete:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileDeletionModel'
              examples:
                response:
                  value:
                    status: 200
                    message: delete request received
                    data:
                      request_id: e9d5f2d3d2c7a7d0e801-1526083200
                      complete: false
      security:
      - ApiKeyAuth: []
      summary: Profile Delete Request
      operationId: Profile Delete Request
      description: 'Deletes a single Entity (normally a user).


        This API persists a deletion event for the particular profile provided. This operation is asynchronous; it will take

        some time for the profile to be removed from downstream databases and indexes. This request returns a "request_id"

        which may be used to determine the status of that deletion. While the profile may become unavailable quickly, it may

        take a while for the full process to complete since it includes all archived historic data.


        ```

        # Delete user whose "user_id" = "userdeleteme12"

        # user_id can be any by-field


        curl -s -H "Authorization: $LIOKEY" \

        -XDELETE "https://api.lytics.io/api/entity/user/user_id/userdeleteme12" | jq ''.''


        ```


        **Use Cases**


        * *GDPR* right to be forgotten, a user asks for profile to be deleted.'
      tags:
      - Personalization
      parameters:
      - name: account_id
        in: query
        description: Your Lytics account ID.
        required: false
        schema:
          type: string
      - name: table
        in: path
        description: ''
        required: true
        schema:
          type: string
          default: user
      - name: fieldname
        in: path
        description: Field name of identity to use as lookup (could be email, user_id, etc)
        required: true
        example: _uid
        schema:
          type: string
      - name: fieldval
        in: path
        description: Field value of identity
        required: true
        example: bob@gmail.com
        schema:
          type: string
  /api/entity/{table}/{fieldval}:
    get:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalizationModel'
              examples:
                response:
                  value:
                    data:
                      segments:
                      - email_us_based
                      - web_users
                      - all
                    message: success
                    meta:
                      by_fields:
                      - user_id
                      - email
                      - fbuid
                      - _uids
                      format: json
                      name: user
                    status: 200
      security:
      - ApiKeyAuth: []
      summary: Web Personalization
      operationId: Web Personalization
      description: 'Get single User Entity using cookie id. This is same as entity api

        but you don''t specify a `fieldname` (user_id, email, etc) and instead it only uses the cookie identifier.'
      tags:
      - Personalization
      parameters:
      - name: account_id
        in: query
        description: Your Lytics account ID.
        required: false
        schema:
          type: string
      - name: table
        in: path
        description: Field value of data table
        required: true
        example: user
        schema:
          type: string
      - name: fieldval
        in: path
        description: Field value of identity
        required: true
        example: bob@gmail.com
        schema:
          type: string
      - name: fields
        in: query
        description: comma delimited field list to be returned
        required: false
        example: name,org,city
        schema:
          type: string
      - name: fieldBlocklist
        in: query
        description: comma delimited list of fields to exclude
        required: false
        example: name,org,city
        schema:
          type: string
      - name: include_fields
        in: query
        description: if true include all the whitelisted fields
        required: false
        example: true
        schema:
          type: boolean
      - name: segments
        in: query
        description: Should segments this user is member of be included?
        required: false
        example: 'true'
        schema:
          type: boolean
          default: 'true'
      - name: meta
        in: query
        description: Should Meta Fields be included?
        required: false
        example: 'true'
        schema:
          type: boolean
          default: 'true'
      - name: download
        in: query
        description: Should the content-disposition header set to attachment to download the user as a file?
        required: false
        example: 'false'
        schema:
          type: boolean
          default: 'false'
  /api/entity/deletestatus/{request_id}:
    get:
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileDeletionModel'
              examples:
                response:
                  value:
                    status: 200
                    message: delete request received
                    data:
                      request_id: e9d5f2d3d2c7a7d0e801-1526083200
                      complete: false
      security:
      - ApiKeyAuth: []
      summary: ProfileDeletion Status
      operationId: ProfileDeletion Status
      description: Retrieves the status of a submitted deletion event.
      tags:
      - Personalization
      parameters:
      - name: account_id
        in: query
        description: Your Lytics account ID.
        required: false
        schema:
          type: string
      - name: request_id
        in: path
        description: RequestID of previously submitted deletion event
        required: true
        example: e9d5f2d3d2c7a7d0e801-1526083200
        schema:
          type: string
components:
  schemas:
    PersonalizationModel:
      type: object
      properties:
        data:
          type: object
          properties:
            segments:
              type: array
              items:
                type: string
        message:
          type: string
        meta:
          type: object
          properties:
            by_fields:
              type: array
              items:
                type: string
            format:
              type: string
            name:
              type: string
        status:
          type: number
      example:
        data:
          segments:
          - email_us_based
          - web_users
          - all
        message: success
        meta:
          by_fields:
          - user_id
          - email
          - fbuid
          - _uids
          format: json
          name: user
        status: 200
    ProfileDeletionModel:
      type: object
      properties:
        status:
          type: number
        message:
          type: string
        data:
          type: object
          properties:
            request_id:
              type: string
            complete:
              type: boolean
      example:
        status: 200
        message: delete request received
        data:
          request_id: e9d5f2d3d2c7a7d0e801-1526083200
          complete: false
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: Authorization
      type: apiKey
x-readme:
  explorer-enabled: true
  proxy-enabled: true