Skip to main content
curl --request POST 'https://api.mayar.id/hl/v2/customers/update' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data-raw '{
    "fromEmail": "budi.santoso@example.com",
    "toEmail": "budi.santoso.new@example.com"
}
'
{
    "statusCode": 200,
    "messages": "success"
}
Endpoint:
https://api.mayar.id/hl/v2/customers/update

Authorization

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

Request Body

fromEmail
string
required
The email of the customer to be updated from.
toEmail
string
required
The new email of the customer.

Response

Successful Response

Main Structure (Root)

statusCode
integer
Status code form API.
messages
string
Status message that describes the status code.

Errors

400 Validation Error
object
Returned with messages: "Validation Error" when the request body fails validation (e.g. missing fromEmail or toEmail).
404 Customer Not Found
object
Returned with messages: "Email {fromEmail} tidak terdaftar sebagai customer" when no customer matches fromEmail.