Domain configuration

Configure email domains at the organization level to enable email-based ticket management. An organization can configure multiple domains, allowing teams to use email addresses from any configured domain.

Adding a domain

Use the create domain endpoint to add a new domain to your organization. The API will return the required DNS records that need to be added to your domain configuration.

These DNS records are essential for:

  • SPF record: Authorizing Thena to send emails on behalf of your domain
  • DKIM record: Ensuring email authenticity and preventing tampering
  • CNAME record: Verifying domain ownership

Example DNS records:

# SPF Record
Type: TXT
Name: @
Value: v=spf1 include:_spf.thena.ai ~all

# DKIM Record
Type: TXT
Name: thena._domainkey
Value: v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC...

# CNAME Record
Type: CNAME
Name: mail
Value: em8329.thena.ai

DNS changes can take up to 48 hours to propagate globally. The domain status will show as “Pending” until verification is complete.

Team email configuration

Each team can configure multiple email addresses, even across different verified domains. This enables teams to manage support emails from various brands or products.

Default team email

Every team automatically gets a default email address in the format:

{teamId}@mail.thena.ai

This address is ready to use immediately and requires no additional configuration.

Custom email addresses

Teams can use their own email addresses (e.g., support@example.com) by setting up email forwarding.

Auto-forwarding setup

First set up email forwarding in your email provider, then use the verify custom email forwarding endpoint to verify the setup. A verification code will be sent to your custom email address.

Example forwarding configuration:

From: support@example.com
To: TRSALL153@mail.thena.ai

A team can configure multiple email addresses from any verified domain in your organization. For example:

Sender preferences

Use the add custom email endpoint to configure sender preferences for your team.

Sender name options

  1. Original sender

    • Emails appear from the team member who responded
    • Example: “John Smith (support@example.com)”
  2. Common name

  3. Combined

When using a common name, you can customize the display name that appears in email clients.

Examples

Multi-brand support setup

Organization: TechCorp
Verified Domains: techcorp.com, brand1.com, brand2.com

Team 1: Core Support
- Default: TEAM1@mail.thena.ai
- Custom: support@techcorp.com
- Sender: "TechCorp Support"

Team 2: Brand1 Support
- Default: TEAM2@mail.thena.ai
- Custom: help@brand1.com, support@brand1.com
- Sender: "Brand1 Support"

Team 3: Brand2 Support
- Default: TEAM3@mail.thena.ai
- Custom: support@brand2.com
- Sender: "Brand2 Customer Care"

Regional support setup

Organization: GlobalTech
Verified Domains: globaltech.com, globaltech.eu, globaltech.asia

Team 1: US Support
- Custom: us-support@globaltech.com
- Sender: "GlobalTech US Support"

Team 2: EU Support
- Custom: support@globaltech.eu
- Sender: "GlobalTech EU Support"

Team 3: Asia Support
- Custom: support@globaltech.asia
- Sender: "GlobalTech Asia Support"

API endpoints

Domain configuration

Create domain

Path: /domain/create
Method: POST

Create a new domain for your organization.

Request body:

{
  "domain": "example.com"
}

Response:

{
  "domain": "example.com",
  "records": {
    "spf": {
      "type": "TXT",
      "name": "@",
      "value": "v=spf1 include:_spf.thena.ai ~all"
    },
    "dkim": {
      "type": "TXT",
      "name": "thena._domainkey",
      "value": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."
    },
    "cname": {
      "type": "CNAME",
      "name": "mail",
      "value": "em8329.thena.ai"
    }
  }
}

Get all domains

Path: /domain/fetch-custom-domains
Method: GET

Retrieve all domains configured for your organization.

Verify DNS

Path: /domain/verify-dns
Method: GET

Verify DNS records for a domain.

Query parameters:

  • domainName (string, required): Domain name to verify

Email configuration

Add custom email

Path: /email-config/add-custom-email
Method: POST

Add a custom email to your domain and configure sender preferences.

Request body:

{
  "teamId": "string",
  "email": "support@example.com",
  "sendersPreferredChoice": "ORIGINAL_SENDER | COMMON_NAME | COMBINED"
}

Get email configuration

Path: /email-config/get-custom-email-config
Method: GET

Retrieve email configuration for a team.

Query parameters:

  • teamId (string, required): Team ID

Verify custom email forwarding

Path: /email-config/verify-custom-email-forwarding
Method: POST

Initiate verification of email forwarding setup.

Request body:

{
  "email": "support@example.com",
  "teamId": "string"
}

Verify email verification code

Path: /email-config/verify-email-verification-code
Method: POST

Verify the email verification code received.

Request body:

{
  "email": "support@example.com",
  "teamId": "string",
  "verificationCode": "123456"
}