MyChurchDocs

Quickstart

Four calls on the member app API, from a phone number to a member's giving history, then the same idea on the platform API with a portal login.

Part 1: the member app API

1. Find the member's churches

A phone number can belong to members of more than one church. The app asks first, then shows a picker when there is more than one.

POSThttps://uat-api.mychurch.co.ke/api/v2/login-phonePublic
bash
curl -X POST https://uat-api.mychurch.co.ke/api/v2/login-phone \
  -H "Content-Type: application/json" \
  -d '{"phone": "254712345678"}'
Response
{
  "churches": [
    { "uuid": "00000000-0000-4000-8000-000000000001", "church_name": "Grace Chapel Nairobi" }
  ],
  "message": "Success",
  "status": true
}

2. Log in to one church

POSThttps://uat-api.mychurch.co.ke/api/v2/login/{church}Public
bash
curl -X POST https://uat-api.mychurch.co.ke/api/v2/login/00000000-0000-4000-8000-000000000001 \
  -H "Content-Type: application/json" \
  -d '{"phone": "254712345678", "pin": "<the PIN, encrypted as the app does>"}'

The shipped apps encrypt the four-digit PIN before sending it (see Authentication). A successful login returns status: true, a token and the member's account:

Response (trimmed)
{
  "account": {
    "first_name": "Jane",
    "middle_name": "",
    "other_names": "Wanjiku",
    "primary_phone": "254712345678",
    "uuid": "00000000-0000-4000-8000-0000000000a1",
    "member_number": "GCN-0042",
    "blocked": null
  },
  "message": "Login successful",
  "photo": null,
  "status": true,
  "token": "00000000-0000-4000-8000-00000000f00d"
}

HTTP 200 does not mean success

Wrong PIN, unknown member or an unapproved membership all come back as HTTP 200 with status: false and a message to show the member. Always branch on status. See Responses and errors.

3. Call an authenticated route

Send the token as a Bearer token on every member route.

GEThttps://uat-api.mychurch.co.ke/api/v2/transaction-historyMember token
bash
export MEMBER_TOKEN="00000000-0000-4000-8000-00000000f00d"

curl https://uat-api.mychurch.co.ke/api/v2/transaction-history \
  -H "Authorization: Bearer $MEMBER_TOKEN"
Response (trimmed)
{
  "message": "Success",
  "status": true,
  "total": "1,500.00",
  "transactions": [
    { "account": "Offering", "amount": "500.00", "date": "05-Oct-26 10:14", "date_raw": "2026-10-05 10:14:02", "type": "Collection" },
    { "account": "Tithe", "amount": "1000.00", "date": "05-Oct-26 10:12", "date_raw": "2026-10-05 10:12:40", "type": "Collection" }
  ],
  "totals_per_account": [{ "TOTAL": "1,500.00" }, { "Tithe": "1000.00" }, { "Offering": "500.00" }]
}

4. Log out

POSThttps://uat-api.mychurch.co.ke/api/v2/logoutMember token

The full route list, grouped the way the app groups it, is in the Member App API reference.

Part 2: the platform API

Church users sign in with email and password, then an emailed one-time code. The session token is a JWT you send as a Bearer token on /v1.

POSThttps://uat-api.mychurch.co.ke/auth/loginPublic
bash
curl -X POST https://uat-api.mychurch.co.ke/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "your password"}'
Response: a code was emailed
{
  "success": true,
  "data": { "otp_required": true, "challenge": "c2hhbGxlbmdl...", "sent_to": "ad***@gracechapel.example" }
}
POSThttps://uat-api.mychurch.co.ke/auth/verify-otpPublic
bash
curl -X POST https://uat-api.mychurch.co.ke/auth/verify-otp \
  -H "Content-Type: application/json" \
  -d '{"challenge": "c2hhbGxlbmdl...", "code": "482913"}'
Response: a session
{
  "success": true,
  "data": {
    "otp_required": false,
    "token": "eyJhbGciOiJIUzI1NiIs...",
    "expires_at": "2026-11-01T11:00:00Z",
    "user": {
      "uuid": "00000000-0000-4000-8000-0000000000b2",
      "name": "Peter Otieno",
      "email": "[email protected]",
      "scope": "church",
      "role": "admin",
      "permissions": [],
      "church": { "uuid": "00000000-0000-4000-8000-000000000001", "name": "Grace Chapel Nairobi", "plan": "premium" }
    }
  }
}

Now list the church's members:

GEThttps://uat-api.mychurch.co.ke/v1/memberschurch:members:view
# Paste your token once (it starts with mc_):
export MYCHURCH_TOKEN="mc_your_token_here"

curl "https://uat-api.mychurch.co.ke/v1/members?q=wanjiku&page=1&page_size=25" \
  -H "Authorization: Bearer $MYCHURCH_TOKEN"

The examples above use an mc_ token in MYCHURCH_TOKEN; a session JWT works the same way. Next: Platform API overview and Pagination.