Links the current anonymous session to a known user. Call this after the user logs in or when you know who they are.
Parameters
UserData
required
User identity data.
Show child attributes
string
required
Your application’s unique user ID (external ID).
string
User’s email address.
string
User’s first name.
string
User’s last name.
string
User’s display name. Fallback when firstName is not provided: the
first word becomes firstName, the rest becomes lastName.
string
User’s preferred language (e.g. fr, en) — used for widget and
campaign localization.
object
Account/company the user belongs to. Must include an id field.
Show child attributes
string
required
Your application’s unique account ID (external ID).
PlanItem[]
Reserved structured attribute — the account’s commercial plans.
Sending plans replaces the account’s plan list; an empty array
clears it; omitting it leaves plans unchanged. See
Plans for the full contract.
any
Any additional keys are stored as account custom attributes.
string
HMAC hash for identity verification (prevents impersonation).
any
Any additional custom attributes are stored on the user profile.
On first call (anonymous → identified), the SDK re-authenticates with the widget to get a user-scoped JWT.
If the user switches accounts (different account.id), the session is rotated and replay restarts.
Custom attributes (any key beyond id, email, firstName, lastName, name, language, account, userHash, disableReplay) are stored as user properties and can be used in segments and campaigns.
Logout
To clear the user identity and return to anonymous mode:
Hacktionbase.logout();
This rotates the session, clears stored identity, and re-authenticates anonymously.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Hacktionbase Docs","colors":{"primary":"#4F46E5","light":"#818CF8","dark":"#3730A3"},"logo":{"light":"https://mintcdn.com/hacktionbase/brfDCAe_O_oSJnno/logo/light.png?fit=max\u0026auto=format\u0026n=brfDCAe_O_oSJnno\u0026q=85\u0026s=1f705eb4eb26a279a5314cb5da5ce1fc","dark":"https://mintcdn.com/hacktionbase/DHW5o5fBGGnBP4N8/logo/dark.png?fit=max\u0026auto=format\u0026n=DHW5o5fBGGnBP4N8\u0026q=85\u0026s=a7446fddb725a26de103ade90d20efc5"},"favicon":"https://mintcdn.com/hacktionbase/KuXKwoTWGSb7vDGq/favicon.svg?fit=max\u0026auto=format\u0026n=KuXKwoTWGSb7vDGq\u0026q=85\u0026s=89c514936b1e795542e9f52be2df1ed5","api":{"openapi":"api-reference/openapi.yaml"},"navbar":{"links":[{"href":"mailto:support@hacktionbase.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.hacktionbase.com"}},"footer":{"socials":{"x":"https://x.com/hacktionbase","github":"https://github.com/hacktionbase"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://auth.hacktionbase.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hacktionbase","hasAudioNarration":false,"actualSubdomain":"hacktionbase","customDomains":["docs.hacktionbase.com"],"gitSource":{"type":"github","owner":"backoffsolutions","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10dafd9ffae5051c40f171"},"entitlements":{},"buildId":"6ae94a3fad87a8c861a813f7:success","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"Guides","count":24},{"language":"default","tag":"API Reference","count":10},{"language":"default","tag":"Concepts","count":8},{"language":"default","tag":"SDK Reference","count":8},{"language":"default","tag":"Endpoints","count":6},{"language":"default","tag":"Widget","count":6},{"language":"default","tag":"Contacts","count":3},{"language":"default","tag":"Getting Started","count":2},{"language":"default","tag":"Overview","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"new-design-system/project/tokens.css","content":":root,.hb-dark{--hb-bg: #07070C;--hb-surface-0: #0B0B14;--hb-surface-1: #11111E;--hb-surface-2: #181828;--hb-surface-3: #1F1F33;--hb-surface-glass: rgba(20, 20, 36, 0.62);--hb-border: rgba(255,255,255,0.06);--hb-border-strong: rgba(255,255,255,0.12);--hb-border-focus: rgba(120, 130, 255, 0.55);--hb-fg: #ECECF5;--hb-fg-muted: #9A9AB0;--hb-fg-subtle: #5C5C72;--hb-fg-inverse: #0B0B14;--hb-blue: #4A6BFF;--hb-violet: #8B5BFF;--hb-cyan: #2EC8FF;--hb-pink: #FF4DB8;--hb-grad-primary: linear-gradient(135deg, #2EC8FF 0%, #4A6BFF 32%, #8B5BFF 66%, #FF4DB8 100%);--hb-grad-soft: linear-gradient(135deg, rgba(46,200,255,0.22), rgba(139,91,255,0.22));--hb-grad-text: linear-gradient(90deg, #ECECF5 0%, #A8B6FF 45%, #C99AFF 75%, #FF8FD1 100%);--hb-glow-blue: 0 0 36px rgba(74,107,255,0.55);--hb-glow-violet: 0 0 36px rgba(139,91,255,0.55);--hb-success: #3DD68C;--hb-warning: #FFB547;--hb-danger: #FF5C7C;--hb-info: #4ECDFF;--hb-font-display: \"Space Grotesk\", \"Inter\", system-ui, sans-serif;--hb-font-body: \"Inter\", system-ui, sans-serif;--hb-font-mono: \"JetBrains Mono\", \"SF Mono\", ui-monospace, monospace;--hb-font-serif: \"Instrument Serif\", \"Times New Roman\", serif;--hb-text-2xs: 10px;--hb-text-xs: 11px;--hb-text-sm: 12px;--hb-text-md: 13px;--hb-text-base: 14px;--hb-text-lg: 16px;--hb-text-xl: 20px;--hb-text-2xl: 28px;--hb-text-3xl: 40px;--hb-text-4xl: 56px;--hb-text-5xl: 80px;--hb-r-xs: 4px;--hb-r-sm: 6px;--hb-r-md: 8px;--hb-r-lg: 12px;--hb-r-xl: 16px;--hb-r-2xl: 20px;--hb-r-pill: 999px;--hb-shadow-sm: 0 1px 2px rgba(0,0,0,0.4);--hb-shadow-md: 0 4px 14px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;--hb-shadow-lg: 0 16px 48px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.05) inset;--hb-shadow-glow: 0 0 0 1px rgba(91,124,255,0.35), 0 8px 32px rgba(91,124,255,0.25);--hb-noise: url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'>\u003cfilter id='n'>\u003cfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/>\u003cfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0'/>\u003c/filter>\u003crect width='100%25' height='100%25' filter='url(%23n)'/>\u003c/svg>\")}.hb-light{--hb-bg: #F5F6FB;--hb-surface-0: #FBFBFE;--hb-surface-1: #FFFFFF;--hb-surface-2: #F2F3F8;--hb-surface-3: #E9EAF2;--hb-surface-glass: rgba(255,255,255,0.78);--hb-border: rgba(20,20,40,0.08);--hb-border-strong: rgba(20,20,40,0.16);--hb-border-focus: rgba(91,124,255,0.5);--hb-fg: #0B0B14;--hb-fg-muted: #5C5C72;--hb-fg-subtle: #9A9AB0;--hb-fg-inverse: #FFFFFF;--hb-grad-soft: linear-gradient(135deg, rgba(78,205,255,0.10), rgba(155,123,255,0.10));--hb-grad-text: linear-gradient(90deg, #0B0B14 0%, #5B7CFF 50%, #9B7BFF 100%);--hb-glow-blue: 0 0 24px rgba(91,124,255,0.20);--hb-glow-violet: 0 0 24px rgba(155,123,255,0.20);--hb-shadow-sm: 0 1px 2px rgba(20,20,40,0.06);--hb-shadow-md: 0 4px 14px rgba(20,20,40,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;--hb-shadow-lg: 0 16px 48px rgba(20,20,40,0.10), 0 1px 0 rgba(255,255,255,0.6) inset;--hb-shadow-glow: 0 0 0 1px rgba(91,124,255,0.25), 0 8px 24px rgba(91,124,255,0.18)}.hb-light.hb-bg-grid,.hb-light .hb-bg-grid{background-image:radial-gradient(circle at 50% 0%, rgba(91,124,255,0.10), transparent 50%),\n radial-gradient(circle at 80% 100%, rgba(155,123,255,0.08), transparent 50%),\n linear-gradient(rgba(20,20,40,0.04) 1px, transparent 1px),\n linear-gradient(90deg, rgba(20,20,40,0.04) 1px, transparent 1px);background-size:auto, auto, 32px 32px, 32px 32px}.hb-expert{--hb-bg: #FFFFFF;--hb-surface-0: #FFFFFF;--hb-surface-1: #FFFFFF;--hb-surface-2: #F7F7F5;--hb-surface-3: #EFEEEC;--hb-surface-glass: rgba(255,255,255,0.92);--hb-border: #ECEBE8;--hb-border-strong: #DEDDD9;--hb-border-focus: #3D63DD;--hb-fg: #2C2B28;--hb-fg-muted: #73726D;--hb-fg-subtle: #A3A29C;--hb-fg-inverse: #FFFFFF;--hb-blue: #3D63DD;--hb-violet: #6E56CF;--hb-cyan: #2A8BB8;--hb-pink: #C84B96;--hb-grad-primary: #3D63DD;--hb-grad-soft: #F2F3FB;--hb-grad-text: #2C2B28;--hb-glow-blue: none;--hb-glow-violet: none;--hb-success: #2E9E5B;--hb-warning: #B5791C;--hb-danger: #D64B5F;--hb-info: #2D7FD0;--hb-shadow-sm: 0 1px 1px rgba(20,20,20,0.04);--hb-shadow-md: 0 1px 2px rgba(20,20,20,0.05);--hb-shadow-lg: 0 4px 16px rgba(20,20,20,0.07);--hb-shadow-glow: 0 0 0 1px rgba(61,99,221,0.22);--hb-noise: none}.hb-expert .hb-btn-primary{background:var(--hb-blue);color:#FFFFFF;box-shadow:none;border-color:transparent}.hb-expert .hb-btn-primary:hover{filter:none;transform:none;background:#3656c4}.hb-expert .hb-btn-secondary{background:var(--hb-surface-1)}.hb-expert .hb-btn-secondary:hover{background:var(--hb-surface-2)}.hb-expert .hb-card-glass{background:var(--hb-surface-1);backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:var(--hb-shadow-lg)}.hb-expert .hb-grad-text{color:var(--hb-fg);-webkit-text-fill-color:var(--hb-fg)}.hb-expert.hb-bg-grid,.hb-expert .hb-bg-grid{background-image:radial-gradient(rgba(20,20,20,0.05) 1px, transparent 1px);background-size:22px 22px;background-position:0 0}.hb-expert .hb-halo,.hb-flat .hb-halo{display:none!important}.hb-root{background:var(--hb-bg);color:var(--hb-fg);font-family:var(--hb-font-body);font-size:var(--hb-text-base);line-height:1.5;font-feature-settings:\"ss01\", \"cv11\";-webkit-font-smoothing:antialiased}.hb-display{font-family:var(--hb-font-display);font-weight:600;letter-spacing:-0.02em;line-height:1.05}.hb-mono{font-family:var(--hb-font-mono);font-feature-settings:\"zero\", \"ss01\"}.hb-grad-text{background:var(--hb-grad-text);-webkit-background-clip:text;background-clip:text;color:transparent}.hb-card{background:var(--hb-surface-1);border:1px solid var(--hb-border);border-radius:var(--hb-r-lg)}.hb-card-glass{background:var(--hb-surface-glass);border:1px solid var(--hb-border);border-radius:var(--hb-r-lg);backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%)}.hb-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 12px;border-radius:var(--hb-r-md);font:500 13px/1 var(--hb-font-body);letter-spacing:-0.005em;border:1px solid transparent;cursor:pointer;transition:all 120ms ease;white-space:nowrap}.hb-btn-primary{background:var(--hb-grad-primary);color:white;box-shadow:0 0 0 1px rgba(255,255,255,0.10) inset, 0 4px 18px rgba(74,107,255,0.55), 0 0 24px rgba(139,91,255,0.25)}.hb-btn-primary:hover{filter:brightness(1.1);transform:translateY(-1px)}.hb-btn-secondary{background:var(--hb-surface-2);color:var(--hb-fg);border-color:var(--hb-border-strong)}.hb-btn-secondary:hover{background:var(--hb-surface-3)}.hb-btn-ghost{background:transparent;color:var(--hb-fg-muted)}.hb-btn-ghost:hover{background:var(--hb-surface-2);color:var(--hb-fg)}.hb-input{height:32px;padding:0 10px;background:var(--hb-surface-2);border:1px solid var(--hb-border);border-radius:var(--hb-r-md);color:var(--hb-fg);font:400 13px var(--hb-font-body);outline:none;transition:border-color 120ms;width:100%}.hb-input:focus{border-color:var(--hb-border-focus)}.hb-input::placeholder{color:var(--hb-fg-subtle)}.hb-badge{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:var(--hb-r-pill);font:500 10.5px/1 var(--hb-font-body);letter-spacing:0.04em;text-transform:uppercase;border:1px solid var(--hb-border-strong);background:var(--hb-surface-2);color:var(--hb-fg-muted)}.hb-badge-dot::before{content:\"\";width:6px;height:6px;border-radius:50%;background:currentColor}.hb-badge-success{color:var(--hb-success);border-color:rgba(61,214,140,0.3);background:rgba(61,214,140,0.08)}.hb-badge-info{color:var(--hb-info);border-color:rgba(78,205,255,0.3);background:rgba(78,205,255,0.08)}.hb-badge-violet{color:var(--hb-violet);border-color:rgba(155,123,255,0.3);background:rgba(155,123,255,0.08)}.hb-badge-warning{color:var(--hb-warning);border-color:rgba(255,181,71,0.3);background:rgba(255,181,71,0.08)}.hb-avatar{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font:600 11px/1 var(--hb-font-body);color:white;letter-spacing:0.04em;position:relative;flex-shrink:0}.hb-bg-grid{background-image:radial-gradient(circle at 50% 0%, rgba(91,124,255,0.18), transparent 50%),\n radial-gradient(circle at 80% 100%, rgba(155,123,255,0.12), transparent 50%),\n linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),\n linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);background-size:auto, auto, 32px 32px, 32px 32px;background-position:0 0, 0 0, 0 0, 0 0}.hb-root *::-webkit-scrollbar{width:8px;height:8px}.hb-root *::-webkit-scrollbar-thumb{background:var(--hb-surface-3);border-radius:4px}.hb-root *::-webkit-scrollbar-track{background:transparent}.hb-divider{height:1px;background:var(--hb-border)}.hb-row{display:flex;align-items:center;gap:8px}"},{"filePath":"new-design-system/project/tokens.standalone.css","content":":root,.hb-dark{--hb-bg: #07070C;--hb-surface-0: #0B0B14;--hb-surface-1: #11111E;--hb-surface-2: #181828;--hb-surface-3: #1F1F33;--hb-surface-glass: rgba(20, 20, 36, 0.62);--hb-border: rgba(255,255,255,0.06);--hb-border-strong: rgba(255,255,255,0.12);--hb-border-focus: rgba(120, 130, 255, 0.55);--hb-fg: #ECECF5;--hb-fg-muted: #9A9AB0;--hb-fg-subtle: #5C5C72;--hb-fg-inverse: #0B0B14;--hb-blue: #4A6BFF;--hb-violet: #8B5BFF;--hb-cyan: #2EC8FF;--hb-pink: #FF4DB8;--hb-grad-primary: linear-gradient(135deg, #2EC8FF 0%, #4A6BFF 32%, #8B5BFF 66%, #FF4DB8 100%);--hb-grad-soft: linear-gradient(135deg, rgba(46,200,255,0.22), rgba(139,91,255,0.22));--hb-grad-text: linear-gradient(90deg, #ECECF5 0%, #A8B6FF 45%, #C99AFF 75%, #FF8FD1 100%);--hb-glow-blue: 0 0 36px rgba(74,107,255,0.55);--hb-glow-violet: 0 0 36px rgba(139,91,255,0.55);--hb-success: #3DD68C;--hb-warning: #FFB547;--hb-danger: #FF5C7C;--hb-info: #4ECDFF;--hb-font-display: \"Space Grotesk\", \"Inter\", system-ui, sans-serif;--hb-font-body: \"Inter\", system-ui, sans-serif;--hb-font-mono: \"JetBrains Mono\", \"SF Mono\", ui-monospace, monospace;--hb-font-serif: \"Instrument Serif\", \"Times New Roman\", serif;--hb-text-2xs: 10px;--hb-text-xs: 11px;--hb-text-sm: 12px;--hb-text-md: 13px;--hb-text-base: 14px;--hb-text-lg: 16px;--hb-text-xl: 20px;--hb-text-2xl: 28px;--hb-text-3xl: 40px;--hb-text-4xl: 56px;--hb-text-5xl: 80px;--hb-r-xs: 4px;--hb-r-sm: 6px;--hb-r-md: 8px;--hb-r-lg: 12px;--hb-r-xl: 16px;--hb-r-2xl: 20px;--hb-r-pill: 999px;--hb-shadow-sm: 0 1px 2px rgba(0,0,0,0.4);--hb-shadow-md: 0 4px 14px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;--hb-shadow-lg: 0 16px 48px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.05) inset;--hb-shadow-glow: 0 0 0 1px rgba(91,124,255,0.35), 0 8px 32px rgba(91,124,255,0.25);--hb-noise: none}.hb-light{--hb-bg: #F5F6FB;--hb-surface-0: #FBFBFE;--hb-surface-1: #FFFFFF;--hb-surface-2: #F2F3F8;--hb-surface-3: #E9EAF2;--hb-surface-glass: rgba(255,255,255,0.78);--hb-border: rgba(20,20,40,0.08);--hb-border-strong: rgba(20,20,40,0.16);--hb-border-focus: rgba(91,124,255,0.5);--hb-fg: #0B0B14;--hb-fg-muted: #5C5C72;--hb-fg-subtle: #9A9AB0;--hb-fg-inverse: #FFFFFF;--hb-grad-soft: linear-gradient(135deg, rgba(78,205,255,0.10), rgba(155,123,255,0.10));--hb-grad-text: linear-gradient(90deg, #0B0B14 0%, #5B7CFF 50%, #9B7BFF 100%);--hb-glow-blue: 0 0 24px rgba(91,124,255,0.20);--hb-glow-violet: 0 0 24px rgba(155,123,255,0.20);--hb-shadow-sm: 0 1px 2px rgba(20,20,40,0.06);--hb-shadow-md: 0 4px 14px rgba(20,20,40,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;--hb-shadow-lg: 0 16px 48px rgba(20,20,40,0.10), 0 1px 0 rgba(255,255,255,0.6) inset;--hb-shadow-glow: 0 0 0 1px rgba(91,124,255,0.25), 0 8px 24px rgba(91,124,255,0.18)}.hb-light.hb-bg-grid,.hb-light .hb-bg-grid{background-image:radial-gradient(circle at 50% 0%, rgba(91,124,255,0.10), transparent 50%),\n radial-gradient(circle at 80% 100%, rgba(155,123,255,0.08), transparent 50%),\n linear-gradient(rgba(20,20,40,0.04) 1px, transparent 1px),\n linear-gradient(90deg, rgba(20,20,40,0.04) 1px, transparent 1px);background-size:auto, auto, 32px 32px, 32px 32px}.hb-root{background:var(--hb-bg);color:var(--hb-fg);font-family:var(--hb-font-body);font-size:var(--hb-text-base);line-height:1.5;font-feature-settings:\"ss01\", \"cv11\";-webkit-font-smoothing:antialiased}.hb-display{font-family:var(--hb-font-display);font-weight:600;letter-spacing:-0.02em;line-height:1.05}.hb-mono{font-family:var(--hb-font-mono);font-feature-settings:\"zero\", \"ss01\"}.hb-grad-text{background:var(--hb-grad-text);-webkit-background-clip:text;background-clip:text;color:transparent}.hb-card{background:var(--hb-surface-1);border:1px solid var(--hb-border);border-radius:var(--hb-r-lg)}.hb-card-glass{background:var(--hb-surface-glass);border:1px solid var(--hb-border);border-radius:var(--hb-r-lg);backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%)}.hb-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 12px;border-radius:var(--hb-r-md);font:500 13px/1 var(--hb-font-body);letter-spacing:-0.005em;border:1px solid transparent;cursor:pointer;transition:all 120ms ease;white-space:nowrap}.hb-btn-primary{background:var(--hb-grad-primary);color:white;box-shadow:0 0 0 1px rgba(255,255,255,0.10) inset, 0 4px 18px rgba(74,107,255,0.55), 0 0 24px rgba(139,91,255,0.25)}.hb-btn-primary:hover{filter:brightness(1.1);transform:translateY(-1px)}.hb-btn-secondary{background:var(--hb-surface-2);color:var(--hb-fg);border-color:var(--hb-border-strong)}.hb-btn-secondary:hover{background:var(--hb-surface-3)}.hb-btn-ghost{background:transparent;color:var(--hb-fg-muted)}.hb-btn-ghost:hover{background:var(--hb-surface-2);color:var(--hb-fg)}.hb-input{height:32px;padding:0 10px;background:var(--hb-surface-2);border:1px solid var(--hb-border);border-radius:var(--hb-r-md);color:var(--hb-fg);font:400 13px var(--hb-font-body);outline:none;transition:border-color 120ms;width:100%}.hb-input:focus{border-color:var(--hb-border-focus)}.hb-input::placeholder{color:var(--hb-fg-subtle)}.hb-badge{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:var(--hb-r-pill);font:500 10.5px/1 var(--hb-font-body);letter-spacing:0.04em;text-transform:uppercase;border:1px solid var(--hb-border-strong);background:var(--hb-surface-2);color:var(--hb-fg-muted)}.hb-badge-dot::before{content:\"\";width:6px;height:6px;border-radius:50%;background:currentColor}.hb-badge-success{color:var(--hb-success);border-color:rgba(61,214,140,0.3);background:rgba(61,214,140,0.08)}.hb-badge-info{color:var(--hb-info);border-color:rgba(78,205,255,0.3);background:rgba(78,205,255,0.08)}.hb-badge-violet{color:var(--hb-violet);border-color:rgba(155,123,255,0.3);background:rgba(155,123,255,0.08)}.hb-badge-warning{color:var(--hb-warning);border-color:rgba(255,181,71,0.3);background:rgba(255,181,71,0.08)}.hb-avatar{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font:600 11px/1 var(--hb-font-body);color:white;letter-spacing:0.04em;position:relative;flex-shrink:0}.hb-bg-grid{background-image:radial-gradient(circle at 50% 0%, rgba(91,124,255,0.18), transparent 50%),\n radial-gradient(circle at 80% 100%, rgba(155,123,255,0.12), transparent 50%),\n linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),\n linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);background-size:auto, auto, 32px 32px, 32px 32px;background-position:0 0, 0 0, 0 0, 0 0}.hb-root *::-webkit-scrollbar{width:8px;height:8px}.hb-root *::-webkit-scrollbar-thumb{background:var(--hb-surface-3);border-radius:4px}.hb-root *::-webkit-scrollbar-track{background:transparent}.hb-divider{height:1px;background:var(--hb-border)}.hb-row{display:flex;align-items:center;gap:8px}"}]}
{"page":{"pagePath":"sdk/identify","slug":"/sdk/identify","pageMetadata":{"title":"identify","description":"Associate the current visitor with a known user.","href":"/sdk/identify"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Associate the current visitor with a known user.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Hacktionbase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`identify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Links the current anonymous session to a known user. Call this after the user logs in or when you know who they are.`}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(ParamField,{body:`user`,type:`UserData`,required:true,id:`param-user`,children:[_jsx(_components.p,{children:`User identity data.`}),_jsxs(Expandable,{children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`Your application’s unique user ID (external ID).`})}),_jsx(ParamField,{body:`email`,type:`string`,id:`param-email`,children:_jsx(_components.p,{children:`User’s email address.`})}),_jsx(ParamField,{body:`firstName`,type:`string`,id:`param-first-name`,children:_jsx(_components.p,{children:`User’s first name.`})}),_jsx(ParamField,{body:`lastName`,type:`string`,id:`param-last-name`,children:_jsx(_components.p,{children:`User’s last name.`})}),_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsxs(_components.p,{children:[`User’s display name. Fallback when `,_jsx(_components.code,{children:`firstName`}),` is not provided: the\nfirst word becomes `,_jsx(_components.code,{children:`firstName`}),`, the rest becomes `,_jsx(_components.code,{children:`lastName`}),`.`]})}),_jsx(ParamField,{body:`language`,type:`string`,id:`param-language`,children:_jsxs(_components.p,{children:[`User’s preferred language (e.g. `,_jsx(_components.code,{children:`fr`}),`, `,_jsx(_components.code,{children:`en`}),`) — used for widget and\ncampaign localization.`]})}),_jsxs(ParamField,{body:`account`,type:`object`,id:`param-account`,children:[_jsxs(_components.p,{children:[`Account/company the user belongs to. Must include an `,_jsx(_components.code,{children:`id`}),` field.`]}),_jsxs(Expandable,{children:[_jsx(ParamField,{body:`id`,type:`string`,required:true,id:`param-id-1`,children:_jsx(_components.p,{children:`Your application’s unique account ID (external ID).`})}),_jsx(ParamField,{body:`plans`,type:`PlanItem[]`,id:`param-plans`,children:_jsxs(_components.p,{children:[`Reserved structured attribute — the account’s commercial plans.\nSending `,_jsx(_components.code,{children:`plans`}),` replaces the account’s plan list; an empty array\nclears it; omitting it leaves plans unchanged. See\n`,_jsx(_components.a,{href:`/concepts/plans`,children:`Plans`}),` for the full contract.`]})}),_jsx(ParamField,{body:`[key]`,type:`any`,id:`param-key`,children:_jsx(_components.p,{children:`Any additional keys are stored as account custom attributes.`})})]})]}),_jsx(ParamField,{body:`userHash`,type:`string`,id:`param-user-hash`,children:_jsx(_components.p,{children:`HMAC hash for identity verification (prevents impersonation).`})}),_jsx(ParamField,{body:`[key]`,type:`any`,id:`param-key-1`,children:_jsx(_components.p,{children:`Any additional custom attributes are stored on the user profile.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Hacktionbase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`identify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user_123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` email:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'jane@example.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Jane Doe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` account:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'org_456'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Acme Inc'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` plans:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'pro'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`label:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Pro Monthly'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`period:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'monthly'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`price:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 49`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`currency:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'USD'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signedUpAt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '2024-01-15'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`behavior`,children:`Behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`On first call (anonymous → identified), the SDK re-authenticates with the widget to get a user-scoped JWT.`}),`\n`,_jsxs(_components.li,{children:[`If the user switches accounts (different `,_jsx(_components.code,{children:`account.id`}),`), the session is rotated and replay restarts.`]}),`\n`,_jsxs(_components.li,{children:[`Custom attributes (any key beyond `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`email`}),`, `,_jsx(_components.code,{children:`firstName`}),`, `,_jsx(_components.code,{children:`lastName`}),`, `,_jsx(_components.code,{children:`name`}),`, `,_jsx(_components.code,{children:`language`}),`, `,_jsx(_components.code,{children:`account`}),`, `,_jsx(_components.code,{children:`userHash`}),`, `,_jsx(_components.code,{children:`disableReplay`}),`) are stored as user properties and can be used in segments and campaigns.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`logout`,children:`Logout`}),`\n`,_jsx(_components.p,{children:`To clear the user identity and return to anonymous mode:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Hacktionbase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`logout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This rotates the session, clears stored identity, and re-authenticates anonymously.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"identify","description":"Associate the current visitor with a known user.","href":"/sdk/identify"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]},{"title":"Behavior","slug":"behavior","depth":2,"children":[]},{"title":"Logout","slug":"logout","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/hacktionbase/9309434cb09c357d/new-design-system/project/image-slot.js"],"subdomain":"hacktionbase","siteName":"Hacktionbase Docs","title":"identify - Hacktionbase Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-02T16:42:53.079Z","originalFileLocation":"sdk/identify.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Associate the current visitor with a known user.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Hacktionbase Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"identify - Hacktionbase Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Associate the current visitor with a known user.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Hacktionbase Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hacktionbase.com/sdk/identify\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hacktionbase.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=identify\u0026amp;description=Associate+the+current+visitor+with+a+known+user.\u0026amp;theme=1262984f1c10a36d98b21a18\u0026amp;signature=871e847b76e8286ae07ce921d8ddcca930ea7b7d87e8ead60daed81067df9187\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"identify - Hacktionbase Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Associate the current visitor with a known user.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hacktionbase.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=identify\u0026amp;description=Associate+the+current+visitor+with+a+known+user.\u0026amp;theme=1262984f1c10a36d98b21a18\u0026amp;signature=871e847b76e8286ae07ce921d8ddcca930ea7b7d87e8ead60daed81067df9187\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/hacktionbase/MqWV1uEQg7Z27zox/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Hacktionbase Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F46E5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hacktionbase.com/sdk/identify\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/identify.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hacktionbase.com/#organization\",\"name\":\"Hacktionbase Docs\",\"url\":\"https://docs.hacktionbase.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hacktionbase/brfDCAe_O_oSJnno/logo/light.png?fit=max\u0026auto=format\u0026n=brfDCAe_O_oSJnno\u0026q=85\u0026s=1f705eb4eb26a279a5314cb5da5ce1fc\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hacktionbase.com#website\",\"name\":\"Hacktionbase Docs\",\"url\":\"https://docs.hacktionbase.com\",\"publisher\":{\"@id\":\"https://docs.hacktionbase.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hacktionbase.com/sdk/identify#webpage\",\"url\":\"https://docs.hacktionbase.com/sdk/identify\",\"name\":\"identify\",\"description\":\"Associate the current visitor with a known user.\",\"dateModified\":\"2026-08-02T16:42:53.079Z\",\"isPartOf\":{\"@id\":\"https://docs.hacktionbase.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hacktionbase.com/sdk/identify#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hacktionbase.com/sdk/identify#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDK Reference\",\"item\":\"https://docs.hacktionbase.com/sdk/installation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"identify\",\"item\":\"https://docs.hacktionbase.com/sdk/identify\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.hacktionbase.com/sdk/identify#article\",\"headline\":\"identify\",\"name\":\"identify\",\"description\":\"Associate the current visitor with a known user.\",\"url\":\"https://docs.hacktionbase.com/sdk/identify\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hacktionbase.com/sdk/identify#webpage\"},\"dateModified\":\"2026-08-02T16:42:53.079Z\",\"publisher\":{\"@id\":\"https://docs.hacktionbase.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hacktionbase.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Hacktionbase Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Hacktionbase Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sdk/identify.md","siteName":"Hacktionbase Docs","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://auth.hacktionbase.com"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Getting Started","pages":[{"title":"Hacktionbase Documentation","href":""},{"title":"Quickstart","href":"/quickstart"}]},{"group":"SDK Reference","pages":[{"title":"Installation","href":"/sdk/installation"},{"title":"init","description":"Initialize the SDK and mount the widget.","href":"/sdk/init"},{"title":"identify","href":"/sdk/identify"},{"title":"track","description":"Send custom events with properties.","href":"/sdk/track"},{"title":"Widget Control","href":"/sdk/widget-control"},{"title":"onTrigger","href":"/sdk/on-trigger"},{"title":"Session Replay","href":"/sdk/session-replay"},{"title":"destroy","href":"/sdk/destroy"}]},{"group":"Widget","pages":[{"title":"Widget Overview","href":"/widget/overview"},{"title":"Widget Configuration","href":"/widget/configuration"},{"title":"Widget Authentication","href":"/widget/authentication"},{"title":"Conversations","href":"/widget/conversations"},{"title":"In-App Messages","href":"/widget/in-app-messages"},{"title":"Chat Triggers","href":"/widget/triggers"}]},{"group":"Concepts","pages":[{"title":"Multi-Tenancy","href":"/concepts/multi-tenancy"},{"title":"Authentication","href":"/concepts/authentication"},{"title":"Events","href":"/concepts/events"},{"title":"Contacts \u0026 Leads","href":"/concepts/contacts"},{"title":"Plans","href":"/concepts/plans"},{"title":"Session Replay","href":"/concepts/session-replay"},{"title":"Real-Time","href":"/concepts/real-time"},{"title":"Trigger Pipeline","href":"/concepts/triggers"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"identify - Hacktionbase Docs","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":[],"chunks":[]}