Ana içeriğe git

Membership Endpoints

The Membership module manages people, churches, groups, households, roles, permissions, forms, and settings. It is the largest module and provides the core identity and authorization layer for all other modules.

Base path: /membership

People​

Base path: /membership/people

MethodPathAuthPermissionDescription
GET/JWTPeople.View or MemberList all people for the church
GET/:idJWTPeople.View or own recordGet a person by ID (includes form submissions)
GET/ids?ids=JWTPeople.View, Member, or People.ViewNamesGet multiple people by comma-separated IDs. People.ViewNames callers without People.View get the basic model, with opted-out people left out (except the caller)
GET/basic?ids=JWT—Get basic info (name only) for multiple people
GET/names?ids=JWTAny church permission[{ id, name: { display, first, last }, photo }], sorted by last name then first name, for comma-separated ids the caller already has, so roles without People.View (donations, attendance) can label people. No search, no directory filter
POST/namesJWTAny church permissionSame as GET /names. Body: { peopleIds } (or { ids })
GET/recentJWTPeople.View, Member, or People.ViewNamesRecently added people. People.ViewNames callers without People.View (even members with directory access) get the basic model (id, name.display, photo, membershipStatus) with opted-out people left out
GET/guest-register/options?churchId=Public—QR guest sign-up checklist: returns { email, phone, address, birthDate, gender, maritalStatus, grade, comments }, each "off", "optional", or "required" (parsed from the public guestRegistrationFields setting; missing or malformed values fall back to email/phone optional, the rest off). Requires enableQRGuestRegistration unless the request carries a matching site/church token; rate limited (429)
GET/search?term=&email=JWTPeople.View, Member, or People.ViewNamesSearch people by name or email (up to 100, sorted by last name then first name). People.ViewNames callers without People.View (even members with directory access) get a name search returning the basic model; an email search returns []
GET/search/phone?number=JWTPeople.View or MemberSearch by phone number
GET/search/group?groupId=JWTPeople.View or MemberGet people in a specific group
GET/household/:householdIdJWT—Get all people in a household
GET/attendanceJWTPeople.EditLoad attendees with filters (campusId, serviceId, serviceTimeId, groupId, categoryName, startDate, endDate)
GET/timeline?personIds=&groupIds=JWT—Load timeline data for people and groups
GET/directory/:idJWT—Get person for directory view (respects visibility preferences)
GET/claim/:churchIdJWT—Claim a person record for the current user at a church
POST/JWTPeople.Edit or EditSelfCreate or update people (batch)
POST/searchJWTPeople.View, Member, or People.ViewNamesSearch people (POST variant). Body: { term } or { email }; same names-only rules as GET /search
POST/advancedSearchJWTPeople.View or MemberMulti-condition search (age, birthMonth, membershipStatus, etc.). Body is an array of conditions; an empty body means no conditions, and any other non-array body returns 400
POST/loadOrCreatePublic—Find or create a person by email. Body: { churchId, email, firstName, lastName }
POST/guest-registerPublic—QR guest sign-up. Body: { churchId, members: [{ firstName, lastName, email?, phone?, birthDate?, gender?, grade? }], address?, maritalStatus?, comments? } (1–10 members; email/phone/maritalStatus apply to the first member only). Fields the church turned off are dropped; missing required or invalid values return 400. Creates a new household (named for the first member's last name) with every member as membershipStatus: "Visitor", shares address across all members, saves comments as a note on the head, adds everyone to the private guestRegistrationGroupId group if set, and — when guestRegistrationRecordAttendance is "true" — records attendance for that group's scheduled service times whose check-in window is open now. Returns { householdId, people: [{ id, name }] }. Same opt-in/token and rate-limit rules as the options call
POST/household/:householdIdJWTPeople.EditUpdate household member assignments
POST/public/emailPublic—Send an email to a person. Body: { churchId, personId, subject, body, appName }
POST/apiEmailsInternal—Load person emails by IDs (server-to-server, requires jwtSecret)
DELETE/:idJWTPeople.EditDelete a person

Example: Search People​

GET /membership/people/search?term=John
Authorization: Bearer <token>
[
{
"id": "abc-123",
"name": { "first": "John", "last": "Smith" },
"contactInfo": { "email": "john@example.com" },
"membershipStatus": "Member"
}
]

Example: Create a Person​

POST /membership/people
Authorization: Bearer <token>

[{ "firstName": "Jane", "lastName": "Doe", "contactInfo": { "email": "jane@example.com" } }]

Users​

Base path: /membership/users

See Authentication & Permissions for login, registration, and password management endpoints.

MethodPathAuthPermissionDescription
POST/loginPublic—Log in (email/password, JWT refresh, or authGuid)
POST/registerPublic—Register a new user
POST/forgotPublic—Send password reset email
POST/setPasswordGuidPublic—Set password using auth GUID from email link
POST/verifyCredentialsPublic—Verify email/password and return associated churches
POST/loadOrCreateJWT—Find or create a user by email/userId
POST/setDisplayNameJWT—Update user's first and last name
POST/updateEmailJWT—Change user's email address
POST/updatePasswordJWT—Change user's password (min 6 chars)
POST/updateOptedOutJWT—Set a person's opted-out status
POST/sendInviteEmailJWTPeople.EditEmail an invite to a person in this church (email, personName, contextName). The button reads Sign Up for someone with no account and Log In for an existing user. A user who has never logged in instead gets a Set Your Password link that expires in 7 days. A fixed template, so it doesn't count toward the church's daily email limit
GET/search?term=JWTServer.AdminSearch all users by name/email
DELETE/JWT—Delete the current user account

Churches​

Base path: /membership/churches

MethodPathAuthPermissionDescription
GET/JWT—Load all churches for the current user
GET/:idJWT—Get church by ID
GET/:id/getDomainAdminJWT—Get the domain admin user for a church
GET/:id/impersonateJWTServer.AdminImpersonate a church (server admin only)
GET/all?term=JWTServer.AdminSearch all churches (admin)
GET/search/?name=Public—Search churches by name
GET/lookup/?subDomain=&id=Public—Look up a church by subdomain or ID
POST/JWTSettings.EditUpdate church details
POST/addJWT—Register a new church. Required fields: name, address1, city, state, zip, country
POST/searchPublic—Search churches by name (POST variant)
POST/selectJWT—Select/switch to a church. Body: { churchId } or { subDomain }
POST/:id/archiveJWTServer.AdminArchive or unarchive a church
POST/byIdsPublic—Load multiple churches by IDs
DELETE/deleteAbandonedJWTServer.AdminDelete churches abandoned for 7+ days

Groups​

Base path: /membership/groups

Extends standard CRUD (GET /, GET /:id from base class).

MethodPathAuthPermissionDescription
GET/JWT—List all groups
GET/:idJWT—Get group by ID
GET/search?campusId=&serviceId=&serviceTimeId=JWT—Search groups by service filters
GET/myJWT—Get groups for the current user
GET/my/:tagJWT—Get current user's groups filtered by tag
GET/tag/:tagJWT—Get all groups with a specific tag
GET/public/:churchId/:idPublic—Get a public group by church and ID
GET/public/:churchId/tag/:tagPublic—Get public groups by tag
GET/public/:churchId/label?label=Public—Get public groups by label
GET/public/:churchId/slug/:slugPublic—Get a public group by slug
POST/JWTGroups.EditCreate or update groups (auto-generates slug)
DELETE/:idJWTGroups.EditDelete a group (also deletes child teams for ministry groups)

Group Members​

Base path: /membership/groupmembers

Extends standard CRUD (GET /:id, DELETE /:id from base class).

MethodPathAuthPermissionDescription
GET/:idJWTGroupMembers.ViewGet group member by ID
GET/JWTGroupMembers.View*List group members. Filter by ?groupId=, ?groupIds=, or ?personId=. *Also allowed if user is in the group or querying own personId, and for ?groupId= of any non-confidential group when the user has Attendance.View or Attendance.Edit (members under 13 are included for them)
GET/myJWT—Get current user's group memberships
GET/basic/:groupIdJWT—Get basic member list for a group
GET/public/leaders/:churchId/:groupIdPublic—Get group leaders (public)
GET/public/:churchId/:groupIdPublic—Get a group's public roster (minimal fields: personId, displayName, leader, photo). Only when the group opts in via publicRoster; powers the website builder's staffGrid element
POST/JWTGroupMembers.EditAdd or update group members
DELETE/:idJWTGroupMembers.ViewRemove a group member

Households​

Base path: /membership/households

Standard CRUD controller.

MethodPathAuthPermissionDescription
GET/JWT—List all households
GET/:idJWT—Get household by ID
POST/JWTPeople.EditCreate or update households
DELETE/:idJWTPeople.EditDelete a household

Roles​

Base path: /membership/roles

MethodPathAuthPermissionDescription
GET/:idJWTRoles.ViewGet role by ID
GET/church/:churchIdJWTRoles.ViewGet all roles for a church. Each role includes memberCount, the number of distinct users in it
POST/JWTRoles.EditCreate or update roles
DELETE/:idJWTRoles.EditDelete a role (also removes its permissions and members)

Role Members​

Base path: /membership/rolemembers

MethodPathAuthPermissionDescription
GET/roles/:idJWTRoles.ViewGet members for a role. Add ?include=users to include user details
POST/JWTRoles.EditAdd members to a role (creates user if email doesn't exist)
DELETE/:idJWTRoles.ViewRemove a role member
DELETE/self/:churchId/:userIdJWT—Remove yourself from a church

Role Permissions​

Base path: /membership/rolepermissions

MethodPathAuthPermissionDescription
GET/roles/:idJWTRoles.ViewGet permissions for a role (use null as ID for "Everyone" role)
POST/JWTRoles.EditCreate or update role permissions
DELETE/:idJWTRoles.EditDelete a role permission

Permissions​

Base path: /membership/permissions

MethodPathAuthPermissionDescription
GET/JWT—Get the full list of available permissions

Each entry has apiName, section (content type), action, and the displaySection / displayAction labels B1Admin's role editor shows. Recent additions: MembershipApi / People / View Names (View People Names Only, under People and Groups) and GivingApi / Donations / Enter (Enter Donations, under Donations; see Donation Batches).

Forms​

Base path: /membership/forms

MethodPathAuthPermissionDescription
GET/JWTForms.Admin or Forms.EditList all forms (admin sees all; editors see assigned + non-member forms)
GET/:idJWTForm accessGet a form by ID
GET/archivedJWTForms.Admin or Forms.EditList archived forms
GET/group/:groupIdJWTGroup member, group leader, or Forms.AdminStand-alone forms linked to the group (forms.groupId), excluding archived ones, sorted by name. Returns id, name, description, and open (within the availability window). Members get only open forms; leaders and forms admins also get closed ones. Backs the group page's linked forms
GET/standalone/:id?churchId=JWT—Get a standalone form (restricted forms require auth)
POST/JWTForms.Admin or Forms.EditCreate or update forms. Stand-alone forms accept an optional photoUrl (header photo shown above the form) and groupId (linked group)
DELETE/:idJWTForm accessDelete a form

Form Submissions​

Base path: /membership/formsubmissions

MethodPathAuthPermissionDescription
GET/JWTForms.Admin or Forms.EditList submissions. Filter by ?personId= or ?formId=
GET/my?include=questions,answersJWT—Self-scoped: up to 50 stand-alone form submissions (not person forms) the signed-in member submitted or that are linked to their person (contentType person, contentId = their person id -- for example, after an admin's change person), newest first, each with form.name. include attaches each form's questions and the submission's answers. Returns 401 if the user isn't linked to a person. Backs the My Forms section of the B1 Me page
GET/group/:groupIdJWTLeader of the groupAnswers for the group's leaders: one entry per linked form and per group event with a registration form, each with form, event (id, title, start; event entries only), questions, and submissions (with answers and personName, null when anonymous)
GET/:idJWTForms.Admin, Forms.Edit, or view accessGet submission by ID. Add ?include=form,questions,answers. Leaders of the form's linked group, and leaders of the group an event registration belongs to, can also read it
GET/formId/:formIdJWTForm access (view)Get all submissions for a form (includes form, questions, answers). Leaders of the form's linked group have view access
POST/JWT—Submit form answers (handles restricted/unrestricted forms, sends email notifications). When the form has autoCreatePerson, finds-or-creates a Guest person by email and links the submission; when the form also has a groupId, adds that person to the group; when followUpSubject/followUpBody are set, sends a templated follow-up email to the submitter. Unless the caller can manage the form, submittedBy is always set to the signed-in member's person (or left empty for anonymous submissions)
DELETE/:idJWTForms.Admin or Forms.EditDelete a submission and its answers

Questions​

Base path: /membership/questions

MethodPathAuthPermissionDescription
GET/JWTForm accessList questions for a form. Requires ?formId=
GET/:idJWTForm accessGet a question by ID
GET/unrestricted?formId=JWT—Get questions for an unrestricted form
GET/sort/:id/upJWT—Move a question up in sort order
GET/sort/:id/downJWT—Move a question down in sort order
POST/JWTForm accessCreate or update questions (auto-assigns sort order)
DELETE/:id?formId=JWTForm accessDelete a question

Answers​

Base path: /membership/answers

MethodPathAuthPermissionDescription
GET/JWTForms.Admin or Forms.EditList answers. Filter by ?formSubmissionId=
POST/JWTForms.Admin or Forms.EditCreate or update answers

Member Permissions​

Base path: /membership/memberpermissions

Controls per-member access to specific forms.

MethodPathAuthPermissionDescription
GET/:idJWTForm accessGet a member permission by ID
GET/member/:idJWTForm accessGet all form permissions for a member
GET/form/:idJWTForm accessGet all member permissions for a form
GET/form/:id/myJWTForm accessGet current user's permission for a form
POST/JWTForm accessCreate or update member permissions
DELETE/:id?formId=JWTForm accessDelete a member permission
DELETE/member/:id?formId=JWTForm accessDelete all permissions for a member on a form

Settings​

Base path: /membership/settings

MethodPathAuthPermissionDescription
GET/JWTSettings.EditGet all settings for the church
GET/public/:churchIdPublic—Get public settings for a church
POST/JWTSettings.EditSave settings (supports base64 image upload)

Domains​

Base path: /membership/domains

Extends standard CRUD (GET /:id, GET /, DELETE /:id from base class).

MethodPathAuthPermissionDescription
GET/JWT—List all domains
GET/:idJWT—Get domain by ID
GET/lookup/:domainNameJWT—Look up a domain by name
GET/public/lookup/:domainNamePublic—Public domain lookup by name
GET/health/checkPublic—Run health check on unchecked domains
POST/JWTSettings.EditCreate or update domains (triggers Caddy update)
DELETE/:idJWTSettings.EditDelete a domain

User Church​

Base path: /membership/userchurch

Manages the association between users and churches.

MethodPathAuthPermissionDescription
GET/userid/:userIdJWT—Get user-church record by user ID
GET/personid/:personIdJWT—Get email for a person's linked user
GET/user/:userIdJWTServer.AdminLoad all churches for a user
POST/JWT—Create a user-church association
PATCH/:userIdJWT—Update last accessed time and log access
DELETE/record/:userId/:churchId/:personIdJWT—Delete a user-church record

Visibility Preferences​

Base path: /membership/visibilityPreferences

MethodPathAuthPermissionDescription
GET/myJWT—Get current user's visibility preferences
POST/JWT—Save visibility preferences (address, phone, email visibility)

Query​

Base path: /membership/query

MethodPathAuthPermissionDescription
POST/membersJWT—Natural language member search using AI. Body: { text, subDomain, siteUrl }

Client Errors​

Base path: /membership/clientErrors

MethodPathAuthPermissionDescription
POST/JWT—Log a client-side error