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

# Search Customer By Email

> Endpoint to retrieve customer details by email

```bash Request Example theme={null}
curl --request GET 'https://api.mayar.id/hl/v2/customers/detail?email=budi.santoso@example.com' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here'
```

```json Response Example 200 theme={null}
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "id": "a1b2c3d4-e5f6-4789-a012-3456789abcde",
        "createdAt": 1761557824548,
        "email": "budi.santoso@example.com",
        "mobile": "081234567890",
        "name": "Budi Santoso",
        "status": "active",
        "updatedAt": 1761557824548,
        "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413",
        "user": {
            "id": "348e083d-315a-4e5c-96b1-5a2a98c48413",
            "name": "Toko Mayar Demo",
            "urlHook": "https://webhook.example.com/mayar-payment-webhook",
            "email": "merchant@example.com",
            "paymeLink": "testingmayar",
            "isSelfDomain": false,
            "accountId": "be305ea4-5fe1-4bb9-a5c8-6bc1d0bfd279",
            "account": {
                "id": "be305ea4-5fe1-4bb9-a5c8-6bc1d0bfd279",
                "name": "Mayar Demo Account",
                "imageId": "efeecb5d-acac-45f8-8249-396f8a5b6a95",
                "logo": {
                    "id": "efeecb5d-acac-45f8-8249-396f8a5b6a95",
                    "fileType": "jpeg",
                    "url": "https://media.mayar.id/images/efeecb5d-acac-45f8-8249-396f8a5b6a95.jpeg"
                }
            }
        }
    }
}
```

Endpoint:

```Production Production theme={null}
https://api.mayar.id/hl/v2/customers/detail?email={inputyourcustomeremail}
```

```Sandbox Sandbox theme={null}
https://api.mayar.io/hl/v2/customers/detail?email={inputyourcustomeremail}
```

## Authorization

**Authorization** `string` *required*

Example:

`Authorization | Bearer Paste-Your-Api-Key-Here`

## Query Parameters

**email** `string` *required*

Customer email address used to search customer details. Returns
`400` with `Email query parameter is required` when omitted, and `404`
with `Customer not found` when no customer matches the email.

## Response

Successful Response

## Main Structure (Root)

**statusCode** `integer`

Status code returned by the API.

**messages** `string`

Status message that describes the API response.

**data** `object`

Customer detail object.

### data Structure (Object)

**data.id** `string`

Unique customer ID.

**data.createdAt** `number`

Unix timestamp in milliseconds indicating when the customer was created.

**data.email** `string`

Customer email address.

**data.mobile** `string`

Customer phone number.

**data.name** `string`

Customer full name.

**data.status** `string`

Current customer status.

**data.updatedAt** `number`

Unix timestamp in milliseconds indicating when the customer was last updated.

**data.userId** `string`

Unique user ID associated with the customer.

**data.user** `object`

User information object associated with the customer.

**data.user.id** `string`

Unique user ID.

**data.user.name** `string`

User full name.

**data.user.urlHook** `string`

Webhook URL configured by the user.

**data.user.email** `string`

User email address.

**data.user.paymeLink** `string`

User payment link identifier.

**data.user.isSelfDomain** `boolean`

Indicates whether the user uses a custom domain.

**data.user.accountId** `string`

Unique account ID associated with the user.

**data.user.account** `object`

Account information object.

**data.user.account.id** `string`

Unique account ID.

**data.user.account.name** `string`

Account name.

**data.user.account.imageId** `string`

Unique image ID associated with the account logo.

**data.user.account.logo** `object`

Account logo object.

**data.user.account.logo.id** `string`

Unique logo image ID.

**data.user.account.logo.fileType** `string`

Logo file type.

**data.user.account.logo.url** `string`

Public URL of the account logo image.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.