# Duplicates (/docs/memory/essentials/duplicates)
Retries, double clicks, and replayed webhooks all send the same memory twice. Docklee catches repeats at three levels, so a retry never stores the same memory twice.

| Level | Catches | What happens |
| --- | --- | --- |
| In `Dock` | The same content captured again within 60 seconds | The second capture is dropped before it's sent. |
| At the API | The same content arriving again within 60 seconds | The event is rejected with `duplicate_event`. |
| In the memory space | A new memory that states a fact the space already holds | The existing memory is strengthened, and no new memory is stored. |

## Control what counts as the same [#control-what-counts-as-the-same]

By default, two captures are the same when their text is the same. Pass a dedup key when your system already has an ID for the event, such as a message or webhook ID:

<CodeTabs>
  <Tab value="Python">
    ```python
    dock.capture(
        "Order 1042 was delivered.",
        type="event",
        dedup_key="order-1042-delivered",
    )
    ```
  </Tab>
  <Tab value="TypeScript">
    ```ts
    dock.capture('Order 1042 was delivered.', {
      type: 'event',
      dedupKey: 'order-1042-delivered',
    });
    ```
  </Tab>
  <Tab value="cURL">
    ```bash
    curl https://api.docklee.com/v1/dock/ingest \
      -H "Authorization: Bearer $DOCKLEE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "memory_space_id": "your-memory-space-id",
        "events": [
          {
            "content": "Order 1042 was delivered.",
            "type": "event",
            "dedup_key": "order-1042-delivered"
          }
        ]
      }'
    ```
  </Tab>
</CodeTabs>

A dedup key can be up to 256 characters. Two captures with the same key within 60 seconds count as one, even when their text differs.

<Callout type="warn">
A dedup key replaces the text check. Two different events that share a key within 60 seconds are treated as one, and the second is dropped.
</Callout>

## Repeating on purpose [#repeating-on-purpose]

The 60-second window only stops accidental repeats. To record the same thing happening again, such as a second login, capture it after the window or give each occurrence its own dedup key.

## Next steps [#next-steps]

Repeats are handled. Learn when `Dock` sends your captures next.

<Cards>
  <Card title="Batching and flush" href="/docs/memory/essentials/batching-and-flush" description="When captures leave your process." />
  <Card title="Confidence" href="/docs/memory/intelligence/confidence" description="How a repeated fact raises confidence." />
  <Card title="Capture memory" href="/docs/memory/capture-memory" description="Every capture option." />
</Cards>
