D
Druckling
Docs

Create a webhook endpoint

POST
/webhook_endpoints

Subscribes an HTTPS URL to document events in the API key's mode. The signing secret is returned only here. Requests follow the Standard Webhooks spec (webhook-id, webhook-timestamp, webhook-signature). Needs a full-access key.

Authorization

headerAuthorizationBearer <token>

Authorization: Bearer dr_live_… or dr_test_…

Request Body

application/json
  1. body
url*string

Public https:// URL that answers 2xx within 10 seconds.

Lengthlength <= 2048
events*array<>
Items1 <= items
description?string
Lengthlength <= 200

Response Body

OK

application/json
  1. response
id*string
object*unknown
url*string
description*string
events*array<>
enabled*boolean
test_mode*boolean
created_at*string
Formatdate-time
secret*string

whsec_… signing secret; store it now.

Example Request
curl -X POST 'https://druckling-nine.vercel.app/v1/webhook_endpoints' \  -H 'Content-Type: application/json' \  -d '{  "url": "string",  "events": [    "document.rendered"  ]}'
Example Response201
{  "id": "string",  "object": "webhook_endpoint",  "url": "string",  "description": "string",  "events": [    "document.rendered"  ],  "enabled": true,  "test_mode": true,  "created_at": "2019-08-24T14:15:22Z",  "secret": "string"}