team_member_added
This page is auto-generated from
src/auth/stytch-invite.ts. Do not edit by hand — seedocs/dev/docs-auto-sync.md.
Event string
Section titled “Event string”team_member_added
Emitting helpers
Section titled “Emitting helpers”| Function | Source |
|---|---|
encodeTeamMemberAddedAuditReason | src/auth/stytch-invite.ts:135 |
Context fields
Section titled “Context fields”| Field | Type | Required | Notes |
|---|---|---|---|
team_id | string | yes | — |
member_row_id | string | yes | — |
role | "admin" | "member" | "viewer" | yes | — |
by_user_id | string | yes | — |
Documentation
Section titled “Documentation”#564 Phase 1 — team-membership audit envelopes. Emitted by the four admin endpoints under /api/v1/admin/orgs/:slug/teams/:teamId/members. Same JSON-into-decision_reason shape as the invite/lifecycle envelopes; distinct event strings so a SIEM / replay tool can match on the wire shape. member_row_id is the Upwarden-side tenant_members.id; team_id is the teams.id the membership is on.
This envelope is stored in audit_log.decision_reason (varchar(256)) as a JSON object with the shape { event, ...ctx }. The audit_log row carries tenant_id, actor_user_id, and timestamp as columns alongside — those are not duplicated in the envelope.