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

# Managing Domains

> List, add, verify, and delete sending domains with the Lettr Go SDK, ideal for multi-tenant apps and DNS automation.

The `client.Domains` service manages your sending domains — useful for multi-tenant apps onboarding customer domains, or for automating DNS verification.

For the concepts behind domain setup (SPF, DKIM, DMARC), see [Sending Domains](/learn/domains/sending-domains).

```go theme={null}
import lettr "github.com/lettr-com/lettr-go"

client := lettr.NewClient("your-api-key")
```

## List Domains

```go theme={null}
domains, err := client.Domains.List(ctx)
```

<Card title="API Reference" icon="book" href="/api-reference/domains/list-domains">
  GET /domains
</Card>

## Create a Domain

```go theme={null}
created, err := client.Domains.Create(ctx, &lettr.CreateDomainRequest{
    Domain: "example.com",
})
```

<Card title="API Reference" icon="book" href="/api-reference/domains/create-domain">
  POST /domains
</Card>

## Get Domain Details

```go theme={null}
domain, err := client.Domains.Get(ctx, "example.com")
```

<Card title="API Reference" icon="book" href="/api-reference/domains/get-domain">
  GET /domains/{domain}
</Card>

## Verify Domain DNS

After publishing the records, trigger a verification check:

```go theme={null}
verification, err := client.Domains.Verify(ctx, "example.com")
fmt.Printf("DKIM: %s, SPF: %s, DMARC: %s\n",
    verification.Data.DkimStatus,
    verification.Data.SpfStatus,
    verification.Data.DmarcStatus,
)
```

<Tip>
  DNS changes take time to propagate. If verification fails right after publishing, wait a few minutes and retry. See [Domain Verification troubleshooting](/knowledge-base/troubleshooting/domain-verification).
</Tip>

<Card title="API Reference" icon="book" href="/api-reference/domains/verify-domain">
  POST /domains/{domain}/verify
</Card>

## Delete a Domain

```go theme={null}
err = client.Domains.Delete(ctx, "example.com")
```

<Warning>
  Deleting a domain stops all sending from it immediately. Emails from a deleted domain fail with a validation error.
</Warning>

<Card title="API Reference" icon="book" href="/api-reference/domains/delete-domain">
  DELETE /domains/{domain}
</Card>

## What's Next

<CardGroup cols={2}>
  <Card title="Sending Domains" icon="globe" href="/learn/domains/sending-domains">
    DNS setup: SPF, DKIM, DMARC
  </Card>

  <Card title="Webhooks" icon="bell" href="/quickstart/go/webhooks">
    Receive delivery and engagement events
  </Card>
</CardGroup>
