Skip to content

User Management (Widget) ​

Widget Integration

The endpoints below are for widget integration (analytics, personalization, data endpoints).

All Partner API requests require a PARTNER_KEY in the Authorization header:

http
Authorization: Bearer PARTNER_KEY

Getting Your Partner Key

Contact [email protected] to become a partner and receive your API key.

Create User ​

Create a partner user mapping for analytics and personalization.

http
POST /partners/v1/users

Request ​

json
{
  "userId": "user_456",
  "email": "[email protected]",
  "metadata": {
    "plan": "pro",
    "signupDate": "2024-01-15"
  }
}

Response ​

json
{
  "id": "am_user_abc123",
  "userId": "user_456",
  "partnerId": "partner_xyz",
  "createdAt": "2024-01-15T10:30:00Z"
}

Get User Stats ​

Retrieve usage statistics for a user.

http
GET /partners/v1/users/{userId}/stats

Response ​

json
{
  "userId": "user_456",
  "stats": {
    "totalAnalyses": 42,
    "browserModeRuns": 35,
    "serverModeRuns": 7,
    "lastActiveAt": "2024-03-15T14:22:00Z",
    "widgetUsage": {
      "keyDrivers": 20,
      "interestingColumns": 15,
      "clustering": 5,
      "aiChat": 2
    }
  }
}

Partner Documentation