> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check user exists

> Verify if a user account already exists with the provided email address.

## Request

```http theme={null}
POST /auth/check-user
Content-Type: application/json
x-shop-id: {shopId}
{
  "email": "test@gmail.com"
}
```

## Headers

| Header         | Type   | Description                                            |
| -------------- | ------ | ------------------------------------------------------ |
| `Content-Type` | string | Always set to `application/json`.                      |
| `x-shop-id`    | string | Shop identifier to associate the user with your store. |

## Body parameters

| Field   | Type   | Required | Description                                  |
| ------- | ------ | -------- | -------------------------------------------- |
| `email` | string | Yes      | Email address to check for existing account. |

## Successful response

```json theme={null}
{
    "status": 200,
    "success": true,
    "message": "User check completed",
    "data": {
        "exists": true,
        "email": "test@gmail.com"
    }
}
```

<Check>
  You receive `exists: true` if the user account exists, or `exists: false` if
  no account is found.
</Check>

## Error response

```json theme={null}
{
    "status": 500,
    "success": false,
    "message": "Failed to check user. Please try again.",
    "data": {}
}
```


## OpenAPI

````yaml POST /auth/check-user
openapi: 3.1.0
info:
  title: Salesive Store API
  description: >-
    REST interface for querying products, categories, and merchandising banners
    exposed by Salesive storefronts.
  version: 1.0.0
servers:
  - description: Production
    url: https://store.salesive.com/api/v1
security:
  - BearerAuth: []
    ShopIdHeader: []
paths:
  /auth/check-user:
    post:
      summary: Check user exists
      description: Verify if a user account already exists with the provided email address.
      parameters:
        - $ref: '#/components/parameters/XShopIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                  description: Email address to check for existing account.
      responses:
        '200':
          description: User check completed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - success
                  - message
                  - data
                properties:
                  status:
                    type: integer
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    required:
                      - exists
                      - email
                    properties:
                      exists:
                        type: boolean
                        description: True if user exists, false otherwise.
                      email:
                        type: string
                        format: email
        '500':
          description: Failed to check user.
      security: []
components:
  parameters:
    XShopIdHeader:
      name: x-shop-id
      in: header
      description: >-
        Optional identifier that scopes responses to a specific storefront when
        the referer cannot be inferred.
      required: false
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT issued by the Salesive Store API for authenticated shoppers.
    ShopIdHeader:
      type: apiKey
      in: header
      name: x-shop-id
      description: >-
        Optional storefront identifier sent as a header to scope responses to a
        specific shop. Try It requests remember this value once provided.

````