> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended**:
> ```bash
> npx @scalekit-inc/cli setup
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for 40+ agents.
> Features: full-stack-auth, agent-auth, mcp-auth, modular-sso, modular-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Domains

Manage organization email domains
<div class="sdk-client-page">

Use the domain client to manage verified email domains for an organization (SSO routing and domain-based policies).

Add a domain, complete verification, then use it with SSO and organization policies.

### CreateDomain
<div class="sdk-method-section">
  
    
      

      Runs `CreateDomain` and returns the result.

      
        Request context
      
      
        Display name.
      
      
        Optional request settings.
      
      
        The created resource.
      

```go wrap showLineNumbers=false
created, err := scalekitClient.Domain().CreateDomain(ctx, "org_123", "acme.com")
if err != nil {
  // handle
}
_ = created.Domain

// With options
created2, err := scalekitClient.Domain().CreateDomain(ctx, "org_123", "acme.com", &scalekit.CreateDomainOptions{
  DomainType: scalekit.DomainTypeOrganization,
})
if err != nil {
  // handle
}
_ = created2.Domain
```

    
  
</div>

### GetDomain
<div class="sdk-method-section">
  
    
      

      Runs `GetDomain` and returns the result.

      
        Request context
      
      
        Resource ID.
      
      
        Organization ID.
      
      
        The response payload for this operation.
      

```go wrap showLineNumbers=false
domain, err := scalekitClient.Domain().GetDomain(ctx, "dom_123", "org_123")
if err != nil {
  // handle
}
_ = domain.Domain
```

    
  
</div>

### ListDomains
<div class="sdk-method-section">
  
    
      

      Runs `ListDomains` and returns the result.

      
        Request context
      
      
        Organization ID.
      
      
        Optional request settings.
      
      
        Paginated results.
      

```go wrap showLineNumbers=false
all, err := scalekitClient.Domain().ListDomains(ctx, "org_123")
if err != nil {
  // handle
}
_ = all.Domains

// Filter by domain type
orgDomains, err := scalekitClient.Domain().ListDomains(ctx, "org_123", &scalekit.ListDomainOptions{
  DomainType: scalekit.DomainTypeOrganization,
})
if err != nil {
  // handle
}
_ = orgDomains.Domains
```

    
  
</div>

### DeleteDomain
<div class="sdk-method-section">
  
    
      

      Runs `DeleteDomain` and returns the result.

      
        Request context
      
      
        Resource ID.
      
      
        Organization ID.
      
      
        error
      

```go wrap showLineNumbers=false
if err := scalekitClient.Domain().DeleteDomain(ctx, "dom_123", "org_123"); err != nil {
  // handle
}
```

    
  
</div>

</div>


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
