# Getting Started

## Specification and Overview 

### **API Access Key & Authentication**

After signing up, every user is assigned a personal API Access Key—a unique "`password`" used to access the API's data and features.

To authenticate with the Mailboxlayer API, simply attach your access\_key to the base endpoint URL: 

```javascript
http://apilayer.net/api/bulk_check?access_key=YOUR_ACCESS_KEY  
```

[**Get free API Access Key**](https://mailboxlayer.com/signup?plan=797&billing=yearly/?utm_source=DocumentationPage&utm_medium=Referral)

### **Make an API Request**

Since all verification tools are returned by the same (and only) API endpoint, making an email validation request to the Mailboxlayer API is incredibly simple.

**Most basic API request:**

Take a look at the following API request URL: (If you would like to try it yourself, [get a Free Plan](https://mailboxlayer.com/signup?plan=797&billing=yearly/?utm_source=DocumentationPage&utm_medium=Referral) and don't forget to attach your Access Key to the URL)

```javascript
https://apilayer.net/api/check
    ? access_key = YOUR_ACCESS_KEY
    & email = support@apilayer.com
```

  
As you can see, in addition to the `access_key` parameter, there is only one required parameter (`email`) to start verifying email addresses.

**Optional parameters:**

```javascript
smtp             active by default.

format           set to "1" in order to request prettified
                 JSON result set (use only for debugging!)

callback         append your preferred JSONP callback function
                 name. (See "JSONP Callbacks" section)
```

### **API Response**

All Mailboxlayer validation data is returned in universal and lightweight JSON format. Find below a standard API result set:

```javascript
{
  "email": "support@apilayer.com",
  "did_you_mean": "",
  "user": "support",
  "domain": "apilayer.com",
  "format_valid": true,
  "mx_found": true,
  "smtp_check": true,
  "catch_all": null,
  "role": true,
  "disposable": false,
  "free": false,
  "score": 0.64,
  "status": "deliverable",
  "sub_status": "role_account",
  "reason": "The mailbox exists but is a role address shared by a team.",
  "confidence": 0.9,
  "mx_provider": "microsoft",
  "normalized_email": "support@apilayer.com",
  "billable": true
}   
```

**API response objects:**

Each API response contains the following objects. Use `status` first, then `sub_status`;`score` is still returned for existing integrations.

| Object | Description |
| --- | --- |
| "email" | Contains the exact email address requested |
| "did\_you\_mean" | Contains a did-you-mean suggestion in case a potential typo has been detected. |
| "user" | Returns the local part of the request email address. (e.g. "paul" in "paul@company.com") |
| "domain" | Returns the domain of the requested email address. (e.g. "company.com" in "paul@company.com") |
| "format\_valid" | Returns true or false depending on whether or not the general syntax of the requested email address is valid. |
| "mx\_found" | Returns true or false depending on whether or not [MX-Records](https://docs.apilayer.com/mailboxlayer/docs/api-validation-tools#real-time-verification) for the requested domain could be found. |
| "smtp\_check" | Returns true or false depending on whether or not the [SMTP check](https://docs.apilayer.com/mailboxlayer/docs/api-validation-tools#real-time-verification) of the requested email address succeeded. |
| "catch\_all" | Returns true or false depending on whether or not the requested email address is found to be part of a [catch-all](https://docs.apilayer.com/mailboxlayer/docs/api-validation-tools#catch-all-detection) mailbox. |
| "role" | Returns true or false depending on whether or not the requested email address is a role email address. (e.g. "support@company.com", "postmaster@company.com") |
| "disposable" | Returns true or false depending on whether or not the requested email address is a disposable email address. (e.g. "user123@mailinator.com") |
| "free" | Returns true or false depending on whether or not the requested email address is a free email address. (e.g. "user123@gmail.com", "user123@yahoo.com") |
| "score" | Returns a numeric score between 0 and 1 reflecting the quality and deliverability of the requested email address. |
| "status" | The overall verdict: "deliverable", "undeliverable", "risky" or "unknown". "unknown" means no verdict could be reached, for example when the mail server timed out or smtp=0 was requested. |
| "sub\_status" | Why the address got its status, for example "mailbox\_not\_found" or "catch\_all". See the Status Reference below. |
| "reason" | A human-readable explanation of "sub\_status", for display. Branch on "status" and "sub\_status", not on this text. |
| "confidence" | How strongly the evidence supports "status", from 0 to 1. It is 0 when "status" is "unknown". Values may be recalibrated. |
| "mx\_provider" | The provider that receives mail for the domain, from its highest-priority MX record: "google", "microsoft", "yahoo", "proofpoint", "mimecast", "zoho" or "other". null when the domain has no MX records or the lookup fails. |
| "normalized\_email" | The address with the domain lowercased and an international domain converted to punycode. The part before the @ is unchanged. |
| "billable" | false when the result is "unknown" because verification failed on our side (timeout, greylisted, connection failed, blocked or inconclusive). These /check calls are not counted against your quota. On /bulk\_check, an entry can show false, but the whole request still counts as one call. |

**Status Reference**

| status | sub\_status | confidence | reason |
| --- | --- | --- | --- |
| deliverable | mailbox\_exists | 0.95 | The mail server confirmed that this mailbox exists. |
| deliverable | role\_account | 0.90 | The mailbox exists but is a role address shared by a team. |
| risky | catch\_all | 0.50 | The domain accepts mail for any address, so this mailbox cannot be confirmed. |
| risky | disposable | 0.90 | The address belongs to a disposable email provider. |
| undeliverable | invalid\_syntax | 1.00 | The address is not valid email syntax. |
| undeliverable | mailbox\_not\_found | 0.95 | The mail server reported that this mailbox does not exist. |
| undeliverable | mailbox\_full | 0.80 | The mail server reported that this mailbox is full. |
| undeliverable | no\_mx\_record | 0.95 | The domain has no MX records, so it cannot receive email. |
| undeliverable | domain\_not\_found | 0.99 | The domain does not exist. |
| unknown | greylisted | 0.00 | The mail server temporarily deferred the check. Try again later. |
| unknown | smtp\_timeout | 0.00 | The mail server did not respond in time. |
| unknown | smtp\_connection\_failed | 0.00 | Could not connect to the mail server. |
| unknown | smtp\_blocked | 0.00 | The mail server refused the verification request. |
| unknown | smtp\_not\_checked | 0.00 | The mailbox was not checked because smtp=0 was requested. |
| unknown | verification\_inconclusive | 0.00 | The mail server's response did not confirm whether this mailbox exists. |

### **Bulk Email Address Check**

[**Avialable on Pro Plus & Enterprise Plus**](https://mailboxlayer.com/signup?plan=797&billing=yearly/?utm_source=DocumentationPage&utm_medium=Referral)

The Mailboxlayer API also allows you to request email checks for multiple email addresses at once. To process email addresses in bulk, simply append multiple comma-separated email addresses to the API's base URL.

```javascript
https://apilayer.net/api/bulk_check
? access_key = YOUR_ACCESS_KEY
& emails = support@apilayer.com, support1@apilayer.com,
support2@mailboxlayer.com, ...
```

  
The Bulk email check endpoint is available with the [Professional Plus plan](https://mailboxlayer.com/signup?plan=797&billing=yearly/?utm_source=DocumentationPage&utm_medium=Referral), where you can search up to 25 email addresses, and with the [Enterprise Plus plan](https://mailboxlayer.com/signup?plan=797&billing=yearly/?utm_source=DocumentationPage&utm_medium=Referral), where you can search up to 100 email addresses.

The API response has the same structure described above, with an object returned for each email address in the request.

If one address in a bulk request cannot be checked, its entry contains only `email`, an `error` message, and `status: unknown` / `sub_status: verification_inconclusive`, with `confidence` 0 and `mx_provider` and `normalized_email` set to null. The other entries are unaffected. Known issue: in such an entry, `email` is returned as an object (`{"_display_name": "", "_mailbox": "user2", "_hostname": "example.com"}`) instead of a string; this will be fixed in a later release. If the bulk request cannot be processed at all, it returns error 500 instead of a list.

### **256-bit HTTPS Encryption**

[**Avialable on All Plans**](https://mailboxlayer.com/signup?plan=797&billing=yearly/?utm_source=DocumentationPage&utm_medium=Referral)

All Customers may establish a secure connection (industry-standard `SSL)` to the Mailboxlayer API and all data provided by and accessible through it. 

To connect securely, simply attach an s to the HTTP Protocol (resulting in `https://`).  
 

### **Rate Limits**

Requests to the API are rate-limited based on your current subscription plan:

| Subscription Plan | Rate Limit |
| --- | --- |
| Free | 50 Requests / Minute |
| Basic | 100 Requests / Minute |
| Professional Plus | 300 Requests / Minute |
| Enterprise Plus | 300 Requests / Minute |

> **Important:** In order to ensure maximum API performance, we recommend all users to limit their usage to a maximum of 5 API requests per second.

If your rate limit for a given minute has been exceeded, the API will return an error carrying the type `rate_limit_reached`. This error is listed in the API Error Codes section below. *Limits apply over a rolling 60-second window: requests made in the previous 60 seconds may not exceed your plan's limit. Capacity frees up gradually rather than resetting at the start of each minute.*

###   
**API Error Codes**

If your query fails, the Mailboxlayer API will return a 3-digit error code, an internal error type, and a plain-text "`info`" object containing suggestions for the user.

Find below an example error - triggered when the user did not provide an email address to validate:

```javascript
{
  "success": false,
  "error": {
    "code": 210,
    "type": "no_email_address_supplied",
    "info": "Please specify an email address. [Example: support@apilayer.com]"    
  }
}               
```

**Common API errors:**

| Type | Message | Description |
| --- | --- | --- |
| 404 | "404\_not\_found" | User requested a resource which does not exist. |
| 101 | "missing\_access\_key" | User did not supply an Access Key. |
| 101 | "invalid\_access\_key" | User entered an invalid Access Key. |
| 103 | "invalid\_api\_function" | User requested a non-existent API Function. |
| 104 | "usage\_limit\_reached" | User has reached or exceeded his subscription plan's monthly API Request Allowance. |
| 210 | "no\_email\_address\_supplied" | User did not provide an email address. |
| 211 | "format\_not\_valid" | User has provided an email address with an invalid format. |
| 106 | "rate\_limit\_reached" | User has exceeded the maximum allowed rate limitation and is referred to the "Rate Limits" section of the API Documentation. |
| 102 | "inactive\_user" | The user's account is not active. User will be prompted to get in touch with Customer Support. |
| 310 | "catch\_all\_access\_restricted" | The user's current subscription plan does not support catch-all detection. |
| 999 | "timeout" | An unexpected timeout issue occurred. |

###   
**JSONP Callbacks**

The Mailboxlayer API also supports [JSONP](https://www.w3schools.com/js/js_json_jsonp.asp) Callbacks. To use this feature, simply attach: `callback = CALLBACK_FUNCTION` to any API Endpoint, and the result set will be returned as the callback function you specified.

**Example query:**

```javascript
http://apilayer.net/api/validate?callback=CALLBACK_FUNCTION  
```

Not sure about what `JSONP` does? Here's a helpful [Stack Overflow](http://stackoverflow.com/questions/2067472/what-is-jsonp-all-about) thread.

**Example response:**

```javascript
CALLBACK_FUNCTION ({
{
  "email": "support@apilayer.com",
  "did_you_mean": "",
  "user": "support",
  "domain": "apilayer.net",
  "format_valid": true,
  "smtp_check": true,
  "role": true,
  "disposable": false,
  "free": false,
  "score": 0.8
}
})
                
```

> **Note:** The API also supports Access-Control ([CORS](http://www.w3.org/wiki/CORS_Enabled)) headers.

### **JSON Formatting**

To enhance readability, the Mailboxlayer API includes a built-in JSON formatter that displays the API's Response in a typical JSON format.

To enable this function, simply attach `format=1` to any valid API request URL:

```javascript
http://apilayer.net/api/bulk_check
    ? access_key = YOUR_ACCESS_KEY
    [...]
    & format = 1
```

Please be aware that enabling the format increases the API response's file size and might cause problems when parsing it. Therefore, it should be used only for debugging purposes.

[← Quickstart Guide](https://docs.apilayer.com/mailboxlayer/docs/quickstart-guide)

[Code Examples →](https://docs.apilayer.com/mailboxlayer/docs/code-examples)

* * *

Chat with APILayer´s team on [Discord](https://discord.com/invite/hgjA78638n).

Questions? [Contact Sales](https://mailboxlayer.com/contact) .

Need help? [Contact Support](https://mailboxlayer.com/contact) .

© 2026 APILayer. All rights reserved.
