# Moolre Full API Reference This file contains the full technical specification for Moolre APIs. It is optimized for LLM ingestion. ## Send SMS **Method**: POST **URL**: https://api.moolre.com/open/sms/send The Send SMS (POST) API allows you to send bulk or single SMS messages to recipients across any network. Note: This API requires X-API-VASKEY in the header for authentication. ### Headers - `X-Scenario-Key` (string): An optional scenario key for testing purposes. ### Request Body - `type` (integer): Required. ID of the sms sending function. Must be 1. - `senderid` (string): Required. Your registered and approved Sender ID (max 11 chars). - `messages` (array): Required. An array of message objects containing recipient, message, and optional ref. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "SMS01", "message": "Success" } ``` #### 400 - Unapproved Sender ID ```json { "status": 0, "code": "ASMS07", "message": "Sender ID is not approved..." } ``` --- ## Send SMS (GET) **Method**: GET **URL**: https://api.moolre.com/open/sms/send Send SMS via a GET request using query parameters. ### Headers - `X-API-VASKEY` (string): Required. Your SMS service VAS Key. ### Query Parameters - `type` (integer): Required. Must be 1. - `senderid` (string): Required. Your approved Sender ID. - `recipient` (string): Required. Recipient phone number. - `message` (string): Required. Message content. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "SMS01", "message": "Success" } ``` --- ## SMS Status **Method**: POST **URL**: https://api.moolre.com/open/sms/query Check the delivery status of sent SMS messages. Note: This API requires X-API-VASKEY in the header for authentication. ### Headers - `X-Scenario-Key` (string): An optional scenario key for testing purposes. ### Request Body - `type` (integer): Required. Must be 5. - `ref` (array): Required. Array of message references to check. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "SS01", "message": "Success", "data": [ { "ref": "uuid-001", "status": "Delivered" } ] } ``` --- ## Create Sender ID **Method**: POST **URL**: https://api.moolre.com/open/sms/send Request a new Sender ID for your SMS campaigns. Note: This API requires X-API-VASKEY in the header for authentication. ### Headers - `X-Scenario-Key` (string): An optional scenario key for testing purposes. ### Request Body - `type` (integer): Required. Must be 3. - `senderids` (array): Required. Array of Sender IDs to register. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "SID01", "message": "Request received" } ``` --- ## Sender ID Status **Method**: POST **URL**: https://api.moolre.com/open/sms/query Check the approval status of a Sender ID. Note: This API requires X-API-VASKEY in the header for authentication. ### Request Body - `type` (integer): Required. Must be 1. - `senderid` (string): Required. Sender ID to check. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "SID02", "message": "Approved" } ``` --- ## SMS Account Status **Method**: POST **URL**: https://api.moolre.com/open/sms/query Check your SMS credit balance. Note: This API requires X-API-VASKEY in the header for authentication. ### Request Body - `type` (integer): Required. Must be 2. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "BAL01", "message": "Success", "balance": 500.5 } ``` --- ## Get Templates **Method**: GET **URL**: https://api.moolre.com/open/whatsapp/template Fetch your approved WhatsApp message templates. Note: This API requires X-API-VASKEY in the header for authentication. ### Headers - `X-API-VASKEY` (string): Required. Your unique WhatsApp service VAS Key provided in the Moolre Portal. ### Success Response Examples #### 200 (Approved) - Success ```json { "status": 1, "code": "WAS200", "message": "Templates retrieved successfully", "data": [ { "id": "1218877297066056", "name": "promotion", "language": "en", "status": "APPROVED", "message": "Hello {{1}},\n\nMelchizedek Technologies would like to share information about our {{2}} designed to support businesses like {{3}}.\n\nIf you would like to learn more or speak with our team, please reply to this message and we will be happy to assist.\n", "placeholders": [ "1", "2", "3" ] } ] } ``` #### 200 (Rejected) - Success ```json { "status": 1, "code": "WAS200", "message": "Templates retrieved successfully", "data": [ { "id": "1470051854524583", "name": "whatsapp_test", "language": "en", "status": "REJECTED", "message": "Hello {{1}},\n\nYou are receiving this message from Melchizedek Technologies in response to your request with {{2}}.\n\nIf you need any assistance, please reply to this message and our support team will assist you.\n", "placeholders": [ "1", "2" ] } ] } ``` #### 200 (Pending) - Success ```json { "status": 1, "code": "WAS200", "message": "Templates retrieved successfully", "data": [ { "id": "1709192906730643", "name": "update", "language": "en", "status": "PENDING", "message": "Hello {{1}},\n\nThank you for contacting Melchizedek Technologies.\nYour request regarding {{2}} has been received and our team will assist you shortly.\n", "placeholders": [ "1", "2" ] } ] } ``` --- ## Send Message **Method**: POST **URL**: https://api.moolre.com/open/whatsapp/send Send batch WhatsApp messages using an approved template name. The unique reference (ref) is optional; however, without it, the message status cannot be tracked. ### Headers - `X-API-VASKEY` (string): Required. Your unique WhatsApp service VAS Key provided in the Moolre Portal. ### Request Body - `template_name` (string): Required. The name of the approved WhatsApp template. - `language` (string): Required. The language code for the template (English only). - `messages` (array): Required. An array of message objects containing recipient, optional ref, and placeholders. Note: If ref is omitted, the status cannot be checked later. ### Success Response Examples #### 200 (Success) - Success ```json { "status": 1, "code": "WAS200", "message": "suceess", "error": [], "data": [] } ``` #### 200 (Duplicate Refs) - Warning ```json { "status": 1, "code": "WAS200", "error": "Some ref are not unique, corresponding messages will not be sent", "message": "", "data": [ { "recipient": "233531419000", "ref": "879883HGU334553GF887799HF20004" }, { "recipient": "233531419011", "ref": "879883HGU334553GF887799HF20006" } ] } ``` #### 401 (Insufficient Balance) - Insufficient Balance ```json { "status": 0, "code": "WAS401", "message": "Insufficient balance to send messages. Please top up your WhatsApp bundle." } ``` --- ## Message Status **Method**: POST **URL**: https://api.moolre.com/open/whatsapp/status Track the delivery status of your WhatsApp messages using their unique references. Supports batch status checks. ### Headers - `X-API-VASKEY` (string): Required. Your unique WhatsApp service VAS Key provided in the Moolre Portal. ### Request Body - `ref` (array): Required. An array of unique message references to check. ### Success Response Examples #### 200 (Success) - Success ```json { "status": 1, "code": "WAS200", "message": "success", "data": [ { "ref": "879883HGUGF45583499HF2089001", "status": "read" }, { "ref": "879883HGUGF45583499HF2089005", "status": "accepted" } ] } ``` --- ## Create Account **Method**: POST **URL**: https://api.moolre.com/open/account/create Create a new business wallet/account. ### Headers - `X-API-USER` (string): Required. Username - `X-API-KEY` (string): Required. Secret Key ### Request Body - `type` (integer): Required. Must be 1. - `accountname` (string): Required. Name for the new account. - `currency` (string): Required. Currency code (e.g., GHS). ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "ACC01", "message": "Success", "accountnumber": "1234567890" } ``` --- ## Update Account **Method**: POST **URL**: https://api.moolre.com/open/account/update Update existing account details. ### Headers - `X-API-USER` (string): Required. Username - `X-API-KEY` (string): Required. Secret Key ### Request Body - `type` (integer): Required. Must be 1. - `accountnumber` (string): Required. The account number to update. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "ACC02", "message": "Success" } ``` --- ## Account Status **Method**: POST **URL**: https://api.moolre.com/open/account/status Check wallet balance and status. ### Headers - `X-API-USER` (string): Required. Username - `X-API-KEY` (string): Required. Secret Key ### Request Body - `type` (integer): Required. Must be 1. - `accountnumber` (string): Required. Account number to check. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "ACC03", "message": "Success", "balance": "1000.00" } ``` --- ## List Transactions **Method**: POST **URL**: https://api.moolre.com/open/account/transactions Fetch transaction history for an account. ### Headers - `X-API-USER` (string): Required. Username - `X-API-KEY` (string): Required. Secret Key ### Request Body - `type` (integer): Required. Must be 2. - `accountnumber` (string): Required. Account number. - `limit` (integer): Number of records to return. ### Success Response Examples #### 200 - Success ```json { "status": 1, "data": [ { "id": 1, "amount": "10", "date": "2024-01-01" } ] } ``` --- ## Validate Name **Method**: POST **URL**: https://api.moolre.com/open/transact/validate Verify the name on a Mobile Money or Bank account. ### Headers - `X-API-USER` (string): Required. Username - `X-API-KEY` (string): Required. Secret Key ### Request Body - `type` (integer): Required. Must be 1. - `receiver` (string): Required. Account/Phone number to validate. - `channel` (string): Required. Channel ID (e.g., 13 for MTN). ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "VAL01", "message": "Success", "data": { "name": "John Doe" } } ``` --- ## Initiate Transfer **Method**: POST **URL**: https://api.moolre.com/open/transact/transfer Send money to a recipient. ### Headers - `X-API-USER` (string): Required. Username - `X-API-KEY` (string): Required. Secret Key ### Request Body - `type` (integer): Required. Must be 1. - `channel` (string): Required. Channel ID. - `amount` (string): Required. Amount to send. - `receiver` (string): Required. Recipient identifier. - `externalref` (string): Required. Your unique reference. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "TR01", "message": "Initiated", "data": "31830714" } ``` --- ## Transfer Status **Method**: POST **URL**: https://api.moolre.com/open/transact/status Check the status of a transfer. ### Headers - `X-API-USER` (string): Required. Username - `X-API-KEY` (string): Required. Secret Key ### Request Body - `type` (integer): Required. Must be 1. - `idtype` (string): Required. transactionid or externalref - `id` (string): Required. The ID value. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "SS01", "message": "Success", "data": { "txstatus": 1 } } ``` --- ## Initiate Payment **Method**: POST **URL**: https://api.moolre.com/open/transact/payment Initiate a payment request from a customer. ### Headers - `X-API-USER` (string): Required. Username - `X-API-PUBKEY` (string): Required. Public Key ### Request Body - `type` (integer): Required. Must be 1. - `channel` (string): Required. Channel ID. - `amount` (string): Required. Amount. - `payer` (string): Required. Payer ID (Phone). - `externalref` (string): Required. Reference. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "TR099", "data": "uuid-123" } ``` --- ## Generate Payment ID **Method**: POST **URL**: https://api.moolre.com/open/transact/payment Generate a short code for payments. ### Headers - `X-API-USER` (string): Required. Username - `X-API-PUBKEY` (string): Required. Public Key ### Request Body - `type` (integer): Required. Must be 2. - `phone` (string): Required. Customer phone. - `name` (string): Required. Customer name. ### Success Response Examples #### 200 - Success ```json { "status": 1, "data": { "paymentid": "888123" } } ``` --- ## Generate Payment Link **Method**: POST **URL**: https://api.moolre.com/open/transact/payment Create a hosted payment page URL. ### Headers - `X-API-USER` (string): Required. Username - `X-API-PUBKEY` (string): Required. Public Key ### Request Body - `type` (integer): Required. Must be 1. - `amount` (string): Required. Amount. - `callback` (string): Required. Callback URL. ### Success Response Examples #### 200 - Success ```json { "status": 1, "data": { "link": "https://pay.moolre.com/tx-123" } } ``` --- ## Payment Status **Method**: POST **URL**: https://api.moolre.com/open/transact/status Check status of a payment. ### Headers - `X-API-USER` (string): Required. Username - `X-API-PUBKEY` (string): Required. Public Key ### Request Body - `type` (integer): Required. Must be 1. - `idtype` (string): Required. transactionid or externalref - `id` (string): Required. ID value. ### Success Response Examples #### 200 - Success ```json { "status": 1, "code": "SS01", "data": { "txstatus": 1 } } ``` --- ## Miscellaneous Data **Method**: GET **URL**: https://api.moolre.com/open/transact/data Fetch banks, mobile money channels, etc. ### Query Parameters - `country` (string): Required. Country code (e.g., gha). - `data` (string): Required. Type of data (e.g., banks). ### Success Response Examples #### 200 - Success ```json { "status": "1", "code": "DA01", "message": "sublistid for Ghana Bank Transfer", "data": [ { "code": "300303", "name": "Absa Bank Ghana Limited" }, { "code": "300329", "name": "Access Bank Limited" }, { "code": "300345", "name": "Adehyeman Savings and Loans" }, { "code": "300341", "name": "AFFINITY S&L" }, { "code": "300307", "name": "Agricultural Development Bank (ADB)" }, { "code": "300306", "name": "ARB Apex Bank Limited" }, { "code": "300320", "name": "Bank of Africa" }, { "code": "300335", "name": "BEST POINT S&L" }, { "code": "300313", "name": "Cal Bank Limited" }, { "code": "300331", "name": "Consolidated Bank Ghana" }, { "code": "300312", "name": "Ecobank Ghana Ltd" }, { "code": "300380", "name": "Etranzact" }, { "code": "300323", "name": "Fidelity Bank Limited" }, { "code": "300316", "name": "First Atlantic Bank" }, { "code": "300319", "name": "First Bank of Nigeria (FBN)" }, { "code": "300334", "name": "First National Bank (FNB)" }, { "code": "300304", "name": "GCB Bank Limited" }, { "code": "300362", "name": "GHL Bank" }, { "code": "300595", "name": "GhanaPay" }, { "code": "300574", "name": "G-Money" }, { "code": "300322", "name": "Guaranty Trust Bank (GT Bank)" }, { "code": "300305", "name": "National Investment Bank" }, { "code": "300349", "name": "Opportunity International Savings and Loans" }, { "code": "300317", "name": "Prudential Bank Ltd" }, { "code": "300310", "name": "Republic Bank Limited" }, { "code": "300324", "name": "OmniBSIC Bank" }, { "code": "300361", "name": "Services Integrity Savings & Loans" }, { "code": "300356", "name": "Sinapi ABA Savings And Loans" }, { "code": "300308", "name": "Societe Generale Ghana" }, { "code": "300318", "name": "Stanbic Bank" }, { "code": "300302", "name": "Standard Chartered Bank" }, { "code": "300325", "name": "United Bank of Africa" }, { "code": "300309", "name": "Universal Merchant Bank" }, { "code": "300479", "name": "Zeepay Ghana Limited" }, { "code": "300311", "name": "Zenith bank Ghana Ltd" } ] } ``` --- ## Payment Webhook **Method**: POST **URL**: {{YOUR_CALLBACK_URL}} Moolre sends real-time HTTP POST notifications (callbacks) to your server when a payment is received or its status changes. ### Request Body - `status` (integer): Required. 1 for success - `code` (string): Required. P01 - `message` (string): Required. Transaction Successful - `data` (object): Required. The transaction details ### Success Response Examples --- ## USSD Integration **Method**: USSD **URL**: *203# Our USSD integration allows your customers to make payments, check balances, and perform other actions using standard USSD codes. ### Success Response Examples ---