D
Druckling
Docs
Api referenceEvents

Send an event

POST
/events

Starts every enabled workflow listening to type in the API key's mode (Workflows page): each renders its template from data, then signs, stores, emails or calls a URL as configured. Runs happen in the background; follow them on the Workflows page or with the workflow.run_succeeded / workflow.run_failed webhooks.

Send an idempotency_key (e.g. your order id) to make retries safe: an event with a key already seen in the last 30 days returns the original event with duplicate: true and starts nothing. Event payloads are kept 30 days. Needs a key with documents:create; data up to 256 KB.

Authorization

headerAuthorizationBearer <token>

Authorization: Bearer dr_live_… or dr_test_…

Request Body

application/json
  1. body
type*string

Event name: letters, digits and . _ : -.

Length1 <= length <= 100
data?

The payload workflows render from (default {}).

idempotency_key?string
Lengthlength <= 255

Response Body

OK

application/json
  1. response
id*string
object*unknown
type*string
idempotency_key*string|null
duplicate*boolean

True when an event with the same idempotency_key was already received: this is that event, and nothing new ran.

runs*array<>

The workflow runs the event started, one per enabled workflow of the key's mode listening to type.

test_mode*boolean
created_at*string
Formatdate-time
Example Request
curl -X POST 'https://druckling-nine.vercel.app/v1/events' \  -H 'Content-Type: application/json' \  -d '{  "type": "string"}'
Example Response202
{  "id": "string",  "object": "event",  "type": "string",  "idempotency_key": "string",  "duplicate": true,  "runs": [    {      "id": "string",      "workflow": {        "id": "string",        "name": "string"      },      "status": "queued"    }  ],  "test_mode": true,  "created_at": "2019-08-24T14:15:22Z"}