Skip to main content
curl --request POST 'https://api.mayar.id/hl/v2/customers/create' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
    "name": "Budi Santoso",
    "email": "budi.santoso@example.com",
    "mobile": "081234567890"
}
'
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "name": "Budi Santoso",
        "email": "budi.santoso@example.com",
        "mobile": "081234567890",
        "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413",
        "customerId": "a1b2c3d4-e5f6-4789-a012-3456789abcde"
    }
}
Endpoint:
https://api.mayar.id/hl/v2/customers/create

Authorization

Authorization
string
required
Example:Authorization | Bearer Paste-Your-API-Key-Here

Request Body

name
string
required
Customer Name.
email
string
required
Customer email.
mobile
string
required
Customer telephone number.

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.
data
object
The created customer data (echoes the submitted body and appends customerId).

data Structure (Object)

name
string
Customer name.
email
string
Customer email address.
mobile
string
Customer phone number.
userId
string<uuid>
Unique ID for the user (the account owner).
customerId
string<uuid>
Unique ID for the customer associated with the user.

Errors

400 Validation Error
object
Returned with messages: "Validation Error" when the request body fails validation (e.g. missing or malformed name, email, or mobile).