> ## 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.

# Create Magic Link

> Endpoint to create magic link and send to customer email for their login in our customer portal

```bash Request Example theme={null}
curl --request POST 'https://api.mayar.id/hl/v1/customer/login/portal' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--header 'Content-Type: application/json' \
--data-raw '{
    	"email": "mraihannanewpatch@gmail.com"
	}
'
```

```json Response Example 200 theme={null}
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "url": "Sudah kami kirim ke email anda"
    }
}
```

Endpoint:

```Production Production theme={null}
https://api.mayar.id/hl/v1/customer/login/portal
```

```Sandbox Sandbox theme={null}
https://api.mayar.io/hl/v1/customer/login/portal
```

## Authorization

**Authorization** `string` *required*

Example:

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

## Request Body

**email** `string` *required*

Customer email.

## Response

Successful Response

### Main Structure (Root)

**statusCode** `integer`

Status code form API.

**messages** `string`

Status message that describes the status code.

**data** `array of object`

The main data returned (detailed customer/user information).

### data Structure (Array Of Object)

**url** `string`

Information about the magic link request that was made.


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