Skip to content

API reference

API: Groups

Markdown version

MethodPathWhat it doesScope
GET/v1/church/groupsGroups, with how many are in each, who asked to join and when they last metgroups:read
POST/v1/church/groupsAdd a groupgroups:write
GET/v1/church/groups/:idA group: its members, who asked to join and its last meetingsgroups:read
PATCH/v1/church/groups/:idChange a group, close it, or open it againgroups:write
DELETE/v1/church/groups/:id/meetings/:dayRemove a day's attendancegroups:write
PUT/v1/church/groups/:id/meetings/:dayWho came to a group on a day. Sending it again corrects itgroups:write
POST/v1/church/groups/:id/membersPut someone in a group, or make a member its leader. over goes past the size limitgroups:write
DELETE/v1/church/groups/:id/members/:personTake someone out of a group. Past attendance staysgroups:write
GET/v1/church/groups/:id/messagesWhether people in a group can write to each other, and messages someone reported (web app only)groups:read
PUT/v1/church/groups/:id/messagesLet people in a group write to each other, or stop it (web app only)groups:write
PUT/v1/church/groups/:id/messages/:messageHide a reported message, or keep it (web app only)groups:write
POST/v1/church/groups/:id/requests/:requestSay yes or no to someone who asked to join. Yes finds their record or adds them as a visitorgroups:write
PUT/v1/church/groups/:id/stopped/:personStop someone writing in a group, or let them back (web app only)groups:write
GET/v1/church/groups/prayersPrayer requests you may see, newest first. Requests for pastors only show to pastors, signed in (web app only)groups:read
POST/v1/church/groups/prayersWrite down a prayer request, and who may see it (web app only)groups:write
PATCH/v1/church/groups/prayers/:idCorrect a prayer request, mark it answered, change who may see it, or remove it (web app only)groups:write

Examples

GET /v1/church/groups

Groups, with how many are in each, who asked to join and when they last met

curl -s "https://api.chapelwren.com/v1/church/groups" \
  -H "Authorization: Bearer $CG_API_KEY"
const res = await fetch(`https://api.chapelwren.com/v1/church/groups`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}` },
});
const data = await res.json();

POST /v1/church/groups

Add a group

curl -s -X POST "https://api.chapelwren.com/v1/church/groups" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/groups`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/church/groups/$ID

A group: its members, who asked to join and its last meetings

curl -s "https://api.chapelwren.com/v1/church/groups/$ID" \
  -H "Authorization: Bearer $CG_API_KEY"
const res = await fetch(`https://api.chapelwren.com/v1/church/groups/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}` },
});
const data = await res.json();

PATCH /v1/church/groups/$ID

Change a group, close it, or open it again

curl -s -X PATCH "https://api.chapelwren.com/v1/church/groups/$ID" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/groups/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

DELETE /v1/church/groups/$ID/meetings/$DAY

Remove a day's attendance

curl -s -X DELETE "https://api.chapelwren.com/v1/church/groups/$ID/meetings/$DAY" \
  -H "Authorization: Bearer $CG_API_KEY"
const res = await fetch(`https://api.chapelwren.com/v1/church/groups/${id}/meetings/${day}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}` },
});
const data = await res.json();

PUT /v1/church/groups/$ID/meetings/$DAY

Who came to a group on a day. Sending it again corrects it

curl -s -X PUT "https://api.chapelwren.com/v1/church/groups/$ID/meetings/$DAY" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/groups/${id}/meetings/${day}`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/church/groups/$ID/members

Put someone in a group, or make a member its leader. over goes past the size limit

curl -s -X POST "https://api.chapelwren.com/v1/church/groups/$ID/members" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/groups/${id}/members`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

DELETE /v1/church/groups/$ID/members/$PERSON

Take someone out of a group. Past attendance stays

curl -s -X DELETE "https://api.chapelwren.com/v1/church/groups/$ID/members/$PERSON" \
  -H "Authorization: Bearer $CG_API_KEY"
const res = await fetch(`https://api.chapelwren.com/v1/church/groups/${id}/members/${person}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}` },
});
const data = await res.json();

POST /v1/church/groups/$ID/requests/$REQUEST

Say yes or no to someone who asked to join. Yes finds their record or adds them as a visitor

curl -s -X POST "https://api.chapelwren.com/v1/church/groups/$ID/requests/$REQUEST" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/groups/${id}/requests/${request}`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.chapelwren.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.