Docly

Webhook

Estimated reading: 1 minute

Subscribe

This endpoint allows you to subscribe to webhook events.

POST

https://api.bunnydoc.com/v1/subscribeWebhook

BunnyDoc will initiate a POST request to the hookUrl you provide, anticipating the ‘BUNNYDOC API EVENT RECEIVED‘ string in response for verification purposes. Failure to receive this response will result in verification failure, and the webhook URL will not be registered to send event updates.

Headers

Authorization: Api-Key {API_KEY}

Request Payload (Sample)

{
  "hookUrl": "https://example.com/webhookUrl",
  "webhookEvents": [
    "signatureRequestViewed",
    "signatureRequestSigned",
    "signatureRequestCompleted"
  ]
}

Response (if webhook url verified)

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
  "error": 0,
  "message":""
}

Response (If webhook url is not verified)

{
    "error": 1,
    "message": "Failed. BUNNYDOC API EVENT RECEIVED was NOT found in the response."
}

Unsubscribe

This endpoints allows you to unsubscribe from webhook events.

DELETE

https://api.bunnydoc.com/v1/unsubscribeWebhook/:id

Headers

Authorization: Api-Key {API_KEY}

Response

{
  "error": 0,
  "message":""
  "identifier" : "xxxxxxxxxxxxx"
}