curl --request POST \
--url https://api.example.com/api/church/sendemailtoall \
--header 'Content-Type: application/json' \
--data '
{
"churchId": "<string>",
"pastorId": "<string>",
"subject": "<string>",
"message": "<string>"
}
'{
"success": true,
"message": "<string>",
"data": [
{}
]
}Send an email message to all members of a church
curl --request POST \
--url https://api.example.com/api/church/sendemailtoall \
--header 'Content-Type: application/json' \
--data '
{
"churchId": "<string>",
"pastorId": "<string>",
"subject": "<string>",
"message": "<string>"
}
'{
"success": true,
"message": "<string>",
"data": [
{}
]
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SidneyEmeka/church_management_system/llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST https://api.example.com/api/church/sendemailtoall \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-d '{
"churchId": "507f1f77bcf86cd799439011",
"pastorId": "507f191e810c19729de860ea",
"subject": "Sunday Service Reminder",
"message": "Dear members, this is a reminder that our Sunday service starts at 10 AM. We look forward to seeing you there!"
}'
const response = await fetch('https://api.example.com/api/church/sendemailtoall', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
churchId: '507f1f77bcf86cd799439011',
pastorId: '507f191e810c19729de860ea',
subject: 'Sunday Service Reminder',
message: 'Dear members, this is a reminder that our Sunday service starts at 10 AM. We look forward to seeing you there!'
})
});
const data = await response.json();
console.log(data);
{
"success": true,
"message": "Email sent to 45 member(s)",
"data": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}
{
"success": false,
"message": "Unable to send emails",
"data": "You are not the pastor of this church"
}
{
"success": false,
"message": "Unable send email",
"data": "Church with this Id does not exist"
}
{
"message": "No members found"
}
{
"success": false,
"message": "Unable to send emails",
"data": "Error message details"
}