vevee.analytics.clearAttribute()DELETE /api/v1/attributes/valuessk_live_pk_live_ only when workspace flag is ON

Remove a previously-set attribute value. Idempotent — clearing an unset attribute returns cleared: false without error. The audit log retains a redacted entry for legal evidence.

i
Auth gating. Same rules as setAttribute(). Public-key clears only work when the workspace has “Client-side attribute writes” ON in Settings → Security. Default is OFF.

Signature

vevee.analytics.clearAttribute(args: {
  distinctId: string;
  attribute: string;
}): Promise<{
  personId: string;
  attribute: string;
  cleared: boolean;   // false if there was no value to clear
}>

Parameters

NameTypeDescription
distinctIdrequiredstringYour user’s identifier.
attributerequiredstringThe attribute’s key as declared in the dashboard.

Returns

cleared is true when a value was found and removed, falsewhen there was nothing to clear. Both are success responses — no exception is thrown for the idempotent case.

Errors

CodeStatusWhen
attribute_not_defined400The key isn’t declared in the dashboard.
attribute_archived400The attribute exists but has been archived.
client_attribute_writes_disabled403Public-key write attempted but the workspace’s “Client-side attribute writes” flag is OFF.

Example

const result = await vevee.analytics.clearAttribute({
  distinctId: user.id,
  attribute: 'persona',
});
if (result.cleared) console.log('value removed');
else                console.log('nothing to clear');
i
Related: setAttribute() to set a value, getAttributes() to read current values, and the Attributes guide.