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

# Register URL Hook

> Endpoint to register your URL Hook for Webhook

<RequestExample>
  ```bash Request Example theme={null}
  curl --request POST 'https://api.mayar.id/hl/v1/webhook/register' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here' \
  --data '{
      "urlHook": "https://example.mayar.com"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
    "statusCode": 200,
    "messages": "success"
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v1/webhook/register
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/hl/v1/webhook/register
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-API-Key-Here`
</ResponseField>

## Request Body

<ParamField path="urlHook" type="string" required>
  URL for webhook callback.
</ParamField>

## Response

Successful Response

### Main Structure (Root)

<ResponseField name="statusCode" type="integer">
  Status code form API.
</ResponseField>

<ResponseField name="messages" type="string">
  Status message that describes the status code.
</ResponseField>
