APIMembers

Members

Endpoints for working with members outside the context of a single group: by member id, or for a single user across the games they are in.

The group-scoped routes (GET /v1/groups/:id/members and GET /v1/groups/:id/members/:userId) live on the Groups page; this page covers the routes mounted directly under /v1/members and /v1/users/:userId/members.

Wire format

Member is the same shape returned by the group-scoped member routes and by POST /v1/invitations/:code/accept. Timestamps are ISO 8601 strings.

FieldTypeNotes
idstringServer-generated cuid.
groupIdstringThe group this membership is in.
userIdstringThe dev’s external user id (the same value the SDK passed in or the row was seeded with), not the internal JunjoUser id.
statusstring"active", "invited", "left", or "kicked".
rolesstring[]Role ids the member is assigned to.
metadataobjectFree-form per-game state; defaults to {}.
notesPublicstring | nullOfficer-readable note visible to other members.
notesPrivatestring | nullOfficer-only note.
joinedAtstringISO 8601 timestamp.

GET /v1/members/:id

Fetches a single member by their GroupMember.id. Scoped to the calling game (a member whose group belongs to a different game returns 404 to avoid leaking existence).

Path parameters

FieldTypeNotes
idstringThe member id (cuid). URL-decoded by the router.

Response

200 OK with a Member body.

Errors

CodeStatusWhen
not_found404No member with that id, or the member’s group belongs to a different game, or the member’s group is soft-deleted.
invalid_api_key401API key missing, malformed, or revoked.

GET /v1/users/:userId/members

Lists every group a user is a member of within the calling game. Returns a bare array (no pagination wrapper) capped at 1000 rows. A user with more than that many memberships in a single game is unsupported.

A user with no ExternalIdentity row for the calling game returns [] rather than 404. The route deliberately does not distinguish “user we have never seen” from “user known but not in any groups”: both answers are the same for the consumer (zero memberships) and collapsing the cases avoids leaking whether a given external user id has ever been recorded.

Soft-deleted groups are excluded from the result.

Path parameters

FieldTypeNotes
userIdstringThe dev’s external user id. URL-decoded by the router.

Query parameters

FieldTypeDefaultNotes
gameIdstringthe calling gameOptional. If supplied, must equal the calling game’s id; mismatches return 400 bad_request. (Forward-compat with future cloud-only admin endpoints.)

Response

200 OK with a Member[] body. Items are ordered by joinedAt descending. All members in the response carry the same userId (the dev’s external user id).

Errors

CodeStatusWhen
bad_request400gameId query param does not equal the calling game.
invalid_api_key401API key missing, malformed, or revoked.