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

# Test URL Hook

> Endpoint to testing your URL Hook for Webhook

<RequestExample>
  ```bash Request Example theme={null}
  curl --request POST 'https://api.mayar.id/hl/v2/webhooks/test' \
  --header 'Authorization: Bearer Paste-Your-API-Key-Here' \
  --data '{
      "urlHook": "https://webhook.example.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/v2/webhooks/test
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/hl/v2/webhooks/test
  ```
</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. Must be a valid URL.
</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>

## Errors

<ResponseField name="400 — URL missing" type="object">
  Returned when `urlHook` is missing: `{ "statusCode": 400, "messages": "Url tidak ditemukan. Silahkan masukkan url webhook anda." }`.
</ResponseField>

<ResponseField name="400 — URL invalid" type="object">
  Returned when `urlHook` is not a valid URL: `{ "statusCode": 400, "messages": "Url tidak valid. Silahkan masukkan url webhook yang valid." }`.
</ResponseField>
