> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Validate Frontend User Email

GET https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/{email}

Checks if an email address is associated with a BigCommerce customer account and a Company user account.

Equivalent Storefront GraphQL API Query: `userEmailCheck`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).

The `isValid` value in the response indicates whether or not the email address is used by an existing customer or Company user. The following values are possible:

* `0` — The email address is associated with a Company user account and a corresponding customer account.
* `1` — The email address is not associated with a customer account or a Company user account.
* `2` — The email address is associated with a customer account, but not a Company user account.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/b2b/storefront/company/companies/get-companies-validations-fronted-user-emails-email

## Authentication

- `Authorization` header (bearer token, required) — ### Authentication header | Header | Argument | Description | | :-------------- | :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Authorization` | `Bearer {{B2B_JWT_TOKEN}}` | You can obtain this token using the steps described in the [REST Storefront API](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) section\[...] |

## Request

### Path parameters

- `email` (string, required) — The email address of the user to be validated.

### Query parameters

- `storeHash` (string, required) — The unique alphanumeric store hash for the BigCommerce store.
- `role` (enum, required) — The ID of the role assigned to the Company user account as given below. | Value | Code | | --- | --- | | 0 | Admin | | 1 | Senior Buyer | | 2 | Junior Buyer | | 3 | Super Admin | | 4 | Unknown |
  - Allowed values: `0`, `1`, `2`, `3`, `4`
- `companyId` (string, optional) — The unique numeric ID of the Company account.

## Response

### 200

OK

- `message` (string, optional)
- `code` (double, optional, default: 200)
- `data` (CompaniesValidationsFrontendUserEmailsEmailGetResponsesContentApplicationJsonSchemaData, optional)

## Types

### CompaniesValidationsFrontendUserEmailsEmailGetResponsesContentApplicationJsonSchemaData

- `isValid` (string, optional) — The validation status of the account as outlined above.
- `userInfo` (CompaniesValidationsFrontendUserEmailsEmailGetResponsesContentApplicationJsonSchemaDataUserInfo, optional)

### CompaniesValidationsFrontendUserEmailsEmailGetResponsesContentApplicationJsonSchemaDataUserInfo

- `firstName` (string, optional) — The user's first name.
- `lastName` (string, optional) — The user's last name.
- `email` (string, optional) — The email address associated with the user's account.
- `id` (string, optional) — The unique ID for the customer account.
- `phoneNumber` (string, optional) — The phone number associated with the user's account.
- `role` (enum, optional) — The ID of the role assigned to the Company user account as defined at [Specifying User Role](/developer/api-reference/rest/b2b/storefront/company/companies#specifying-user-role).
  - Allowed values: `0`, `1`, `2`

## Examples

**Response**

```json
{
  "message": "string",
  "code": 200,
  "data": {
    "isValid": "1",
    "userInfo": {
      "firstName": "Marie",
      "lastName": "Curie",
      "email": "m.curie@greatbuys.com",
      "id": "123",
      "phoneNumber": "8001234567",
      "role": "1"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com"

querystring = {"role":"0","storeHash":"abc123"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com?role=0&storeHash=abc123';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com?role=0&storeHash=abc123"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com?role=0&storeHash=abc123")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com?role=0&storeHash=abc123")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com?role=0&storeHash=abc123', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com?role=0&storeHash=abc123");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v2/companies/validations/frontend/user-emails/user%40example.com?role=0&storeHash=abc123")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```