{
"$defs": {
"AgentKind": {
"description": "What kind of agent a member is.",
"oneOf": [
{
"const": "coworker",
"description": "A team member in its own right.",
"type": "string"
},
{
"const": "assistant",
"description": "Pinned to one person; acts within that person's access.",
"type": "string"
}
]
},
"InstallRole": {
"description": "Install-wide role. Separate from space roles.",
"oneOf": [
{
"const": "owner",
"description": "All install admin, plus transfer.",
"type": "string"
},
{
"const": "admin",
"description": "Spaces, policies, members, guests. No content access to private channels or DMs.",
"type": "string"
},
{
"const": "member",
"description": "A regular member.",
"type": "string"
},
{
"const": "guest",
"description": "A guest.",
"type": "string"
},
{
"const": "link_guest",
"description": "A meeting link guest: made by redeeming a meeting\nlink, bound to one meeting channel, capped by `LINK_GUEST_MASK`, never a K2\nprincipal. Every guest rule applies, and only the link-guest allowlist passes.",
"type": "string"
}
]
},
"Member": {
"description": "A member of the install, person or agent.",
"properties": {
"agent_kind": {
"anyOf": [
{
"$ref": "#/$defs/AgentKind"
},
{
"type": "null"
}
],
"description": "For agents, coworker or assistant."
},
"assistant_of": {
"description": "For assistants, the member id of their person.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": [
"string",
"null"
]
},
"avatar_thumb_url": {
"description": "64 px signed avatar URL.",
"type": [
"string",
"null"
]
},
"avatar_url": {
"description": "Signed avatar URL.",
"type": [
"string",
"null"
]
},
"compliance": {
"description": "Whether the member holds the compliance flag; sent only to the member themself.",
"type": [
"boolean",
"null"
]
},
"created_at": {
"description": "When the member was created.",
"format": "date-time",
"type": "string"
},
"custom_fields": {
"description": "Custom field values the viewer may see; only on `GET /members/{id}` and the self object.",
"items": {
"$ref": "#/$defs/ProfileFieldValue"
},
"type": [
"array",
"null"
]
},
"deactivated": {
"description": "Whether the member is deactivated.",
"type": "boolean"
},
"display_name": {
"description": "The display name.",
"type": "string"
},
"email": {
"description": "Email address; sent only to the member themself.",
"type": [
"string",
"null"
]
},
"erased": {
"description": "The account was erased (omitted when false): `display_name` is \"Deleted user\" (clients\nlocalise it by this flag), `username` is `erased-<id>` and is not shown, and there is no\navatar, title, pronouns, email or `external_id`.",
"type": "boolean"
},
"external_id": {
"description": "The member's K2 id (`k2:principal:<uuid>`, `k2:workspace:<uuid>` for agents, ...;\nadditive). Only on a K2-identity install, and only when the caller's session sees a\nSpace or DM shared with the member (an App session counts only its App's Spaces), or\non the self object. Never for guests or link guests; never on standalone installs.",
"type": [
"string",
"null"
]
},
"id": {
"description": "The member id.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"install_role": {
"$ref": "#/$defs/InstallRole",
"description": "Install-wide role."
},
"kind": {
"$ref": "#/$defs/MemberKind",
"description": "Person or agent."
},
"managed_fields": {
"description": "Fields the client must show read-only; self only.",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"profile_rev": {
"default": 0,
"description": "Bumped by every change of this object; clients drop older events.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"pronouns": {
"description": "Pronouns.",
"type": [
"string",
"null"
]
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/MemberStatus"
},
{
"type": "null"
}
],
"description": "Status; absent when none or expired."
},
"timezone": {
"description": "IANA timezone.",
"type": [
"string",
"null"
]
},
"title": {
"description": "Job title.",
"type": [
"string",
"null"
]
},
"username": {
"description": "The handle.",
"pattern": "^[a-z0-9_-]{2,64}$",
"type": "string"
}
},
"required": [
"id",
"kind",
"install_role",
"username",
"display_name",
"deactivated",
"created_at"
],
"type": "object"
},
"MemberKind": {
"description": "Whether a member is a person or an agent.",
"oneOf": [
{
"const": "person",
"description": "A human.",
"type": "string"
},
{
"const": "agent",
"description": "A K2 agent.",
"type": "string"
}
]
},
"MemberListItem": {
"description": "One member-list row.",
"properties": {
"member": {
"$ref": "#/$defs/Member",
"description": "The member (no custom fields)."
},
"presence": {
"$ref": "#/$defs/PresenceStatus",
"description": "Shown presence."
}
},
"required": [
"member",
"presence"
],
"type": "object"
},
"MemberListOp": {
"description": "One member-list operation.",
"oneOf": [
{
"description": "The rows at `range[0]..=min(range[1], member_count - 1)`.",
"properties": {
"items": {
"description": "The rows.",
"items": {
"$ref": "#/$defs/MemberListItem"
},
"type": "array"
},
"op": {
"const": "sync",
"type": "string"
},
"range": {
"description": "Inclusive range.",
"items": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
}
},
"required": [
"op",
"range",
"items"
],
"type": "object"
},
{
"description": "One row changed in place.",
"properties": {
"index": {
"description": "The row.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"item": {
"$ref": "#/$defs/MemberListItem",
"description": "The new row."
},
"op": {
"const": "update",
"type": "string"
}
},
"required": [
"op",
"index",
"item"
],
"type": "object"
}
]
},
"MemberStatus": {
"description": "A member's status: text and/or one emoji, with an optional expiry.",
"properties": {
"emoji": {
"description": "One Unicode emoji sequence.",
"type": [
"string",
"null"
]
},
"expires_at": {
"description": "When it clears by itself.",
"format": "date-time",
"type": [
"string",
"null"
]
},
"text": {
"description": "Status text, 1–100 characters.",
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"PresenceStatus": {
"description": "A member's visible presence.",
"oneOf": [
{
"const": "online",
"description": "Online.",
"type": "string"
},
{
"const": "idle",
"description": "Idle.",
"type": "string"
},
{
"const": "dnd",
"description": "Do not disturb.",
"type": "string"
},
{
"const": "offline",
"description": "Offline or invisible.",
"type": "string"
}
]
},
"ProfileFieldValue": {
"description": "One custom field value on a `Member`.",
"properties": {
"field_id": {
"description": "The field.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"key": {
"description": "The field's key.",
"type": "string"
},
"value": {
"description": "The value.",
"type": "string"
}
},
"required": [
"field_id",
"key",
"value"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "`member_list_updated`.",
"properties": {
"channel_id": {
"description": "The channel.",
"pattern": "^[1-9][0-9]{0,18}$",
"type": "string"
},
"gone": {
"default": false,
"description": "Access lost: the subscription is dropped.",
"type": "boolean"
},
"member_count": {
"description": "Active members.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"ops": {
"description": "Operations in order.",
"items": {
"$ref": "#/$defs/MemberListOp"
},
"type": "array"
}
},
"required": [
"channel_id",
"member_count",
"ops"
],
"title": "MemberListUpdated",
"type": "object"
}