The MAILSUGGEST endpoint suggests likely email addresses based on a user's last name, first name, and the characters already entered, optionally biased toward domains common in a given country.
MAILSUGGEST while the user is still typing their
email address, to offer autocomplete suggestions based on
their name. To validate a complete email address instead,
see
Email API — Validate an email address →
MAILSUGGEST
Request
Both GET and POST are supported.
Code examples
Testa Testb, no partial email entered yet
Send all parameters in the request body using
Content-Type: application/x-www-form-urlencoded.
The server address remains in the URL.
Code examples
Testa Testb, no partial email entered yet
Parameters
| Parameter | Description | Mand / Opt |
|---|---|---|
| Nom |
Last name entered by the user.
Can be left empty
|
Mandatory |
| Prenom |
First name entered by the user.
Can be left empty
|
Mandatory |
|
Part of the email address already entered by
the user.
Can be left empty
|
Mandatory | |
| Pays |
ISO 3166-1 alpha-3 country code, used to bias
suggested domains toward a specific country.
Default:
FRA
|
Optional |
| Licence | Your DQE licence key. Contact support if you do not yet have one. | Mandatory |
Response
On success, the API returns a JSON object containing the suggested email addresses.
| Key | Description | Type |
|---|---|---|
| Instance | Legacy field, no longer used. | String |
| syntaxe |
ok or ko, depending
on the syntax of the email already entered.
|
String |
| suggest | List of suggested email addresses. | Array |
Response example
Testa Testb, no partial email entered yet
Errors
| HTTP | Error type | Response |
|---|---|---|
| 400 |
Missing Licence parameter
|
Bad Request |
| 400 |
Empty Licence parameter
|
Bad Request |
| — | Incorrect licence number | Empty response body (no error code) |
Test the API
Click the button below to test this endpoint live in your browser.
Open console
See also
Related to