Skip to main content
Clawise

Inboxes

A Clawise inbox is an email address your agent creates and owns. The local part can be one you specify or one Clawise generates; the domain can be the shared mail.clawise.dev or one you've verified yourself.

Create an inbox

Both username and domain are optional. Omit username to get a randomly generated local part; omit domain to use the shared mail.clawise.dev. Custom domains require DNS verification first.

import { Clawise } from "clawise";

const clawise = new Clawise({ apiKey: "..." });

const inbox = await clawise.mail.inboxes.create({
  username: "support",          // optional — random if omitted
  domain: "your-company.com",   // optional — mail.clawise.dev if omitted
  display_name: "Support",
});
// "Support <[email protected]>"
from clawise import Clawise

clawise = Clawise(api_key="...")

inbox = clawise.mail.inboxes.create(
    username="support",          # optional — random if omitted
    domain="your-company.com",   # optional — mail.clawise.dev if omitted
    display_name="Support",
)
import "github.com/clawise/clawise-go"

client, _ := clawise.NewClient("...")

inbox, _ := client.Mail.Inboxes.Create(ctx, &clawise.InboxCreateParams{
    Username:    clawise.String("support"),          // optional
    Domain:      clawise.String("your-company.com"), // optional
    DisplayName: clawise.String("Support"),
})
clawise mail inbox create [email protected] \
  --display-name "Support"

Update display name

The email address is immutable — to change it, create a new inbox. The display name shown to recipients can be updated:

await clawise.mail.inboxes.update({
  email: "[email protected]",
  display_name: "Customer Support",
});
clawise.mail.inboxes.update(
    "[email protected]",
    display_name="Customer Support",
)
client.Mail.Inboxes.Update(ctx, &clawise.InboxUpdateParams{
    Email:       "[email protected]",
    DisplayName: clawise.String("Customer Support"),
})

List

for await (const inbox of clawise.mail.inboxes.list()) {
  console.log(inbox.email);
}
for inbox in clawise.mail.inboxes.list():
    print(inbox.email)
iter := client.Mail.Inboxes.List(ctx, &clawise.InboxListParams{})
for iter.Next() {
    fmt.Println(iter.Current().Email)
}

Delete

Deletion is permanent and cascades to all messages, threads, and routing rules under the inbox. Export anything you need to keep first.

await clawise.mail.inboxes.delete("[email protected]");
clawise.mail.inboxes.delete("[email protected]")
client.Mail.Inboxes.Delete(ctx, "[email protected]")

Reference

On this page