Skip to main content
curl --request POST 'https://api.mayar.id/hl/v2/webhooks/update' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data '{
    "urlHook": "https://webhook.example.com"
}'
{
  "statusCode": 200,
  "messages": "success"
}
Endpoint:
https://api.mayar.id/hl/v2/webhooks/update

Authorization

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

Request Body

urlHook
string
required
URL for webhook callback. Must be a valid URL.
webhookConfig
object
Optional webhook configuration object. When provided, it is stored alongside the URL hook.

Response

Successful Response

Main Structure (Root)

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

Errors

400 — urlHook is required
object
Returned when urlHook is missing: { "statusCode": 400, "messages": "urlHook is required" }.
400 — urlHook is not a valid URL
object
Returned when urlHook is not a valid URL: { "statusCode": 400, "messages": "urlHook is not a valid URL" }.