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

# Get Webhook

> Get a specific webhook by ID

## Overview

Retrieve details of a specific webhook endpoint by its ID.

## Authentication

<ParamField header="X-Api-Key" type="string" required>
  Your API key with Write scope

  ```
  X-Api-Key: daya_sk_YOUR_API_KEY
  ```
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  Webhook ID (UUID)

  **Example:** `770e8400-e29b-41d4-a716-446655440000`
</ParamField>

## Request Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.pro.daya.co/public/v1/webhooks/770e8400-e29b-41d4-a716-446655440000' \
    --header 'X-Api-Key: daya_sk_YOUR_API_KEY'
  ```

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

  const response = await fetch(
    `https://api.pro.daya.co/public/v1/webhooks/${webhookId}`,
    {
      headers: { 'X-Api-Key': 'daya_sk_YOUR_API_KEY' }
    }
  );

  const data = await response.json();
  console.log('Webhook:', data.data);
  ```

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

  webhook_id = '770e8400-e29b-41d4-a716-446655440000'
  headers = {'X-Api-Key': 'daya_sk_YOUR_API_KEY'}

  response = requests.get(
      f'https://api.pro.daya.co/public/v1/webhooks/{webhook_id}',
      headers=headers
  )

  webhook = response.json()
  print(f"Webhook: {webhook['data']}")
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean" required>
  Indicates if the request was successful
</ResponseField>

<ResponseField name="message" type="string" required>
  Human-readable response message
</ResponseField>

<ResponseField name="data" type="object" required>
  Webhook object

  <Expandable title="webhook properties">
    <ResponseField name="id" type="string">
      Unique webhook identifier (UUID)
    </ResponseField>

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

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

    <ResponseField name="events" type="array">
      Events this webhook is subscribed to
    </ResponseField>

    <ResponseField name="status" type="string">
      Webhook status: `active`, `paused`, `disabled`
    </ResponseField>

    <ResponseField name="failure_count" type="integer">
      Number of consecutive delivery failures
    </ResponseField>

    <ResponseField name="last_success_at" type="string">
      Last successful delivery timestamp
    </ResponseField>

    <ResponseField name="last_failure_at" type="string">
      Last failed delivery timestamp
    </ResponseField>

    <ResponseField name="last_failure_reason" type="string">
      Reason for last delivery failure
    </ResponseField>

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

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

### Success Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "message": "Webhook retrieved successfully",
    "data": {
      "id": "770e8400-e29b-41d4-a716-446655440000",
      "url": "https://example.com/webhooks/daya",
      "description": "Order notifications",
      "events": ["order.filled", "order.cancelled"],
      "status": "active",
      "failure_count": 0,
      "last_success_at": "2024-01-15T10:30:00Z",
      "last_failure_at": null,
      "last_failure_reason": null,
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    },
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 400 Bad Request - Invalid ID theme={null}
  {
    "success": false,
    "message": "Validation error",
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid webhook ID format"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "success": false,
    "message": "Webhook not found",
    "error": {
      "code": "WEBHOOK_NOT_FOUND",
      "message": "No webhook found with the specified ID"
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "success": false,
    "message": "Unauthorized",
    "error": {
      "code": "API_KEY_INVALID",
      "message": "The provided API key is invalid"
    }
  }
  ```
</ResponseExample>

## Rate Limits

* **100 requests per minute** per API key

## Next Steps

<CardGroup cols={2}>
  <Card title="Update Webhook" icon="pen" href="/pro/api-reference/update-webhook">
    Update webhook configuration
  </Card>

  <Card title="Get Deliveries" icon="list" href="/pro/api-reference/get-webhook-deliveries">
    View webhook delivery logs
  </Card>
</CardGroup>
