diff --git a/README.rst b/README.rst index 45891d0..2b3bfff 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ Installation Configuration ------------- -import and configure the library with your Castle API secret. +Import and configure the library with your Castle API secret. .. code:: python @@ -209,6 +209,20 @@ Exceptions level HTTP response. You can also choose to catch a more `finegrained error `__. +Webhooks +-------- + +Castle uses webhooks to notify about ``$incident.confirmed`` or `$review.opened` events. +Each webhook has ``X-Castle-Signature`` header that allows verifying webhook's source. + +.. code:: python + + from castle.webhooks.verify import WebhooksVerify + + # Verify the webhook, passed as a Request object + WebhooksVerify.call(webhook_request) + # WebhookVerificationError is raised when the signature is not matching + Documentation -------------