# Metadata (/docs/memory/essentials/metadata)
Text alone often isn't enough to trace a memory back to your own system. Metadata lets you attach your own keys, such as the ticket, channel, or session a memory came from.

<Callout type="info" title="Add metadata when...">
- You need to find the record in your own system that a memory came from.
- Dashboard reviewers need context, such as the channel or the agent.
</Callout>

## Attach metadata [#attach-metadata]

Pass a dictionary in Python or an object in TypeScript:

<CodeTabs>
  <Tab value="Python">
    ```python
    dock.capture(
        "Customer asked to move the renewal date to June.",
        type="event",
        metadata={"ticket_id": "T-4821", "channel": "email"},
    )
    ```
  </Tab>
  <Tab value="TypeScript">
    ```ts
    dock.capture('Customer asked to move the renewal date to June.', {
      type: 'event',
      metadata: { ticket_id: 'T-4821', channel: 'email' },
    });
    ```
  </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": "Customer asked to move the renewal date to June.",
            "type": "event",
            "metadata": {"ticket_id": "T-4821", "channel": "email"}
          }
        ]
      }'
    ```
  </Tab>
</CodeTabs>

## Rules [#rules]

| Rule | Detail |
| --- | --- |
| Size | Up to 10 KB per event, measured as JSON. A larger object rejects the request with `422`. |
| Values | Stored as text. Numbers and booleans come back as strings. |
| Keys | Any string. Use the same keys across your app so reviewers can rely on them. |

<Callout type="warn">
Metadata isn't for secrets or personal data. Don't put passwords, tokens, email addresses, or phone numbers in it. Use your own opaque IDs instead.
</Callout>

## Next steps [#next-steps]

Your memories now point back to your own records. Learn how Docklee spots repeats next.

<Cards>
  <Card title="Duplicates" href="/docs/memory/essentials/duplicates" description="How repeated captures are handled." />
  <Card title="Capture memory" href="/docs/memory/capture-memory" description="Every capture option." />
  <Card title="Review and correction" href="/docs/memory/governance/review-and-correction" description="Where reviewers see your metadata." />
</Cards>
