Saltar al contenido principal

Endpoint Reference

This section documents all REST endpoints exposed by the ChurchApps API. Each module page lists every route with its HTTP method, path, authentication requirements, and required permissions.

Base URL

EnvironmentURL
Local developmenthttp://localhost:8084
Productionhttps://api.churchapps.org

Request Conventions

  • Content-Type: All request and response bodies use application/json
  • Multi-tenant: Every authenticated request is scoped to a churchId extracted from the JWT token — you do not pass churchId in the URL
  • Batch saves: Most POST endpoints accept an array of objects. The API will insert new records (no id field) and update existing ones (with id field) in a single call
  • IDs: All entity IDs are UUIDs

Example: Batch Save

POST /membership/people
Authorization: Bearer <token>

[
{ "firstName": "Jane", "lastName": "Doe" },
{ "id": "abc-123", "firstName": "John", "lastName": "Smith" }
]

The first object is created (new); the second is updated (has id).

Response Format

Successful responses return JSON — either a single object or an array. Error responses use standard HTTP status codes:

CodeMeaning
200Success
400Bad request (validation errors)
401Unauthorized (missing/invalid token or insufficient permissions)
404Not found
500Server error

Validation errors return:

{
"errors": [
{ "msg": "enter a valid email address", "param": "email", "location": "body" }
]
}

How to Read Endpoint Tables

Each module page organizes endpoints by controller. The tables use these columns:

ColumnDescription
MethodHTTP method (GET, POST, DELETE)
PathRoute path relative to the controller's base path
AuthJWT = requires Bearer token, Public = no auth required
PermissionRequired permission (e.g. People.Edit). means any authenticated user
DescriptionWhat the endpoint does

Controllers that extend the standard CRUD base class provide four endpoints automatically: GET / (list all), GET /:id (get by ID), POST / (create/update), and DELETE /:id (delete).

Reporting Module

The Reporting module works differently from the other modules. Instead of database-backed CRUD, it loads report definitions from JSON files on disk and executes parameterized SQL queries.

MethodPathAuthDescription
GET/reporting/reports/:keyNameJWTLoad a report definition by key name
GET/reporting/reports/:keyName/runJWTExecute a report and return results

Report parameters are passed as query string values (e.g. ?startDate=2024-01-01&endDate=2024-12-31). The churchId parameter is injected automatically from the JWT token. Each report definition can specify its own permission requirements.

Module Index

ModuleBase PathDescription
Authentication/membership/users, /membership/oauthLogin, registration, JWT tokens, OAuth, permissions
Membership/membership/*People, churches, groups, households, roles, forms, settings
Attendance/attendance/*Campuses, services, sessions, visits, check-in records
Content/content/*Pages, sermons, events, files, galleries, Bible, streaming
Giving/giving/*Donations, funds, payment gateways, subscriptions
Messaging/messaging/*Conversations, notifications, devices, SMS
Doing/doing/*Plans, tasks, assignments, automations, scheduling