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

# Get Webhook Endpoint

> Retrieve a specific webhook endpoint by ID

# Get Webhook Endpoint

Retrieves the details of a specific webhook endpoint.

## Request

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key
</ParamField>

<ParamField path="id" type="string" required>
  The unique identifier of the webhook endpoint
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Unique endpoint identifier
    </ResponseField>

    <ResponseField name="url" type="string">
      Webhook URL
    </ResponseField>

    <ResponseField name="events" type="array">
      Subscribed event types
    </ResponseField>

    <ResponseField name="enabled" type="boolean">
      Whether the endpoint is active
    </ResponseField>

    <ResponseField name="description" type="string">
      Endpoint description
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 creation timestamp
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ISO 8601 last update timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.swiftpay.cx/api/webhooks/wh_abc123 \
    -H "Authorization: Bearer mp_live_your_api_key"
  ```

  ```javascript JavaScript theme={null}
  const endpointId = "wh_abc123";

  const response = await fetch(
     `https://api.swiftpay.cx/api/webhooks/${endpointId}`,
     {
        headers: {
           Authorization: "Bearer mp_live_your_api_key",
        },
     }
  );

  const endpoint = await response.json();
  console.log(
     `Endpoint ${endpoint.data.id} is ${
        endpoint.data.enabled ? "active" : "inactive"
     }`
  );
  ```

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

  endpoint_id = 'wh_abc123'

  response = requests.get(
      f'https://api.swiftpay.cx/api/webhooks/{endpoint_id}',
      headers={'Authorization': 'Bearer mp_live_your_api_key'}
  )

  endpoint = response.json()
  status = 'active' if endpoint['data']['enabled'] else 'inactive'
  print(f"Endpoint is {status}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "id": "wh_abc123",
      "url": "https://yoursite.com/webhooks/swiftpay",
      "events": [
        "checkout.succeeded",
        "checkout.failed",
        "withdrawal.paid"
      ],
      "enabled": true,
      "description": "Production webhook handler",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-20T14:00:00Z"
    }
  }
  ```

  ```json 404 theme={null}
  {
     "success": false,
     "error": {
        "type": "not_found",
        "message": "Webhook endpoint not found",
        "requestId": "req_abc123"
     }
  }
  ```
</ResponseExample>

<Note>
  The webhook signing secret is never returned after initial creation for
  security reasons.
</Note>
