PAY HERO DOCS
  • Introduction-Pay Hero Developer APIs
  • Creating Account
  • Authorization
  • GET: Service Wallet Balance
  • GET: Payments Wallet Balance
  • POST: Service Wallet Top Up
  • POST: Initiate MPESA STK Push Request
  • Payment Button
  • Lipwa Link
  • POST: Pay Hero Wallet- Withdraw To Mobile
  • GET: Account Transactions
  • GET: Transaction Status
  • WooCommerce Plugin
    • Plugin Installation
  • Shopify
  • Videos
  • Other Integrations
  • Email API Reference
    • Register SMTP
    • Send Email
    • Mail status
  • WhatsApp API Reference
    • Introduction
    • Getting Started
    • Send API Whats App Text
    • Bulk WhatsApp API Messaging
    • Bulk WhatsApp Using UI/CSV File
Powered by GitBook
On this page

Was this helpful?

  1. Email API Reference

Mail status

Check the status of emails sent

PreviousSend EmailNextWhatsApp API Reference

Was this helpful?

Mail Status

get

GET /mailer/mail_status

This endpoint retrieves the status of mail sent through the applet.

Request

  • Method: GET

  • URL: https://applet.payherokenya.com/mailer/mail_status

  • Query Parameters:

    • batch_id (string, required) - The ID of the batch for which the mail status is to be retrieved.

    • api_username (string, required) - The username for API authentication.

    • page (integer, required) - The page number for paginated results.

    • per_page (integer, required) - The number of records to be displayed per page.

Response

The response is in JSON format and follows the schema below:

{
  "data": [
    {
      "batch_id": "string",
      "recipient_email": "string",
      "subject": "string",
      "status": 0,
      "description": "string",
      "updated_at": "string"
    }
  ],
  "pagination": {
    "current_page": "string",
    "per_page": "string",
    "total_records": 0,
    "total_pages": 0
  }
}

The data array contains information about the mail status, including batch ID, recipient email, subject, status code, description, and update timestamp. The pagination object provides details about the current page, records per page, total records, and total pages.

Authorizations
Query parameters
batch_idstringOptionalExample: 67d81cfdacc
api_usernamestringOptionalExample: jeBrLJ4AIRP2AGbOt
pageintegerOptionalExample: 1
per_pageintegerOptionalExample: 100
Responses
200
OK
application/json
Responseobject
get
GET /mailer/mail_status HTTP/1.1
Host: applet.payherokenya.com
Authorization: noauth YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "data": [
    {
      "batch_id": "67d81c2dacc",
      "recipient_email": "test@gmail.com",
      "subject": "Survival is winning",
      "status": 1,
      "description": "Email successfully sent to: test@gmail.com",
      "updated_at": "2025-03-17 13:01:04"
    }
  ],
  "pagination": {
    "current_page": "1",
    "per_page": "100",
    "total_records": 1,
    "total_pages": 1
  }
}