> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tags

> Categorize and filter email traffic with metadata tags.

# Managing Tags

Tags provide a lightweight way to categorize emails for filtering, debugging, and reporting across your Mailofly account.

***

## Adding Tags to Outgoing Emails

Pass tags as an object of key-value string pairs in your API or SDK send call:

```typescript theme={null}
await mailofly.emails.send({
  from: "Security <security@acme.com>",
  to: ["member@example.com"],
  subject: "Password Reset Request",
  html: "<p>Click here to reset your password.</p>",
  tags: {
    category: "auth",
    flow: "password_reset",
    tier: "enterprise",
  },
});
```

***

## Filtering by Tags in Activity Logs

In the **Activity Logs** view:

1. Click **Add Filter** → select **Tag**.
2. Enter the key and value (e.g. `category = auth`).
3. Only log entries with matching metadata will be displayed.

***

## Tag Constraints

* **Key length**: Up to 64 characters (alphanumeric, dashes, and underscores).
* **Value length**: Up to 256 characters.
* **Maximum tags per email**: 10 pairs.


## Related topics

- [Template Variables](/templates/template-variables.md)
- [Filtering and troubleshooting](/logs/filtering-and-troubleshooting.md)
- [Introduction](/broadcasts/introduction.md)
- [Create Template](/api/templates/create-template.md)
- [Properties](/audience/properties.md)
