1 · Get your credentials
In the app open Settings → Automation / API & SDK and copy your API base URL
and API key (sk_church_…). Send the key as Authorization: Bearer <key>.
No login session or CSRF token is required for API calls — but keep the key secret (server-side).
2 · Quick start
JavaScript aichurch.js
import AIChurch from './aichurch.js';
const ac = new AIChurch('https://aichurch.boreon.com', 'sk_church_xxx');
const { data } = await ac.members({ q: 'smith', limit: 50 });
await ac.recordGift({ member_id: 12, amount: 100, method: 'card' });
const risk = await ac.atRisk(); // who needs follow-upPHP aichurch.php
require 'aichurch.php';
$ac = new AIChurch('https://aichurch.boreon.com', 'sk_church_xxx');
$members = $ac->members(['q' => 'smith', 'limit' => 50]);
$ac->recordGift(['member_id' => 12, 'amount' => 100, 'method' => 'card']);
$metrics = $ac->metrics(); // deterministic church-health formulascurl
curl -H "Authorization: Bearer sk_church_xxx" \
"https://aichurch.boreon.com/app.php?action=api&resource=stats"3 · Endpoints
| Method | Resource | Params / body | Returns |
|---|---|---|---|
GET | stats | — | dashboard stats |
GET | members | q, limit, id | member list / one |
POST | members | first_name, last_name, email, phone, status | upsert member |
GET | giving | limit | recent gifts |
POST | giving | member_id, amount, fund_id, date, method | record gift |
GET | metrics | — | deterministic analytics |
GET | at_risk | — | at-risk members |
GET | segments | — | donor segments |
GET / POST | events | name, start_date, location… | list / create |
POST | engagement_recompute | — | recompute scores |
POST | workflow_run | id | run a workflow |
GET | verse | ref | scripture lookup |
Full reference in README.md. Lists return { data: [...] };
errors return a non-2xx status with { error }. CORS is enabled; writes fire your configured webhooks.