Skip to content

API reference

API: Messages

Markdown version

MethodPathWhat it doesScope
GET/v1/church/messagesMessages, newest first, and what the church has turned onmessages:read
POST/v1/church/messagesWrite a message, or a welcome step with after_days. Nothing is sentmessages:write
GET/v1/church/messages/:idOne message as it will arrive, and how many people it reachesmessages:read
PATCH/v1/church/messages/:idChange a message that hasn't gone, turn a welcome step on or off, or remove a message from the listmessages:write
POST/v1/church/messages/:id/sendSend a message to the number of people its preview showed, or send the rest of one that was stopped (web app only)messages:write
POST/v1/church/messages/:id/stopStop a message that's going out. Whoever hasn't got it yet doesn'tmessages:write
POST/v1/church/messages/:id/testEmail yourself a copy, as it will arrive (web app only)messages:write
GET/v1/church/messages/consent/:idHas this person said yes to texts?messages:read
PUT/v1/church/messages/consent/:idRecord that someone said yes or no to texts, and how they said it (web app only)messages:write
PATCH/v1/church/messages/settingsTurn emails or texts to people on or off, and set the address emails show (web app only)messages:write

Examples

GET /v1/church/messages

Messages, newest first, and what the church has turned on

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

POST /v1/church/messages

Write a message, or a welcome step with after_days. Nothing is sent

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

One message as it will arrive, and how many people it reaches

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

PATCH /v1/church/messages/$ID

Change a message that hasn't gone, turn a welcome step on or off, or remove a message from the list

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

Stop a message that's going out. Whoever hasn't got it yet doesn't

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

Has this person said yes to texts?

curl -s "https://api.chapelwren.com/v1/church/messages/consent/$ID" \
  -H "Authorization: Bearer $CG_API_KEY"
const res = await fetch(`https://api.chapelwren.com/v1/church/messages/consent/${id}`, {
  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.