Our Powerful API
Simple connection to an advanced system - in minutes
Mailyser provides a robust API that allows you to integrate our email testing and sender address management features directly into your applications. To help you get started, this guide will take you through the steps to connect to our API and begin using its capabilities.
a) Getting Your API Key
Before you can make any API calls, you'll need to obtain your unique API key. This key is essential for authenticating your API requests.
To find your API key:
-
Log in to your Mailyser account.
-
Navigate to your profile account section.
-
Locate and copy the API key provided.
Remember to keep your API key confidential to prevent unauthorized access to your account.
b) Mailyser API Endpoints
Our API offers several endpoints that you can use to manage sender addresses and email tests. Here’s a quick overview:
Sender Address Endpoints
-
List: Retrieve a list of available sender addresses associated with your account.
-
GET /api/sender-address/list
-
Create: Add a new sender address to your account.
-
POST /api/sender-address/create
Email Test Endpoints
-
List: Get a list of current email tests with some information.
-
GET /api/email-test/list
-
Details: Access more detailed information about a specific email test.
-
GET /api/email-test/details/{test_id}
-
Create: Initiate a new email test.
-
POST /api/email-test/create
-
Start Scan: Mark an email as sent and ready for scanning.
-
POST /api/email-test/start-scan
php
<?php
$url = curl_init();
curl_setopt_array($url, array(
CURLOPT_URL => 'https://app.mailyser.io/api/sender-address/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('api_key' => 'your_api_key_here', 'email_address' => 'example@example.com'),
));
$response = curl_exec($url);
curl_close($url);
echo $response;
?>
c) Making API Calls
To make an API call, you must include your API key with each request. For endpoints that require a POST request, you will also need to provide the necessary data as JSON in the request body or as form data.
Example PHP cURL Request to Create a New Sender Address
d) Using Postman for API Calls
Postman is a popular API client that makes it easy to create, share, document, and test APIs. We have prepared a Postman collection with examples of how to use our API.
Accessing the Mailyser API Collection on Postman
-
Visit our Postman documentation page: Mailyser API on Postman.
-
Import the Mailyser API collection into your Postman application.
-
Use the pre-configured requests to test and implement the API functionality.