Get a list of bounce emails


×
For API key Please contact with us at our SMTPprovider web chat

Get a list of the basic details of all bounce emails available to user’s organization.

URL

GET https://spsrvr.com/ga/api/v2/bounce_emails

Request Parameters

This API method does not require any additional parameters.

Response

The response will be a JSON array where each element contains the following keys.

Key Meaning Example Type
id The id of the bounce email 1@1 String
username The name of the user of the bounce email test String
domain The domain example.com String
email The email test@example.com String

Example Request

Note that the JSON response will not be “pretty formatted” as it is below.

> GET /ga/api/v2/bounce_emails HTTP/1.1
> Authorization: Basic MTo1ZTk2NDY1Yzg4M2YzMzA5ZjAxMDVhMmUxMDc2NjMyYjY4N2U2MWQy
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: SMTPProvider-studio.dev
> Accept: */*
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< Content-Type: application/json; charset=utf-8
< X-UA-Compatible: IE=Edge
< Set-Cookie: _session_id=458055a23f26f844e74f8cd7300f6445; path=/; HttpOnly
< X-Request-Id: f6e40d578ed1d9c418cca45e1b7fe532
< X-Runtime: 0.025540
< Connection: close
{
  "error_message" : null,
  "data" : [
    {
      "domain" : "test",
      "id" : "1@1",
      "username" : "test",
      "email" : "test@test"
    }
  ],
  "error_code" : null,
  "success" : true
}

PHP Example :
 

<?php

// API Configuration
$api_key = 'API_KEY_HERE_FROM_WEB_UI';
$api_url = 'http://spsrvr.com/ga/api/v2';
$request_url = "$api_url/bounce_emails";
print "\nRequesting\n$request_url\n";
$request_handle = curl_init($request_url);
curl_setopt($request_handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($request_handle, CURLOPT_USERPWD, "$api_key");
curl_setopt($request_handle, CURLOPT_POST, true);
$request_result = curl_exec($request_handle);
print "\nThe results are:\n";
print_r(json_decode($request_result));
?>