Skip to content

Events

Profile update

View as MarkdownPlain text source(opens in new tab)

Fires when a tracked user's profile changes. Carries a per-field diff so you can update your local copy precisely.

A profile_update event fires when one or more fields on a tracked user’s profile change. The event carries the current profile snapshot plus a changes map describing exactly what changed.

Fields

FieldTypeNotes
type"profile_update"
authorAuthorThe tracked user, with all fields at their current value
changesRecord<string, { from: string, to: string }>One entry per changed field. Keys match Author field names
detectedAtMsnumberUnix milliseconds when we detected the change
latencyMsnumberWall-clock from detection to delivery

The changes keys are Author field names. The fields that can appear are: username, displayName, bio, location, websiteUrl, avatarUrl, bannerUrl, verified, verifiedType. Values in from and to are always strings. Privacy changes (protected) and follower or post counts arrive as separate events, not as profile updates.

Example

A tracked user updated their display name and bio:

{
  "type": "profile_update",
  "author": {
    "id": "44196397",
    "username": "elonmusk",
    "displayName": "Elon",
    "verified": true,
    "verifiedType": "blue"
  },
  "changes": {
    "displayName": { "from": "Elon Musk", "to": "Elon" },
    "bio": { "from": "http://Terafab.ai", "to": "" }
  },
  "detectedAtMs": 1780000000000,
  "latencyMs": 52
}

The privacy state (protected) and the counts (friendsCount, followersCount, statusesCount) on author always reflect their current values, but they don’t appear in changes. Watch privacy_changed for privacy transitions.

What changed vs. what’s current

  • author holds the current profile after the change.
  • changes describes what was different since our last snapshot.

To apply the diff in your store, replace fields named in changes with the values from author. Don’t read changes[field].to for live values; read author[field] instead. The to string is provided so you can show “renamed from X to Y” in your UI without keeping a previous-state cache.