NCS Email API Documentation

API endpoint for sending emails through Nigeria Customs Service

Endpoint Information

POST https://api-email.nigeriatradehub.gov.ng/send.php

Parameters

Parameter Required Description Example
secret Yes API secret key for authentication secretKey
to Yes Recipient email address recipient@example.com
subject Yes Email subject line Test Subject
body Yes HTML email content <p>Test Body</p>

Response Format

The API returns a JSON response with a status and message:

Success: {"status": "success", "message": "success"}
Error: {"status": "error", "message": "Error description"}

API Usage


            
        url: https://api-email.nigeriatradehub.gov.ng/send.php,
        method: POST,

               {
                            "secret": "secretKey",
                            "to": "recipient@example.com",
                            "subject": "Test Subject",
                            "body": "Test Body"
                }
        

cURL Implementation


# Send email using cURL
curl -X POST "https://api-email.nigeriatradehub.gov.ng/send.php" \
     -d "secret=secretKey" \
     -d "to=recipient@example.com" \
     -d "subject=Test Subject" \
     -d "body=Test Body"