Skip to content

API reference

API: Website and app

Markdown version

MethodPathWhat it doesScope
GET/v1/church/website/domainsYour own domains, and the records each needswebsite:read
POST/v1/church/website/domainsAdd a domain you own. It shows your site once its records prove it's yours (web app only)website:write
DELETE/v1/church/website/domains/:idDisconnect a domain. Your site's own address keeps working (web app only)website:write
POST/v1/church/website/domains/:id/checkCheck a domain's records, and connect it when they're right (web app only)website:write
GET/v1/church/website/exportThe whole website as a file (JSON): details, pages and redirectswebsite:read
GET/v1/church/website/noticesNotices on your site and app, and how many phones asked for themwebsite:read
POST/v1/church/website/noticesShow a notice on your site and app. No phone buzzes unless someone then presses Send (web app only)website:write
DELETE/v1/church/website/notices/:idRemove a notice. A send that's still going stops (web app only)website:write
PATCH/v1/church/website/notices/:idChange a notice, or stop showing it (web app only)website:write
POST/v1/church/website/notices/:id/pushSend a notice to the phones that asked for notices like it. Once for each notice, three a day (web app only)website:write
PUT/v1/church/website/page-orderPut the pages in this order in the menuwebsite:write
GET/v1/church/website/pagesPages you removed, so they can be put backwebsite:read
POST/v1/church/website/pagesAdd a page to the draftwebsite:write
DELETE/v1/church/website/pages/:idRemove a page from the draft. It can be put backwebsite:write
GET/v1/church/website/pages/:idOne page's draft, block by blockwebsite:read
PATCH/v1/church/website/pages/:idChange a page's draft. Send the rev you read, so nobody's work is lostwebsite:write
POST/v1/church/website/pages/:id/restorePut a removed page back in the draftwebsite:write
GET/v1/church/website/postsYour blog's posts and drafts, newest firstwebsite:read
POST/v1/church/website/postsWrite a post. It's a draft unless a person publishes itwebsite:write
DELETE/v1/church/website/posts/:idRemove a post. It can be put back (web app only)website:write
GET/v1/church/website/posts/:idOne post, with its wordswebsite:read
PATCH/v1/church/website/posts/:idChange a post. publish: false takes it off the site; removed: false puts a removed one backwebsite:write
POST/v1/church/website/previewHow a page will look, with changes that aren't saved yetwebsite:read
GET/v1/church/website/preview.cssThe look's stylesheet, for the previewwebsite:read
POST/v1/church/website/publishPut the draft online, for everyone (web app only)website:write
GET/v1/church/website/reading-plansYour Bible reading planswebsite:read
POST/v1/church/website/reading-plansMake a reading plan: one line of passages for each daywebsite:write
DELETE/v1/church/website/reading-plans/:idRemove a reading plan. It can be put back (web app only)website:write
GET/v1/church/website/reading-plans/:idOne reading plan, with its dayswebsite:read
PATCH/v1/church/website/reading-plans/:idChange a reading plan. removed: false puts a removed one backwebsite:write
GET/v1/church/website/reading-plans/startersReady-made plans to start fromwebsite:read
GET/v1/church/website/redirectsOld addresses and where they lead nowwebsite:read
PUT/v1/church/website/redirectsSend an old address somewhere else. It works at once (web app only)website:write
DELETE/v1/church/website/redirects/:idRemove a redirect (web app only)website:write
GET/v1/church/website/siteYour website: its address, details and look, its pages, and whether there are changes to publishwebsite:read
PATCH/v1/church/website/siteChange the website's details, look, app or address. Details show once you publish; a new address works at oncewebsite:write
POST/v1/church/website/siteMake a website from your church's name, address and service times. Nobody sees it until you publishwebsite:write
POST/v1/church/website/unpublishTake the whole website and app offline. Your draft stays (web app only)website:write
GET/v1/church/website/versionsWhat you've published, newest first (the last 50)website:read
POST/v1/church/website/versions/:id/restoreMake the draft what it was in an earlier version. Publish to put it online (web app only)website:write

Examples

GET /v1/church/website/domains

Your own domains, and the records each needs

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

GET /v1/church/website/export

The whole website as a file (JSON): details, pages and redirects

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

GET /v1/church/website/notices

Notices on your site and app, and how many phones asked for them

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

PUT /v1/church/website/page-order

Put the pages in this order in the menu

curl -s -X PUT "https://api.chapelwren.com/v1/church/website/page-order" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/page-order`, {
  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();

GET /v1/church/website/pages

Pages you removed, so they can be put back

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

POST /v1/church/website/pages

Add a page to the draft

curl -s -X POST "https://api.chapelwren.com/v1/church/website/pages" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/pages`, {
  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/website/pages/$ID

Remove a page from the draft. It can be put back

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

GET /v1/church/website/pages/$ID

One page's draft, block by block

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

PATCH /v1/church/website/pages/$ID

Change a page's draft. Send the rev you read, so nobody's work is lost

curl -s -X PATCH "https://api.chapelwren.com/v1/church/website/pages/$ID" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/pages/${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();

POST /v1/church/website/pages/$ID/restore

Put a removed page back in the draft

curl -s -X POST "https://api.chapelwren.com/v1/church/website/pages/$ID/restore" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/pages/${id}/restore`, {
  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/website/posts

Your blog's posts and drafts, newest first

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

POST /v1/church/website/posts

Write a post. It's a draft unless a person publishes it

curl -s -X POST "https://api.chapelwren.com/v1/church/website/posts" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/posts`, {
  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/website/posts/$ID

One post, with its words

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

PATCH /v1/church/website/posts/$ID

Change a post. publish: false takes it off the site; removed: false puts a removed one back

curl -s -X PATCH "https://api.chapelwren.com/v1/church/website/posts/$ID" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/posts/${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();

POST /v1/church/website/preview

How a page will look, with changes that aren't saved yet

curl -s -X POST "https://api.chapelwren.com/v1/church/website/preview" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/preview`, {
  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/website/preview.css

The look's stylesheet, for the preview

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

GET /v1/church/website/reading-plans

Your Bible reading plans

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

POST /v1/church/website/reading-plans

Make a reading plan: one line of passages for each day

curl -s -X POST "https://api.chapelwren.com/v1/church/website/reading-plans" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/reading-plans`, {
  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/website/reading-plans/$ID

One reading plan, with its days

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

PATCH /v1/church/website/reading-plans/$ID

Change a reading plan. removed: false puts a removed one back

curl -s -X PATCH "https://api.chapelwren.com/v1/church/website/reading-plans/$ID" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/reading-plans/${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();

GET /v1/church/website/reading-plans/starters

Ready-made plans to start from

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

GET /v1/church/website/redirects

Old addresses and where they lead now

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

GET /v1/church/website/site

Your website: its address, details and look, its pages, and whether there are changes to publish

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

PATCH /v1/church/website/site

Change the website's details, look, app or address. Details show once you publish; a new address works at once

curl -s -X PATCH "https://api.chapelwren.com/v1/church/website/site" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/site`, {
  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();

POST /v1/church/website/site

Make a website from your church's name, address and service times. Nobody sees it until you publish

curl -s -X POST "https://api.chapelwren.com/v1/church/website/site" \
  -H "Authorization: Bearer $CG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.chapelwren.com/v1/church/website/site`, {
  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/website/versions

What you've published, newest first (the last 50)

curl -s "https://api.chapelwren.com/v1/church/website/versions" \
  -H "Authorization: Bearer $CG_API_KEY"
const res = await fetch(`https://api.chapelwren.com/v1/church/website/versions`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.CG_API_KEY}` },
});
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.