---
updatedAt: 2026-09-29T23:38:36.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Add Interest To A User

This pixel endpoint adds an Interest to a specific UserKey via query params. Calling this endpoint multiple times will add multiple Interests.

> 📘
>
> [Interests](https://dev.kevel.com/docs/interest-targeting) are also called Flight Categories. To see what Interests have already been created in the system, you'll want to use the [List Network Categories Endpoint](https://dev.kevel.com/reference/list-network-categories) or [List Flight Categories Endpoint](https://dev.kevel.com/reference/flight-categories-list).

> 👍
>
> Note that the user key supplied in the `user` object will override a user key set via the `azk` cookie.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "userdb",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://e-{networkId}.adzerk.net/udb/{networkId}",
      "variables": {
        "networkId": {
          "default": "networkId"
        }
      }
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/interest/i.gif?userKey={UserKey}&interest={interest}": {
      "get": {
        "summary": "Add Interest To A User",
        "description": "This pixel endpoint adds an Interest to a specific UserKey via query params.  Calling this endpoint multiple times will add multiple Interests.",
        "operationId": "add-interest-to-user",
        "parameters": [
          {
            "name": "userKey",
            "in": "query",
            "description": "UserDB ID for the user",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interest",
            "in": "query",
            "description": "The interest category friendly name you want to tie to the user",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "property",
            "in": "query",
            "description": "Appends one or more key/value pairs to be shipped to UserDB logs. In the format `?property:Key1=Value&property:Key2=Value` etc.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "networkId",
            "in": "path",
            "description": "Your account (network) ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "[Returns a 1x1 transparent GIF image]"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl \"https://e-23.adzerk.net/udb/23/interest/i.gif?userKey=ue1-e397eb5990&interest=Sports\""
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/decision-sdk');\n\n// Demo network ID; find your own via the Adzerk UI!\nlet client = new Adzerk.Client({networkId: 23});\nclient.userDb.addInterest(\"ue1-e397eb5990\", \"Sports\");"
            },
            {
              "language": "java",
              "code": "import com.adzerk.sdk.*;\nimport com.adzerk.sdk.generated.ApiException;\n\npublic class AddInterestUserDB {\n  public static void main(String[] argv) throws ApiException {\n    // Demo network ID; find your own via the Adzerk UI!\n    Client client = new Client(new ClientOptions(23));\n    client.userDb().addInterest(\"ue1-e397eb5990\", \"Sports\");\n  }\n}  "
            },
            {
              "language": "python",
              "code": "import adzerk_decision_sdk\n\n# Demo network ID; find your own via the Adzerk UI!\nclient = adzerk_decision_sdk.Client(23)\nclient.user_db.add_interest(\"ue1-e397eb5990\", \"Sports\")"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk_decision_sdk\"\n\n# Demo network ID; find your own via the Adzerk UI!\nclient = AdzerkDecisionSdk::Client.new(network_id: 23)\nclient.user_db.add_interest(\"ue1-e397eb5990\", \"Sports\")"
            },
            {
              "language": "clojure",
              "code": "(ns add-interest-userdb-sample\n  (:import (com.adzerk.sdk Client ClientOptions)))\n\n(defn -main []\n  ; Demo network ID; find your own via the Adzerk UI!\n  (let [client (Client. (doto (ClientOptions. (int 23))))]\n    (-> client (.userDb) (.addInterest \"ue1-e397eb5990\" \"Sports\"))))"
            },
            {
              "language": "swift",
              "code": "import AdzerkSDK\n\n// Demo network ID; find your own via the Kevel UI!\nDecisionSDK.defaultNetworkId = 23\n\nlet keyStore = UserKeyStoreKeychain()\nkeyStore.save(userKey: \"abc\")\n\nlet client = DecisionSDK(keyStore: keyStore)\n\nclient.userDB().addInterest(\"Sports\") {response in\n  dump(response)\n}"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "java",
            "python",
            "ruby",
            "clojure",
            "swift"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```