PHP 7.3 reached end of support in December 2021 and Adobe Commerce 2.3.x reaches end of support in September 2022. You may want to consider planning your upgrade now to Adobe Commerce 2.4.x and PHP 7.4.x to help maintain PCI compliance.
isEmailAvailable query
The isEmailAvailable
query checks whether the specified email has already been used to create a customer account. A value of true
indicates the email address is available, and the customer can use the email address to create an account.
Syntax
{isEmailAvailable (email): {IsEmailAvailableOutput}}
Example usage
The following example checks whether the email address customer@example.com
is available to create a customer account.
Request:
1
2
3
4
5
{
isEmailAvailable(email: "customer@example.com") {
is_email_available
}
}
Response:
1
2
3
4
5
6
7
{
"data": {
"isEmailAvailable": {
"is_email_available": true
}
}
}
Input attribute
Attribute | Data Type | Description |
---|---|---|
email |
String! | The email address to check |
Output attribute
Attribute | Data Type | Description |
---|---|---|
is_email_available |
Boolean | A value of true indicates the email address is available, and the customer can use the email address to create an account |
Related topics
Errors
Error | Description |
---|---|
Email is invalid |
The given email-id is not in a proper format. |
Field isEmailAvailable.email of required type String! was not provided |
The value specified in the isEmailAvailable.email argument is empty. |