Prayer Cloud API

Empowering your ministry in the cloud


Create/Update a Custom Church Email

Field Type Required Description
type_id integer Yes The ID of the type of custom email to be created or submitted
subject string Yes The subject of the custom email
body string Yes The body of the custom email. Both HTML and Markdown are accepted by HTML will be converted to Markdown when stored.
from_name string Yes The name the custom email will say it is from
reply_to string Yes The reply to email for the custom email

The body has a handful of shortcodes available to bring in info about the Church and/or the Prayer Submitter:

[Submitter Name]
[Submitter Email]
[Submitter Phone]
[Submitted Prayer]
[Church Name]

Submitter shortcodes respect the authorized anonymously settings of the Prayer. Prayer Permissions

To create/update a custom church email you will submit an authenticated PUT request to https://prayer.ministrycloud.com/api/churches/{{church}}/emails with the following JSON form data {{church}} is the UUID of the church.

{
  "type_id": 1,
  "subject": "Your Subject",
  "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc at turpis ullamcorper, consequat justo id, cursus purus. Aenean malesuada massa maximus malesuada placerat. Praesent in nulla volutpat, condimentum enim eu, hendrerit dolor. Fusce sagittis sit amet diam a finibus. Ut ut nulla eget augue pellentesque malesuada in nec ligula.",
  "from_name": "Church of God",
  "reply_to": "cog@example.com",
}

If successful you will receive a 201 response.

Get a Custom Church Emails

To get a collection of a church's custom emails you will submit an authenticated GET request to https://prayer.ministrycloud.com/api/churches/{{church}}/emails {{church}} is the UUID of the church

If successful you will receive a 200 response with the following JSON body.

{
    "data": [
        {
            "type_id": 1,
            "subject": "To Submitter",
            "body": {
                "markdown": "Hello there \\[Submitter Name\\]\n==============================\n\nYour email is: \\[Submitter Email\\]\n\nWe can call you at: \\[Submitter Phone\\]\n\nAnd your prayer was:  \n\\[Submitted Prayer\\]\n\nThis is a [link](https//www.google.com)\n\nWow this is  \ncool\n\n\\[Church Name\\]",
                "html": "<h1>Hello there [Submitter Name]</h1>\n<p>Your email is: [Submitter Email]</p>\n<p>We can call you at: [Submitter Phone]</p>\n<p>And your prayer was:<br />\n[Submitted Prayer]</p>\n<p>This is a <a href=\"https//www.google.com\">link</a></p>\n<p>Wow this is<br />\ncool</p>\n<p>[Church Name]</p>\n"
            },
            "from_name": "Tester Joe",
            "reply_to": "test@test.com"
        },
        {
            "type_id": 2,
            "subject": "To Submitter",
            "body": {
                "markdown": "Hello there \\[Submitter Name\\]\n==============================\n\nYour email is: \\[Submitter Email\\]\n\nWe can call you at: \\[Submitter Phone\\]\n\nAnd your prayer was:  \n\\[Submitted Prayer\\]\n\nThis is a [link](https//www.google.com)\n\nWow this is  \ncool\n\n\\[Church Name\\]",
                "html": "<h1>Hello there [Submitter Name]</h1>\n<p>Your email is: [Submitter Email]</p>\n<p>We can call you at: [Submitter Phone]</p>\n<p>And your prayer was:<br />\n[Submitted Prayer]</p>\n<p>This is a <a href=\"https//www.google.com\">link</a></p>\n<p>Wow this is<br />\ncool</p>\n<p>[Church Name]</p>\n"
            },
            "from_name": "Tester Joe",
            "reply_to": "test@test.com"
        },
        {
            "type_id": 3,
            "subject": "To Submitter",
            "body": {
                "markdown": "Hello there \\[Submitter Name\\]\n==============================\n\nYour email is: \\[Submitter Email\\]\n\nWe can call you at: \\[Submitter Phone\\]\n\nAnd your prayer was:  \n\\[Submitted Prayer\\]\n\nThis is a [link](https//www.google.com)\n\nWow this is  \ncool\n\n\\[Church Name\\]",
                "html": "<h1>Hello there [Submitter Name]</h1>\n<p>Your email is: [Submitter Email]</p>\n<p>We can call you at: [Submitter Phone]</p>\n<p>And your prayer was:<br />\n[Submitted Prayer]</p>\n<p>This is a <a href=\"https//www.google.com\">link</a></p>\n<p>Wow this is<br />\ncool</p>\n<p>[Church Name]</p>\n"
            },
            "from_name": "Tester Joe",
            "reply_to": "test@test.com"
        }
    ]
}

Delete a Custom Church Email

To delete a custom church email you will submit an authenticated DELETE request to https://prayer.ministrycloud.com/api/churches/{{church}}/emails/{{type_id}} {{church}} is the UUID of the church and {{type_id}} the id of the type of email to delete

If successful you will receive a 200 response with the following JSON body.


{
    "data": [
        "Email deleted"
    ]
}