biofrq.update

Mutate an existing subject's metadata: display name, attributes, and group membership. Doesn't touch face templates — to attach another template, call biofrq.enroll with mode: "addReference".

Billed at 0 credits today; every call still writes a Usage ledger entry for audit.

Params

Exactly one locator is required:

FieldTypeNotes
subjectIdUUIDInternal id (returned by biofrq.enroll).
externalIdstringYour stable id. Unique per tenant.

Mutators (all optional; any subset):

FieldTypeNotes
displayNamestring | nullReplace; null clears. Omit to leave alone.
attributesobject | nullReplace the whole attributes JSONB; null clears. Omit to leave alone.
addGroupsstring[]Union into existing Groups.
removeGroupsstring[]Difference from existing Groups.
setGroupsstring[]Full replace. Mutually exclusive with addGroups / removeGroups.

Composition order: when both addGroups and removeGroups are present, removeGroups is applied first, then addGroups. Net result is predictable regardless of JSON key order.

Final group set must be 1..30 entries after the mutation; an update that ends up with 0 groups is INVALID_REQUEST.

Request — add / remove groups

json
{
  "action": "biofrq.update",
  "params": {
    "subjectId":    "8a1c...",
    "addGroups":    ["VIP", "AllStaff"],
    "removeGroups": ["OnboardingTrial"],
    "displayName":  "Asha Rao",
    "attributes":   { "role": "vip", "team": "ops" }
  }
}

Request — setGroups (full replace)

json
{
  "action": "biofrq.update",
  "params": {
    "externalId": "emp-4421",
    "setGroups":  ["Staff", "Watchlist"]
  }
}

Response

json
{
  "tenantId":   "...",
  "subjectId":  "8a1c...",
  "externalId": "emp-4421",
  "groups":     ["Staff", "VIP", "AllStaff"],
  "groupName":  "Staff"
}

groupName is a legacy alias for groups[0].

Common errors

  • INVALID_REQUEST — both subjectId and externalId provided; neither provided; setGroups mixed with addGroups/removeGroups; final group set 0 or > 30.
  • SUBJECT_NOT_FOUND — locator doesn't resolve in the active project.
Open in playgroundbiofrq.update