owner_transferred
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”owner_transferred
Emitting helpers
Section titled “Emitting helpers”| Function | Source |
|---|---|
encodeOwnerTransferredAuditReason | src/auth/stytch-invite.ts:119 |
Context fields
Section titled “Context fields”| Field | Type | Required | Notes |
|---|---|---|---|
from_member_id | string | yes | — |
from_stytch_member_id | string | yes | — |
to_member_id | string | yes | — |
to_stytch_member_id | string | yes | — |
by_user_id | string | yes | — |
Documentation
Section titled “Documentation”#423 / #398c — emitted by POST /api/v1/admin/orgs/:slug/transfer-ownership. from_member_id / to_member_id are the tenant_members.id values of the outgoing and incoming owner rows; the matching *_stytch_member_id fields are the cached Stytch ids on those rows. The transfer ran inside a single DB transaction so the two role updates either both commit or both roll back; the partial unique index on tenant_members enforces the one-owner-per-tenant invariant regardless of how mid-transfer crashes interleave.
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.