> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Webhook Endpoint

> Retrieve a specific webhook configuration by ID

# Get Webhook Endpoint

GET [https://api.baanx.com/v1/webhooks/\{id}](https://api.baanx.com/v1/webhooks/\{id})
Retrieves a specific webhook configuration by ID.

## Overview

Returns webhook details including its URL, subscribed event types, active status, and a masked API key. Use this to inspect the current configuration of a single webhook.

## Authentication

This endpoint requires authentication via Bearer token:

```bash theme={null} theme={null}
Authorization: Bearer YOUR_ACCESS_TOKEN
```

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

### Path Parameters

<ParamField path="id" type="string (UUID)" required>
  Unique identifier of the webhook configuration
</ParamField>

### Request Example

<CodeGroup>
  ```bash cURL theme={null} theme={null}
  curl -X GET https://api.baanx.com/v1/webhooks/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null} theme={null}
  const webhookId = '550e8400-e29b-41d4-a716-446655440000';

  const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null} theme={null}
  import requests

  webhook_id = "550e8400-e29b-41d4-a716-446655440000"
  url = f"https://api.baanx.com/v1/webhooks/{webhook_id}"
  headers = {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```typescript TypeScript theme={null} theme={null}
  const getWebhook = async (webhookId: string) => {
    const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
      }
    });

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    return await response.json();
  };
  ```
</CodeGroup>

## Response

### 200 Success

<ResponseField name="id" type="string (UUID)">
  Unique identifier for the webhook configuration
</ResponseField>

<ResponseField name="tenant" type="string">
  Partner tenant identifier
</ResponseField>

<ResponseField name="name" type="string">
  Human-readable name for the webhook
</ResponseField>

<ResponseField name="url" type="string">
  HTTPS endpoint URL for webhook delivery
</ResponseField>

<ResponseField name="apiKey" type="string">
  Masked API key (e.g., `whk_****...****5678`). Use [Rotate Key](/api-reference/webhooks/rotate-key) if you need a new key.
</ResponseField>

<ResponseField name="eventTypes" type="array">
  List of event types this webhook subscribes to
</ResponseField>

<ResponseField name="isActive" type="boolean">
  Whether the webhook is currently active
</ResponseField>

<ResponseField name="metadata" type="object">
  Custom metadata attached to the webhook
</ResponseField>

<ResponseField name="createdAt" type="string (ISO 8601)">
  Timestamp when the webhook was created
</ResponseField>

<ResponseField name="updatedAt" type="string (ISO 8601)">
  Timestamp when the webhook was last updated
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null} theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "tenant": "partner-name",
    "name": "KYC Status Webhook",
    "url": "https://api.partner.com/webhooks/kyc",
    "apiKey": "whk_****...****5678",
    "eventTypes": ["kyc.status.changed", "card.activated"],
    "isActive": true,
    "metadata": { "environment": "production" },
    "createdAt": "2025-12-29T10:00:00.000Z",
    "updatedAt": "2025-12-29T12:00:00.000Z"
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 401 - Unauthorized theme={null} theme={null}
  {
    "message": "Not authenticated"
  }
  ```

  ```json 403 - Forbidden theme={null} theme={null}
  {
    "message": "Not authorized"
  }
  ```

  ```json 404 - Not Found theme={null} theme={null}
  {
    "message": "Webhook config not found"
  }
  ```

  ```json 503 - Service Unavailable theme={null} theme={null}
  {
    "message": "Notification service is not configured for this environment"
  }
  ```
</ResponseExample>

## Related Endpoints

* `GET /v1/webhooks` - List all webhook endpoints
* `PUT /v1/webhooks/{id}` - Update this webhook
* `DELETE /v1/webhooks/{id}` - Delete this webhook
* `GET /v1/webhooks/{id}/logs` - View delivery logs for this webhook
