---
title: "A document was added to a collection"
method: POST
path: "document.created"
tags: ["Webhooks"]
---

# A document was added to a collection

`POST document.created` (webhook)

We POST this event to every active endpoint subscribed to it (webhook.test only to the endpoint you test). Respond with any 2xx within ten seconds; anything else is retried with backoff for up to 24 hours, in eight attempts. The event id stays the same on retries, so you can skip duplicates.

## Headers

- `Hypamoon-Signature` string, required

## Payload

- DocumentCreatedEvent: Sent for every new document in a collection with webhook_on_insert, from the API or a form. A document deleted before delivery is not sent.
  - `id` string, required: The id of the event, evt_ plus 32 hex characters. It stays the same on retries.
  - `type` 'document.created', required
  - `created_at` string, date-time, required: When the event happened.
  - `data` object, required
    - `collection` object, required: The collection the document was added to.
      - `id` string, uuid, required
      - `name` string, required
    - `document` object, required
      - `id` string, uuid, required
      - `data` object, required: The document as it is when the webhook is sent.
      - `source` 'api' | 'public', required: api or public (a form).
      - `created_at` string, date-time, required: When the document was added.

## Acknowledgement `2XX`

Received. Any 2xx counts.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
