Przejdź do zawartości głównej

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 or MemberGet multiple people by comma-separated IDs
GET/basic?ids=JWT—Get basic info (name only) for multiple people
GET/recentJWTPeople.View or MemberRecently added people
GET/search?term=&email=JWTPeople.View or MemberSearch people by name or email
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 or MemberSearch people (POST variant)
POST/advancedSearchJWTPeople.View or MemberMulti-condition search (age, birthMonth, membershipStatus, etc.)
POST/loadOrCreatePublic—Find or create a person by email. Body: { churchId, email, firstName, lastName }
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
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
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
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

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/standalone/:id?churchId=JWT—Get a standalone form (restricted forms require auth)
POST/JWTForms.Admin or Forms.EditCreate or update forms
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/:idJWTForms.Admin or Forms.EditGet submission by ID. Add ?include=form,questions,answers
GET/formId/:formIdJWTForm accessGet all submissions for a form (includes form, questions, answers)
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 followUpSubject/followUpBody are set, sends a templated follow-up email to the submitter
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