---
title: "Tags for Batch and Scheduled Emails"
slug: tags-for-batch-and-scheduled-emails
description: "Add tags to batch and scheduled emails."
created_at: "2025-09-24"
updated_at: "2025-09-24"
image: https://cdn.resend.com/posts/tags-for-batch-and-scheduled-emails.jpg
humans: ["vitor-capretz"]
---

The Resend API has supported tags to help you associate emails with your application.

```bash
curl -X POST 'https://api.resend.com/emails' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d $'{
  "from": "Acme <onboarding@resend.dev>",
  "to": ["delivered@resend.dev"],
  "subject": "hello world",
  "html": "<p>it works!</p>",
  --highlight-start
  "tags": [
    {
      "name": "category",
      "value": "confirm_email"
    }
  ]
  --highlight-end
}'
```

Some examples of when to use a tag:
- Associate the email a “customer ID” from your application
- Add a label from your database like “free” or “enterprise”
- Note the category of email sent, like “welcome” or “password reset”

Tags can include ASCII letters, numbers, underscores, or dashes. After the email is sent, the tag is included in the webhook event.

## Previous limitations

In the past, tags were not supported when:

- Scheduling an email
- Using the `emails/batch` endpoint

## Schedule with tags

You can now add tags to scheduled emails. Both the Resend API and all SDKs support tags in scheduled emails, but here is a quick example using the Resend API.

```bash
curl -X POST 'https://api.resend.com/emails' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d $'{
  "from": "Acme <onboarding@resend.dev>",
  "to": ["delivered@resend.dev"],
  "subject": "hello world",
  "html": "<p>it works!</p>",
  --highlight-start
  "scheduled_at": "2025-09-25T11:52:01.858Z",
  "tags": [
    {
      "name": "category",
      "value": "confirm_email"
    }
  ]
  --highlight-end
}'
```

## Send batch with tags

You can now also send batch emails with tags. All SDKs support this improvement.

<CodeTabs codeHeight={475}>

```nodejs
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.batch.send([
  {
    from: 'Acme <onboarding@resend.dev>',
    to: ['foo@gmail.com'],
    subject: 'hello world',
    html: '<h1>it works!</h1>',
    --highlight-start
    tags: [
      {
        name: 'category',
        value: 'confirm_email',
      },
    ],
    --highlight-end
  },
  {
    from: 'Acme <onboarding@resend.dev>',
    to: ['bar@outlook.com'],
    subject: 'world hello',
    html: '<p>it works!</p>',
    --highlight-start
    tags: [
      {
        name: 'category',
        value: 'confirm_email',
      },
    ],
    --highlight-end
  },
]);
```

```php
$resend = Resend::client('re_xxxxxxxxx');

$resend->batch->send([
  [
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['foo@gmail.com'],
    'subject' => 'hello world',
    'html' => '<h1>it works!</h1>',
    --highlight-start
    'tags' => [
      [
        'name' => 'category',
        'value' => 'confirm_email'
      ]
    ]
    --highlight-end
  ],
  [
    'from' => 'Acme <onboarding@resend.dev>',
    'to' => ['bar@outlook.com'],
    'subject' => 'world hello',
    'html' => '<p>it works!</p>',
    --highlight-start
    'tags' => [
      [
        'name' => 'category',
        'value' => 'confirm_email'
      ]
    ]
    --highlight-end
  ]
]);
```

```python
import resend
from typing import List

resend.api_key = "re_xxxxxxxxx"

params: List[resend.Emails.SendParams] = [
  {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["foo@gmail.com"],
    "subject": "hello world",
    "html": "<h1>it works!</h1>",
    --highlight-start
    "tags": [
      {
        "name": "category",
        "value": "confirm_email"
      }
    ]
    --highlight-end
  },
  {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["bar@outlook.com"],
    "subject": "world hello",
    "html": "<p>it works!</p>",
    --highlight-start
    "tags": [
      {
        "name": "category",
        "value": "confirm_email"
      }
    ]
    --highlight-end
  }
]

resend.Batch.send(params)
```

```ruby
require "resend"

Resend.api_key = 're_xxxxxxxxx'

params = [
  {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["foo@gmail.com"],
    "subject": "hello world",
    "html": "<h1>it works!</h1>",
    --highlight-start
    "tags": [
      {
        "name": "category",
        "value": "confirm_email"
      }
    ]
    --highlight-end
  },
  {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["bar@outlook.com"],
    "subject": "world hello",
    "html": "<p>it works!</p>",
    --highlight-start
    "tags": [
      {
        "name": "category",
        "value": "confirm_email"
      }
    ]
    --highlight-end
  }
]

Resend::Batch.send(params)
```

```go
package examples

import (
	"fmt"
	"os"

	"github.com/resend/resend-go/v2"
)

func main() {

  ctx := context.TODO()

  client := resend.NewClient("re_xxxxxxxxx")

  var batchEmails = []*resend.SendEmailRequest{
    {
      From:    "Acme <onboarding@resend.dev>",
      To:      []string{"foo@gmail.com"},
      Subject: "hello world",
      Html:    "<h1>it works!</h1>",
      --highlight-start
      Tags:    []resend.Tag{{Name: "category", Value: "confirm_email"}},
      --highlight-end
    },
    {
      From:    "Acme <onboarding@resend.dev>",
      To:      []string{"bar@outlook.com"},
      Subject: "world hello",
      Html:    "<p>it works!</p>",
      --highlight-start
      Tags:    []resend.Tag{{Name: "category", Value: "confirm_email"}},
      --highlight-end
    },
  }

  sent, err := client.Batch.SendWithContext(ctx, batchEmails)

  if err != nil {
    panic(err)
  }
  fmt.Println(sent.Data)
}
```

```rust
use resend_rs::types::CreateEmailBaseOptions;
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let emails = vec![
    CreateEmailBaseOptions::new(
      "Acme <onboarding@resend.dev>",
      vec!["foo@gmail.com"],
      "hello world",
    )
    .with_html("<h1>it works!</h1>")
    --highlight-start
    .with_tag(Tag::new("category", "confirm_email")),
    --highlight-end
    CreateEmailBaseOptions::new(
      "Acme <onboarding@resend.dev>",
      vec!["bar@outlook.com"],
      "world hello",
    )
    .with_html("<p>it works!</p>")
    --highlight-start
    .with_tag(Tag::new("category", "confirm_email")),
    --highlight-end
  ];

  let _emails = resend.batch.send(emails).await?;

  Ok(())
}
```

```java
import com.resend.*;

public class Main {
    public static void main(String[] args) {
        Resend resend = new Resend("re_xxxxxxxxx");

        CreateEmailOptions firstEmail = CreateEmailOptions.builder()
            .from("Acme <onboarding@resend.dev>")
            .to("foo@gmail.com")
            .subject("hello world")
            .html("<h1>it works!</h1>")
            --highlight-start
            .tags(Tag.builder()
                .name("category")
                .value("confirm_email")
                .build())
            --highlight-end
            .build();

        CreateEmailOptions secondEmail = CreateEmailOptions.builder()
            .from("Acme <onboarding@resend.dev>")
            .to("bar@outlook.com")
            .subject("world hello")
            .html("<p>it works!</p>")
            --highlight-start
            .tags(Tag.builder()
                .name("category")
                .value("confirm_email")
                .build())
            --highlight-end
            .build();

        CreateBatchEmailsResponse data = resend.batch().send(
            Arrays.asList(firstEmail, secondEmail)
        );
    }
}
```

```dotnet
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

var mail1 = new EmailMessage()
{
    From = "Acme <onboarding@resend.dev>",
    To = "foo@gmail.com",
    Subject = "hello world",
    HtmlBody = "<p>it works!</p>",
    --highlight-start
    Tags = new List<EmailTag> { new EmailTag { Name = "category", Value = "confirm_email" } }
    --highlight-end
};

var mail2 = new EmailMessage()
{
    From = "Acme <onboarding@resend.dev>",
    To = "bar@outlook.com",
    Subject = "hello world",
    HtmlBody = "<p>it works!</p>",
    --highlight-start
    Tags = new List<EmailTag> { new EmailTag { Name = "category", Value = "confirm_email" } }
    --highlight-end
};

var resp = await resend.EmailBatchAsync( [ mail1, mail2 ] );
Console.WriteLine( "Nr Emails={0}", resp.Content.Count );
```

```curl
curl -X POST 'https://api.resend.com/emails/batch' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d $'[
  {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["foo@gmail.com"],
    "subject": "hello world",
    "html": "<h1>it works!</h1>",
    --highlight-start
    "tags": [
      {
        "name": "category",
        "value": "confirm_email"
      }
    ]
    --highlight-end
  },
  {
    "from": "Acme <onboarding@resend.dev>",
    "to": ["bar@outlook.com"],
    "subject": "world hello",
    "html": "<p>it works!</p>",
    --highlight-start
    "tags": [
      {
        "name": "category",
        "value": "confirm_email"
      }
    ]
    --highlight-end
  }
]'
```
</CodeTabs>

For more help, see [the documentation on tags](/docs/dashboard/emails/tags).

## Conclusion

We hope this expansion of tags improves your experience and makes it easier for you to track emails in your app.

We're working on additional improvements across the Resend API to bring feature parity across endpoints.