### Start DDEV for Local Development Source: https://docs.churchcrm.io/installation Use this command to start a DDEV environment for local development after cloning the repository. Ensure DDEV is installed and configured. ```bash ddev start ``` -------------------------------- ### Setup ChurchCRM with DDEV Source: https://docs.churchcrm.io/installation After starting the DDEV environment, use this command to set up ChurchCRM. Refer to CONTRIBUTING.md for a full walkthrough. ```bash ddev setup-churchcrm ``` -------------------------------- ### Install System Packages Source: https://docs.churchcrm.io/installation/ubuntu Installs and upgrades essential system packages including Apache, MariaDB, and unzip. Enables and starts the Apache and MariaDB services. Allows HTTP traffic through the firewall. ```bash sudo apt update && sudo apt upgrade -y ``` ```bash sudo apt install -y apache2 mariadb-server unzip wget ``` ```bash sudo systemctl enable --now apache2 ``` ```bash sudo systemctl enable --now mariadb ``` ```bash sudo ufw allow in "Apache Full" ``` -------------------------------- ### Example Request using CURL Source: https://docs.churchcrm.io/api/private/get-all-roles Demonstrates how to call the API to get all family roles using cURL. Ensure you replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/persons/roles' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Curl Request Example Source: https://docs.churchcrm.io/api/private/get-deposits-from-the-last-90-days-finance-role-required Example of how to call the Get Deposits API using curl. Replace with your actual API key. ```curl curl -L 'https://your-server.com/api/deposits/dashboard' \ -H 'x-api-key: ' ``` -------------------------------- ### Enable and Start Services Source: https://docs.churchcrm.io/installation/rocky-linux Ensures that php-fpm and httpd services are enabled to start on boot and are running. ```bash sudo systemctl enable --now php-fpm sudo systemctl enable --now httpd ``` -------------------------------- ### Collect System Setup Information Source: https://docs.churchcrm.io/administration/bug-reporting-and-diagnostics Use this template to gather essential details about your ChurchCRM installation and environment for bug reporting. ```text - ChurchCRM Version: [e.g., 6.0.0] - Installation Type: [Shared Hosting / Self-Hosted Linux / Docker / Other] - Hosting Provider: [e.g., Bluehost, AWS, etc. - if applicable] - Operating System: [e.g., Windows / macOS / Linux] - Web Server: [Apache / Nginx / Other] - PHP Version: [e.g., 8.2.5] - Database: [MySQL 8.0.11+ / MariaDB 10.5+ / Other and version] - Browser: [e.g., Chrome, Firefox, Safari] - Browser Version: [e.g., 120.0] ``` -------------------------------- ### Get All Payments Request Source: https://docs.churchcrm.io/api/private/get-all-payments-finance-role-required This example shows how to make a GET request to retrieve all payment records. Ensure you include your API key in the x-api-key header. ```curl curl -L 'https://your-server.com/api/payments/' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Install System Packages Source: https://docs.churchcrm.io/installation/rocky-linux Installs necessary system packages like httpd and mariadb, and enables their services. ```bash sudo dnf install httpd mariadb mariadb-server unzip sudo systemctl enable --now mariadb sudo systemctl enable --now httpd ``` -------------------------------- ### Install MySQL Server Source: https://docs.churchcrm.io/installation/azure Installs the MySQL database server. You will be prompted to set a root password. ```bash apt-get -y install mysql-server ``` -------------------------------- ### Install Language Packs on Rocky Linux/RHEL/CentOS Source: https://docs.churchcrm.io/administration/server-locale Use 'sudo dnf install glibc-langpack-' to install language packs. For example, 'es' for Spanish. Multiple packs can be installed in one command. ```bash # Install language pack (e.g., Spanish) sudo dnf install glibc-langpack-es # Multiple packs sudo dnf install glibc-langpack-es glibc-langpack-fr glibc-langpack-de ``` -------------------------------- ### Get User Permissions Example Source: https://docs.churchcrm.io/api/private/get-permission-flags-for-a-user-admin-role-required This example demonstrates how to retrieve permission flags for a user using a cURL request. Ensure you replace `` with your actual API key and `:userId` with the target user's ID. ```bash curl -L 'https://your-server.com/api/api/user/:userId/permissions' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### CURL Request Example Source: https://docs.churchcrm.io/api/private/78-e-3-ca-7-d-537-e-14-b-376-d-9603100-d-97-ae-1 Example of how to make a request to the Get Latest Families endpoint using CURL, including necessary headers for authentication and content acceptance. ```curl curl -L 'https://your-server.com/api/families/latest' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Install Apache Web Server Source: https://docs.churchcrm.io/installation/azure Installs the Apache web server, which will serve your ChurchCRM application. ```bash apt-get -y install apache2 ``` -------------------------------- ### Get Groups for Calendar Display Source: https://docs.churchcrm.io/api/private/get-groups-formatted-for-calendar-display This example shows how to make a GET request to retrieve groups formatted for calendar display. Ensure you include the 'x-api-key' header for authentication. ```http GET ## https://your-server.com/api/groups/calendars ``` ```json [ { "type": "group", "groupID": 0, "name": "string" } ] ``` ```http curl -L 'https://your-server.com/api/groups/calendars' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### cURL Request Example Source: https://docs.churchcrm.io/api/private/c-892797-ab-05-f-9-f-276-d-27-a-66-e-69893-fd-1 Example of how to make a GET request to the person properties endpoint using cURL. Ensure you replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/people/properties/person' \ -H 'x-api-key: ' ``` -------------------------------- ### Example CURL Request Source: https://docs.churchcrm.io/api/private/get-user-calendar-by-id This example demonstrates how to make a request to the get user calendar API using cURL. Remember to replace '' with your actual API key. ```curl curl -L 'https://your-server.com/api/calendars/:id' \ -H 'x-api-key: ' ``` -------------------------------- ### Example Plugin Details Response Source: https://docs.churchcrm.io/api/private/get-plugin This is an example of a successful JSON response when retrieving plugin details. It includes success status, data, and metadata. ```json { "success": true, "data": { "metadata": {}, "isActive": true, "isConfigured": true } } ``` -------------------------------- ### Install PHP and Extensions Source: https://docs.churchcrm.io/installation/azure Installs PHP and necessary extensions for ChurchCRM functionality. ```bash apt-get -y install php apt-get -y install php-curl php-cli php-dev php-gd php-intl php-mcrypt php-json php-mysql php-opcache php-bcmath php-mbstring php-soap php-xml php-zip gettext unzip ``` -------------------------------- ### cURL Request to Get Approved Plugins Source: https://docs.churchcrm.io/api/private/list-approved-plugins This example demonstrates how to make a cURL request to the approved plugins endpoint. Ensure you replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/plugins/api/approved' \ -H 'x-api-key: ' ``` -------------------------------- ### Example Plugin List Response Source: https://docs.churchcrm.io/api/private/list-plugins This is an example of a successful response when listing plugins. The 'data' field contains an array of plugin objects. ```json { "success": true, "data": [ {} ] } ``` -------------------------------- ### Install and Run Malware Scanner Source: https://docs.churchcrm.io/administration/plugins/plugin-security-and-compliance Installs the global malware scanner and runs it against a specified plugin directory. All findings require investigation. ```bash composer global require scr34m/php-malware-scanner ~/.composer/vendor/bin/scanner src/plugins/community/{plugin-id} ``` -------------------------------- ### GET Approved Plugins List Source: https://docs.churchcrm.io/api/private/list-approved-plugins Use this endpoint to retrieve the list of approved plugins. Only plugins present in this list can be installed using a URL. An API key is required for authentication. ```http GET ## https://your-server.com/api/plugins/api/approved ``` -------------------------------- ### Start Docker Testing Environment Source: https://docs.churchcrm.io/administration/Docker Start the Docker environment specifically configured for running automated tests. This ensures a consistent testing environment. ```bash npm run docker:test:start ``` -------------------------------- ### Example CURL Request Source: https://docs.churchcrm.io/api/private/export-all-people-as-a-ch-meetings-compatible-csv-file-admin-role-required This example demonstrates how to make a CURL request to the export endpoint. Replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/api/database/people/export/chmeetings' \ -H 'x-api-key: ' ``` -------------------------------- ### Fetch Countries using PHP Source: https://docs.churchcrm.io/api/public/get-countries Example of how to retrieve the country list using PHP with cURL. This snippet shows basic cURL setup for making the GET request. ```php ``` -------------------------------- ### Echo Response Example Source: https://docs.churchcrm.io/api/public/get-echo This is an example of a successful echo response from the API. ```json { "message": "echo" } ``` -------------------------------- ### CURL Request Example Source: https://docs.churchcrm.io/api/private/get-people-with-no-personal-or-work-email-on-record This example demonstrates how to make a request to the API endpoint using CURL, including the necessary Accept header and the x-api-key for authentication. ```curl curl -L 'https://your-server.com/api/persons/email/without' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Retrieve Plugin Details using cURL Source: https://docs.churchcrm.io/api/private/get-plugin This example shows how to fetch plugin details using a cURL command. Ensure you replace :pluginId and with your specific values. ```curl curl -L 'https://your-server.com/api/plugins/api/plugins/:pluginId' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### CURL Example for CSV Import Execution Source: https://docs.churchcrm.io/api/private/execute-a-csv-import-using-a-previously-uploaded-file-and-column-mapping Example of how to execute the CSV import using cURL. Replace '' with your actual API key. ```curl curl -L -X POST 'https://your-server.com/api/admin/api/import/csv/execute' \ -H 'x-api-key: ' ``` -------------------------------- ### Get Families In Cart Request Source: https://docs.churchcrm.io/api/private/get-families-whose-all-members-are-in-the-session-cart This example shows how to make a GET request to the familiesInCart endpoint. Ensure you include your API key in the x-api-key header. ```http GET ## https://your-server.com/api/families/familiesInCart ``` ```json { "familiesInCart": [ 0 ] } ``` ```http curl -L 'https://your-server.com/api/families/familiesInCart' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### cURL Request Example Source: https://docs.churchcrm.io/api/private/get-latest-persons Example of how to make a request to the API using cURL, including the necessary headers for authentication and content acceptance. ```curl curl -L 'https://your-server.com/api/persons/latest' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Example JSON Response Source: https://docs.churchcrm.io/api/private/get-latest-persons This is an example of the JSON structure returned for a successful request, detailing person information. ```json { "people": [ { "PersonId": 0, "FirstName": "string", "LastName": "string", "Email": "string", "FamilyId": 0, "Created": "2024-07-29T15:51:28.071Z" } ] } ``` -------------------------------- ### CURL Request Example Source: https://docs.churchcrm.io/api/private/get-updated-persons This example demonstrates how to make a request to the updated persons endpoint using cURL, including the necessary Accept and x-api-key headers. ```curl curl -L 'https://your-server.com/api/persons/updated' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Import Demo Data using cURL Source: https://docs.churchcrm.io/api/private/import-demo-data-into-the-application-admin-role-required Example of how to import demo data using cURL. Ensure you replace `` with your actual API key and adjust the boolean flags as needed. ```curl curl -L 'https://your-server.com/api/api/demo/load' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'x-api-key: ' \ -d '{ "includeFinancial": false, "includeEvents": false, "includeSundaySchool": false, "force": false }' ``` -------------------------------- ### Install Plugin via CURL Source: https://docs.churchcrm.io/api/private/install-plugin-from-url Use this command to install a plugin from a specified download URL. Ensure you replace `` with your actual API key and `string` with the valid plugin URL. ```curl curl -L 'https://your-server.com/api/plugins/api/plugins/install' \ -H 'Content-Type: application/json' \ -H 'x-api-key: ' \ -d '{ "downloadUrl": "string" }' ``` -------------------------------- ### Create Repeat Events Response Example Source: https://docs.churchcrm.io/api/private/create-repeat-events Example of a successful response after creating repeat events. It indicates success, the number of events created, and their IDs. ```json { "success": true, "count": 52, "eventIds": [ 0 ] } ``` -------------------------------- ### CURL Request to Get Person Properties Source: https://docs.churchcrm.io/api/private/252-a-37-a-07-f-5516-b-784-a-2534-ddf-4-ddfa-9 Example of how to make a CURL request to the Get Person Properties endpoint, including necessary headers for authentication and content type. ```curl curl -L 'https://your-server.com/api/system/properties/person' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Install Node.js Dependencies and Deploy Assets Source: https://docs.churchcrm.io/administration/Docker Install project dependencies using npm ci and then run the deploy script to build assets. This is required after cloning the repository. ```bash npm ci npm run deploy ``` -------------------------------- ### Example Public Calendar Events JSON Response Source: https://docs.churchcrm.io/api/public/get-public-calendar-events This is an example of the JSON structure returned for public calendar events. It includes event ID, title, start, and end times. ```json [ { "Id": 0, "Title": "string", "Start": "2024-07-29T15:51:28.071Z", "End": "2024-07-29T15:51:28.071Z" } ] ``` -------------------------------- ### Initialize ChurchCRM Database Source: https://docs.churchcrm.io/installation/azure Configure the database connection details during the ChurchCRM setup process. ```bash Database Server Name: localhost Database Name: churchcrm user: churchcrm password: **** ``` -------------------------------- ### CURL Request to Get Updated Families Source: https://docs.churchcrm.io/api/private/4-c-21568-cb-8-dd-4-b-4629-d-379-ca-1-bd-41894 This example demonstrates how to make a GET request to the families updated endpoint using CURL. Remember to replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/families/updated' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Get Group IDs in Cart (JSON Response Example) Source: https://docs.churchcrm.io/api/private/get-i-ds-of-groups-whose-all-members-are-in-the-session-cart This is an example of the JSON response structure when successfully retrieving group IDs. The `groupsInCart` array contains the IDs of the qualifying groups. ```json { "groupsInCart": [ 0 ] } ``` -------------------------------- ### Install a community plugin from an approved download URL Source: https://docs.churchcrm.io/api/private/plugins Installs a community plugin by downloading it from an approved URL, verifying its integrity, and extracting it. The plugin is not enabled automatically. ```APIDOC ## Install a community plugin from an approved download URL ### Description Downloads the zip, verifies its SHA-256 against approved-plugins.json, validates the archive, and extracts it into src/plugins/community/{id}. The plugin is NOT enabled automatically — admins must review and click Enable. ### Method POST ### Endpoint /api/private/plugins/community/install/approved ### Request Body - **url** (string) - Required - The URL to download the plugin from. - **sha256** (string) - Required - The SHA-256 checksum of the plugin zip file. ``` -------------------------------- ### Install Plugin from URL (cURL) Source: https://docs.churchcrm.io/api/private/install-plugin-from-unverified-url Use this cURL command to install a plugin from an unverified URL. Ensure you replace placeholder values with your actual download URL, SHA-256 hash, and plugin ID. An API key is required for authentication. ```curl curl -L 'https://your-server.com/api/plugins/api/plugins/install-url' \ -H 'Content-Type: application/json' \ -H 'x-api-key: ' \ -d '{ "downloadUrl": "string", "sha256": "string", "pluginId": "string" }' ``` -------------------------------- ### Get Payment Items for Deposit - CURL Example Source: https://docs.churchcrm.io/api/private/get-payment-items-for-a-deposit-finance-role-required Example of how to retrieve payment items for a deposit using cURL. Replace ':id' with the actual deposit ID and '' with your valid API key. ```curl curl -L 'https://your-server.com/api/deposits/:id/payments' \ -H 'x-api-key: ' ``` -------------------------------- ### List All Available Plugins Source: https://docs.churchcrm.io/api/private/list-plugins Use this endpoint to get a list of all plugins. Ensure you include your API key in the header for authentication. ```http GET ## https://your-server.com/api/plugins/api/plugins ``` -------------------------------- ### Get Duplicate Emails (JSON Response Example) Source: https://docs.churchcrm.io/api/private/get-email-duplicates This is an example of the JSON response structure when retrieving duplicate email addresses. It lists each duplicate email and the IDs and names of the people and families associated with it. ```json { "emails": [ { "email": "user@example.com", "people": [ { "id": 0, "name": "string" } ], "families": [ { "id": 0, "name": "string" } ] } ] } ``` -------------------------------- ### Configure MariaDB Database and User Source: https://docs.churchcrm.io/installation/rocky-linux Secures the MariaDB installation, creates the 'churchcrm' database, and sets up a user with privileges. ```bash sudo mysql_secure_installation ``` ```bash mysqladmin -u root -p create churchcrm mysql -u root -p ``` ```sql CREATE USER 'churchcrm'@'localhost' IDENTIFIED BY 'YourDBPasswordHere'; GRANT ALL PRIVILEGES ON churchcrm.* TO 'churchcrm'@'localhost'; FLUSH PRIVILEGES; EXIT; ``` -------------------------------- ### List All Volunteer Opportunities with cURL Source: https://docs.churchcrm.io/api/private/list-all-volunteer-opportunities-admin-role-required Example using cURL to list all volunteer opportunities. Ensure you replace '' with your actual API key. ```curl curl -L 'https://your-server.com/api/volunteer-opportunities' \ -H 'x-api-key: ' ``` -------------------------------- ### Get Person Record by ID - CURL Example Source: https://docs.churchcrm.io/api/private/get-person Use this cURL command to make a GET request to the API endpoint for retrieving a person's full record. Ensure you replace ':personId' with the actual ID and '' with your valid API key. ```curl curl -L 'https://your-server.com/api/person/:personId' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Example Request using cURL Source: https://docs.churchcrm.io/api/private/get-system-calendars This example demonstrates how to make a request to the system calendars endpoint using cURL. Replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/systemcalendars' \ -H 'x-api-key: ' ``` -------------------------------- ### CURL Request to Get Families Source: https://docs.churchcrm.io/api/private/get-the-last-100-self-registered-families Example of how to make a CURL request to the self-registered families endpoint. Remember to replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/families/self-register' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### API Request Example (cURL) Source: https://docs.churchcrm.io/api/private/refresh-upgrade-info Example of how to call the refresh upgrade info API using cURL. Ensure you replace '' with your actual API key. ```curl curl -L -X POST 'https://your-server.com/api/api/upgrade/refresh-upgrade-info' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Start Docker Development Environment Source: https://docs.churchcrm.io/administration/Docker Start the Docker-based development environment for ChurchCRM. This command brings up all necessary services like the webserver, database, and mail server. ```bash npm run docker:dev:start ``` -------------------------------- ### Get Events from System Calendar Source: https://docs.churchcrm.io/api/private/get-system-calendar-events Fetches events from a specified system calendar. You can filter events by a date range using the `start` and `end` query parameters. ```APIDOC ## GET /api/systemcalendars/:id/events ### Description Get events from a system calendar. ### Method GET ### Endpoint https://your-server.com/api/systemcalendars/:id/events ### Parameters #### Path Parameters - **id** (integer) - Required - System calendar ID #### Query Parameters - **start** (date) - Optional - Filter start date (ISO 8601) - **end** (date) - Optional - Filter end date (ISO 8601) ### Responses - **200** - Array of event objects - **401** - Unauthorized - **404** - System calendar not found ### Authorization - **x-api-key**: apiKey (header) ``` -------------------------------- ### CURL Request to Get Self-Registered Persons Source: https://docs.churchcrm.io/api/private/get-self-registered-persons This example demonstrates how to make a request to the self-registered persons endpoint using CURL, including the necessary Accept and x-api-key headers. ```curl curl -L 'https://your-server.com/api/persons/self-register' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Install Plugin from URL Source: https://docs.churchcrm.io/api/private/install-plugin-from-url Downloads a plugin zip from a given URL, verifies its integrity against approved plugins, validates the archive, and extracts it into the community plugins directory. The plugin requires manual enabling by an administrator. ```APIDOC ## POST /api/plugins/install ### Description Downloads the zip, verifies its SHA-256 against approved-plugins.json, validates the archive, and extracts it into src/plugins/community/{id}. The plugin is NOT enabled automatically — admins must review and click Enable. ### Method POST ### Endpoint https://your-server.com/api/plugins/install ### Parameters #### Request Body - **downloadUrl** (string) - Required - HTTPS URL to the plugin zip. Must match an approved entry exactly. ### Request Example ```json { "downloadUrl": "string" } ``` ### Responses * 200 - Plugin installed (not yet enabled) * 400 - Validation failure (unknown URL, checksum mismatch, unsafe zip) * 401 - Unauthorized * 403 - Forbidden — Admin role required * 409 - Plugin already installed * 500 - Install failed ### Authorization #### Header - **x-api-key** (apiKey) - API key obtained from Profile → API Key in ChurchCRM, or via POST /public/user/login ``` -------------------------------- ### CURL Request for Person Timeline Source: https://docs.churchcrm.io/api/private/get-person-timeline Example of how to make a request to the Get Person Timeline API using CURL. Remember to replace '' with your actual API key. ```curl curl -L 'https://your-server.com/api/timeline/person/:personId' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Backup Config File Source: https://docs.churchcrm.io/administration/upgrade Create a backup of the main configuration file before proceeding with the upgrade. This is crucial for restoring database connection details if overwritten. ```bash cp Include/Config.php Include/Config.php.bak ``` -------------------------------- ### CURL Request to Get Public Calendar Events Source: https://docs.churchcrm.io/api/public/get-public-calendar-events Example of how to make a request to the public calendar events API using CURL. Ensure the Accept header is set to application/json. ```curl curl -L 'https://your-server.com/api/public/calendar/:CalendarAccessToken/events' \ -H 'Accept: application/json' ``` -------------------------------- ### Install a community plugin from an arbitrary URL (unverified) Source: https://docs.churchcrm.io/api/private/plugins Installs a community plugin from a URL that is not on the approved list. Requires manual SHA-256 verification and flags the plugin as unverified. ```APIDOC ## Install a community plugin from an arbitrary URL (unverified) ### Description Installs a plugin from a URL that is NOT on the approved list. The admin must supply the expected SHA-256 themselves. The plugin is flagged as unverified and the admin UI shows a warning banner before it can be enabled. Intended for plugin developers testing their own builds and for admins running experimental plugins. ### Method POST ### Endpoint /api/private/plugins/community/install/unverified ### Request Body - **url** (string) - Required - The URL to download the plugin from. - **sha256** (string) - Required - The SHA-256 checksum of the plugin zip file. ``` -------------------------------- ### CURL Request to Get Family Timeline Source: https://docs.churchcrm.io/api/private/get-family-timeline Example using CURL to fetch the family timeline. Replace '' with your actual API key and ':familyId' with the target family's ID. ```curl curl -L 'https://your-server.com/api/timeline/family/:familyId' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Quick-create Event using cURL Source: https://docs.churchcrm.io/api/private/quick-create-event This example demonstrates how to call the Quick-create Event API using cURL. Ensure you replace '' with your actual API key and adjust the JSON body as needed. ```curl curl -L 'https://your-server.com/api/events/quick-create' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'x-api-key: ' \ -d '{ "eventTypeId": 5, "groupId": 12, "date": "2026-04-05" }' ``` -------------------------------- ### Get Event by ID - CURL Example Source: https://docs.churchcrm.io/api/private/get-event Demonstrates how to retrieve an event using a cURL command. Ensure you replace ':id' with the actual event ID and '' with your valid API key. ```curl curl -L 'https://your-server.com/api/events/:id' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### cURL Request for System Upgrade Source: https://docs.churchcrm.io/api/private/do-upgrade Example of how to apply the system upgrade using cURL. Replace placeholders with your actual server details, API key, and upgrade file information. ```curl curl -L 'https://your-server.com/api/api/upgrade/do-upgrade' \ -H 'Content-Type: application/json' \ -H 'x-api-key: ' \ -d '{ "fullPath": "string", "sha1": "string" }' ``` -------------------------------- ### Get Family by ID - CURL Example Source: https://docs.churchcrm.io/api/private/get-a-family-object-by-id Use this cURL command to retrieve a family object by its ID. Replace ':familyId' with the actual family ID and '' with your valid API key. ```curl curl -L 'https://your-server.com/api/family/:familyId' \ -H 'x-api-key: ' ``` -------------------------------- ### Install ChurchCRM Application Source: https://docs.churchcrm.io/installation/ubuntu Downloads the latest ChurchCRM release, unzips it into the web root, and sets the correct ownership for the web server user. ```bash cd /var/www/html ``` ```bash sudo wget https://github.com/ChurchCRM/CRM/releases/latest/download/ChurchCRM-latest.zip ``` ```bash sudo unzip ChurchCRM-latest.zip ``` ```bash sudo chown -R www-data:www-data churchcrm ``` -------------------------------- ### Get Public Calendar Events Source: https://docs.churchcrm.io/api/public/get-public-calendar-events Fetches events for a publicly shared calendar using its access token. The response includes event details such as ID, Title, Start, and End times. ```APIDOC ## GET /api/public/calendar/:CalendarAccessToken/events ### Description Returns events for a publicly shared calendar using its access token. ### Method GET ### Endpoint https://your-server.com/api/public/calendar/:CalendarAccessToken/events ### Parameters #### Path Parameters - **CalendarAccessToken** (string) - Required - The calendar's public access token (found in calendar settings) ### Responses #### Success Response (200) Returns an array of event objects. - **Id** (integer) - **Title** (string) - **Start** (string) - **End** (string) #### Response Example (200) ```json [ { "Id": 0, "Title": "string", "Start": "2024-07-29T15:51:28.071Z", "End": "2024-07-29T15:51:28.071Z" } ] ``` #### Error Response (404) Invalid or expired access token. ``` -------------------------------- ### Get Calendar Events (CURL) Source: https://docs.churchcrm.io/api/private/get-user-calendar-events Example of how to retrieve events from a user's calendar using cURL. Ensure you replace ':id' with the actual calendar ID and '' with your valid API key. ```curl curl -L 'https://your-server.com/api/calendars/:id/events' \ -H 'x-api-key: ' ``` -------------------------------- ### Download and Deploy ChurchCRM Source: https://docs.churchcrm.io/installation/azure Download the ChurchCRM zip file, extract it, and copy the files to the web server's document root. Ensure correct ownership and permissions. ```bash wget https://github.com/ChurchCRM/CRM/releases/download/2.9.4/ChurchCRM-2.9.4.zip ``` ```bash unzip ChurchCRM-2.9.4.zip ``` ```bash rsync -av churchcrm/ /var/www/html/ ``` ```bash chown -R www-data:www-data /var/www/html ``` ```bash chmod -R 755 /var/www/html ``` -------------------------------- ### Download and Install ChurchCRM Source: https://docs.churchcrm.io/installation/rocky-linux Downloads the latest ChurchCRM release, unzips it into the web root, and sets correct ownership. ```bash cd /var/www/html sudo wget https://github.com/ChurchCRM/CRM/releases/latest/download/ChurchCRM-latest.zip sudo unzip ChurchCRM-latest.zip sudo chown -R apache:apache churchcrm ``` -------------------------------- ### Example cURL Request Source: https://docs.churchcrm.io/api/private/get-a-single-donation-fund-finance-role-required This cURL command demonstrates how to make a GET request to retrieve a single donation fund. Replace ':id' with the actual fund ID and '' with your valid API key. ```curl curl -L 'https://your-server.com/api/donation-funds/:id' \ -H 'x-api-key: ' ``` -------------------------------- ### Get Current User's 2FA QR Code Source: https://docs.churchcrm.io/api/private/6487-c-0-abc-311-e-2-f-3-adc-531-da-5-bb-8-a-3-c-0 Retrieves the current user's 2FA QR code as a PNG image. This is typically used during the initial setup of two-factor authentication. ```APIDOC ## GET https://your-server.com/api/user/current/get2faqrcode ### Description Get the current user's 2FA QR code as a PNG image. ### Method GET ### Endpoint /api/user/current/get2faqrcode ### Headers - **Accept**: image/png - **x-api-key** (apiKey) - Required - API key obtained from Profile → API Key in ChurchCRM, or via POST /public/user/login ### Responses #### Success Response (200) - **image/png**: PNG image of the 2FA QR code ### Request Example ```curl curl -L 'https://your-server.com/api/user/current/get2faqrcode' \ -H 'Accept: image/png' \ -H 'x-api-key: ' ``` ``` -------------------------------- ### Review Extracted Plugin Files Source: https://docs.churchcrm.io/administration/plugins/installing-community-plugins After installation, use these commands to list the files extracted for a plugin and view its plugin.json manifest. Replace {id} with the actual plugin identifier. ```bash ls src/plugins/community/{id} ``` ```bash cat src/plugins/community/{id}/plugin.json ``` -------------------------------- ### Get Event Location - CURL Example Source: https://docs.churchcrm.io/api/private/get-event-location Use this command to retrieve an event's location via the API. Replace `:id` with the event's actual ID and `` with your valid API key. ```curl curl -L 'https://your-server.com/api/events/:id/location' \ -H 'x-api-key: ' ``` -------------------------------- ### Install Plugin from Unverified URL Source: https://docs.churchcrm.io/api/private/install-plugin-from-unverified-url Installs a plugin from a URL that is NOT on the approved list. The admin must supply the expected SHA-256 themselves. The plugin is flagged as unverified and the admin UI shows a warning banner before it can be enabled. Intended for plugin developers testing their own builds and for admins running experimental plugins. ```APIDOC ## POST /api/plugins/install-url ### Description Installs a plugin from a URL that is NOT on the approved list. The admin must supply the expected SHA-256 themselves. The plugin is flagged as unverified and the admin UI shows a warning banner before it can be enabled. Intended for plugin developers testing their own builds and for admins running experimental plugins. ### Method POST ### Endpoint https://your-server.com/api/plugins/api/plugins/install-url ### Parameters #### Request Body - **downloadUrl** (string) - Required - HTTPS URL to the plugin zip - **sha256** (string) - Required - 64-hex SHA-256 of the zip bytes - **pluginId** (string) - Required - Expected plugin id (kebab-case, must match top-level directory) ### Request Example ```json { "downloadUrl": "string", "sha256": "string", "pluginId": "string" } ``` ### Responses * 200 - Plugin installed (unverified, not yet enabled) * 400 - Validation failure * 401 - Unauthorized * 403 - Forbidden — Admin role required * 409 - Plugin already installed ### Authorization #### x-api-key - **type**: apiKey - **description**: API key obtained from Profile → API Key in ChurchCRM, or via POST /public/user/login - **in**: header ### Example Request (cURL) ```bash curl -L 'https://your-server.com/api/plugins/api/plugins/install-url' \ -H 'Content-Type: application/json' \ -H 'x-api-key: ' \ -d '{ "downloadUrl": "string", "sha256": "string", "pluginId": "string" }' ``` ``` -------------------------------- ### Fetch Today's Events using CURL Source: https://docs.churchcrm.io/api/private/get-todays-events This example demonstrates how to make a request to the 'Get Today's Events' API endpoint using CURL. Remember to replace '' with your actual API key. ```curl curl -L 'https://your-server.com/api/events/today' \ -H 'Accept: application/json' \ -H 'x-api-key: ' ``` -------------------------------- ### Get User Calendar Events (FullCalendar Format) Source: https://docs.churchcrm.io/api/private/get-user-calendar-full-calendar-events Use this endpoint to retrieve calendar events for a user in a format compatible with FullCalendar. Ensure you provide the calendar ID and the desired date range (start and end). ```http GET ## https://your-server.com/api/calendars/:id/fullcalendar ``` -------------------------------- ### Install PHP 8.4 and Extensions Source: https://docs.churchcrm.io/installation/ubuntu Installs PHP 8.4 and necessary extensions using the Ondřej Surý PPA. Enables the PHP 8.4 module for Apache and restarts the Apache service. ```bash sudo apt install -y software-properties-common ``` ```bash sudo add-apt-repository ppa:ondrej/php -y ``` ```bash sudo apt update ``` ```bash sudo apt install -y php8.4 php8.4-cli php8.4-fpm php8.4-mysql \ php8.4-zip php8.4-curl php8.4-gd php8.4-bcmath \ php8.4-intl php8.4-mbstring php8.4-xml libapache2-mod-php8.4 ``` ```bash sudo a2enmod php8.4 ``` ```bash # If an older version was active: # sudo a2dismod php8.1 php8.3 ``` ```bash sudo systemctl restart apache2 ``` -------------------------------- ### CURL Request for Person Photo Source: https://docs.churchcrm.io/api/private/get-person-photo Example of how to make a CURL request to the get person photo endpoint. Ensure you replace ':personId' with the actual ID and '' with your valid API key. The 'Accept' header should be set to 'image/jpeg'. ```curl curl -L 'https://your-server.com/api/person/:personId/photo' \ -H 'Accept: image/jpeg' \ -H 'x-api-key: ' ``` -------------------------------- ### Example Response Schema for Today's Events Source: https://docs.churchcrm.io/api/private/get-todays-events This JSON structure outlines the expected format of the response when successfully retrieving today's events. It includes event ID, title, type, start and end times, and attendance counts. ```json { "events": [ { "id": 0, "title": "string", "typeName": "string", "start": "2024-07-29T15:51:28.071Z", "end": "2024-07-29T15:51:28.071Z", "checkedIn": 0, "totalAttendees": 0 } ] } ``` -------------------------------- ### Configure MariaDB Database and User Source: https://docs.churchcrm.io/installation/ubuntu Secures the MariaDB installation and then creates a dedicated database and user for ChurchCRM with all privileges. Flushes privileges and exits the MariaDB client. ```bash sudo mysql_secure_installation ``` ```bash sudo mysql -u root ``` ```sql CREATE DATABASE churchcrm CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ``` ```sql CREATE USER 'churchcrm'@'localhost' IDENTIFIED BY 'YourDBPasswordHere'; ``` ```sql GRANT ALL PRIVILEGES ON churchcrm.* TO 'churchcrm'@'localhost'; ``` ```sql FLUSH PRIVILEGES; ``` ```sql EXIT; ``` -------------------------------- ### Backup Database with mysqldump Source: https://docs.churchcrm.io/administration/upgrade Use this command to create a backup of your ChurchCRM database. Replace [username] and [database_name] with your specific credentials. ```bash mysqldump -u [username] -p [database_name] > churchcrm_backup_$(date +%Y%m%d).sql ``` -------------------------------- ### Get System Calendar Events (cURL) Source: https://docs.churchcrm.io/api/private/get-system-calendar-full-calendar-events Use this cURL command to fetch calendar events. Replace `:id` with the calendar's ID and `` with your actual API key. Optional `start` and `end` query parameters can filter events by date. ```bash curl -L 'https://your-server.com/api/systemcalendars/:id/fullcalendar' \ -H 'x-api-key: ' ``` -------------------------------- ### Example Request using cURL Source: https://docs.churchcrm.io/api/private/get-user-calendar-full-calendar-events This cURL command demonstrates how to make a request to the API endpoint, including the necessary x-api-key for authentication and the calendar ID. ```curl curl -L 'https://your-server.com/api/calendars/:id/fullcalendar' \ -H 'x-api-key: ' ``` -------------------------------- ### CSP Violation Report Body Example Source: https://docs.churchcrm.io/api/public/log-csp-report An example of the JSON body expected for a CSP violation report. This is a minimal example. ```json {} ``` -------------------------------- ### Get a family object by ID Source: https://docs.churchcrm.io/api/private/families Get a family object by ID. ```APIDOC ## Get a family object by ID ### Description Get a family object by ID. ### Method GET ### Endpoint /api/private/families/{familyID} ``` -------------------------------- ### Install a Community Plugin via API Source: https://docs.churchcrm.io/administration/plugins/installing-community-plugins This curl command demonstrates how to install a community plugin by providing its download URL to the ChurchCRM API. Replace the URL with the actual plugin zip file location. ```bash curl -s -X POST \ -H "x-api-key: $ADMIN_API_KEY" \ -H "content-type: application/json" \ -d '{"downloadUrl":"https://example.org/releases/example-plugin-1.0.0.zip"}' \ https://your-crm.example.org/plugins/api/plugins/install ``` -------------------------------- ### Example State/Province Data Source: https://docs.churchcrm.io/api/public/get-states This is an example of the JSON response structure for states or provinces. ```json [ { "code": "WA", "name": "Washington" } ] ``` -------------------------------- ### CURL Example for Creating a Fundraiser Source: https://docs.churchcrm.io/api/private/create-a-new-fundraiser-finance-role-required An example using cURL to send a POST request to create a new fundraiser. Replace `` with your actual API key. ```curl curl -L 'https://your-server.com/api/fundraisers' \ -H 'Content-Type: application/json' \ -H 'x-api-key: ' \ -d '{ "title": "string", "description": "string", "date": "2024-07-29" }' ``` -------------------------------- ### Example JSON Response Source: https://docs.churchcrm.io/api/private/252-a-37-a-07-f-5516-b-784-a-2534-ddf-4-ddfa-9 This is an example of the JSON response structure for person property definitions. ```json [ { "id": 0, "value": "string" } ] ``` -------------------------------- ### Get uploaded photo for a family Source: https://docs.churchcrm.io/api/private/families Get uploaded photo for a family (binary image). ```APIDOC ## Get uploaded photo for a family ### Description Get uploaded photo for a family (binary image). ### Method GET ### Endpoint /api/private/families/{familyID}/photo ```