# Send an event (/docs/api-reference/events/send)

> 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.

`POST https://druckling-nine.vercel.app/v1/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.

## Request body (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Event name: letters, digits and `. _ : -`."
    },
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {},
      "description": "The payload workflows render from (default `{}`)."
    },
    "idempotency_key": {
      "type": "string",
      "maxLength": 255
    }
  },
  "required": [
    "type"
  ]
}
```

## Response 202: OK

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "event"
    },
    "type": {
      "type": "string"
    },
    "idempotency_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "duplicate": {
      "type": "boolean",
      "description": "True when an event with the same `idempotency_key` was already received: this is that event, and nothing new ran."
    },
    "runs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "workflow": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "waiting",
              "succeeded",
              "failed"
            ],
            "type": "string",
            "description": "`waiting`: a dataset's batches are rendering. `succeeded` and `failed` are final."
          }
        },
        "required": [
          "id",
          "workflow",
          "status"
        ]
      },
      "description": "The workflow runs the event started, one per enabled workflow of the key's mode listening to `type`."
    },
    "test_mode": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "object",
    "type",
    "idempotency_key",
    "duplicate",
    "runs",
    "test_mode",
    "created_at"
  ]
}
```