Knowledgebase

Add FBL Account

Method: POST
Endpoint: /api/addFBLAccount

Parameters

Parameter Type Required Description 
email string Yes Email of FBL account
host string Yes Host of provider 
port integer Yes Port to connect to the FBL account
username string Yes Username of FBL account
method pop, imap Yes Method to connect to the FBL account
password string No Password of FBL account
folder string (default : INBOX) No Folder name for your bounce account where complaint emails exist
delete_emails 0,1 (default: 0) No 0 = Do not delete proccessed emails
1 = Delete processed emails
validate_certificates 0,1 (default: 0) No 0 = Don not validate certificate
1 = Validate certificate
status 0,1 (default: 0) No Status of bounce account
0 = Inctive
1 = Active
encryption none,ssl,tls No Encryption method for FBL account
response 0, 1 (default: 0) No Get full response of the operation


Response Parameters

Parameter Type Description
status JSON Success or Error
result JSON Result of the operation
response JSON Output of the operation
 

Example Request (CURL)

<?php
// Authentication
$api_token	=	'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain		=	'http://www.anydomain.com'; // Your Mumara Domain Name

// API Endpoint
$endpoint	=	'/api/addFBLAccount';

$params = [
        'email'                 =>'[email protected]',
        'password'              => 'AXp145me]af',
        'validate_certificates' => '0',
        'username'              => 'johnlee',
        'port'                  => '1',
        'host'                  => 'yahoo.com',
        'method'                => 'imap',
        'delete_emails'         => '1',
        'response'              => '1'
];

// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_HTTPHEADER,
    array('Content-Type: application/json', 'Authorization: Bearer ' . $api_token));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Executing cURL
$output = curl_exec ($ch);

// Printing Output
echo "<pre>";
echo json_encode(json_decode($output),JSON_PRETTY_PRINT );

// Closing cURL
curl_close ($ch);
?>

 

Example Response (JSON)

{
    "status": "success",
    "response": "Success: FBL Account has been successfully added.",
    "result": {
        "name": "[email protected]",
        "host": "yahoo.com",
        "port": "1",
        "username": "johnlee",
        "password": "eyJpdiI6InJaeGJFeEtlRDBiSGg3YmtMalwvY2xRPT0iLCJ2YWx1ZSI6ImNmdTJYbGlQWVdPVTg5QzBGY1QxcjNrWkl6ZTMyaXp3Z3dhYWVmUEN0RHc9IiwibWFjIjoiZDcyMzljNzhkMjU2YWIzZTRiZWEzNGMxOWU3NjBkYmUwYTdmZDJjMmZlOWNkZmNmZTM4NTkwODM0MmRjMGYyMSJ9",
        "validate_certificates": "0",
        "delete_emails": "1",
        "processing_protocols": "imap",
        "folder": "INBOX",
        "user_id": 2,
        "updated_at": "2020-10-12 11:43:59",
        "created_at": "2020-10-12 11:43:59",
        "id": 18
    }
}
Status value of the success response will be "success"

 

Example Error Response (JSON)

{
    "status": "error",
    "response": {
        "email": [
            "Error: Missing required parameter, email"
        ],
        "host": [
            "Error: Missing required parameter, host"
        ],
        "port": [
            "Error: Missing required parameter, port"
        ],
        "username": [
            "Error: Missing required parameter, username"
        ],
        "method": [
            "Error: Missing required parameter, method"
        ]
    }
}

 

Possible Errors

  • Invalid validate certificates.
  • Invalid host
  • Access Denied
POST
/api/addFBLAccount
Try it out