Sending
Sending domains
Add a sending domain, publish its DNS records, and understand when Ternwire can accept mail from it.
On this page
A sending domain identifies the domain Ternwire is allowed to send from on your behalf. Add a domain you control, publish the exact DNS records shown for it, and wait until the dashboard shows it as Verified. You need a verified domain for both test and live email, except when you send from Ternwire's test address.
What these records do. DKIM proves the email really came from you. The return-path records let bounces come back to Ternwire, so it can stop sending to addresses that don't exist. DMARC tells inboxes what to do with email that pretends to be from your domain.
Add and verify the domain
- Open Domains in the dashboard and add the sending domain, such as
updates.example.com. - Copy each DNS record name, type, and value into your DNS provider. Use the values generated for your own domain rather than copying another domain's verification tokens.
- Check whether your DNS provider automatically appends your domain name. Avoid creating a record with the domain duplicated in its name.
- Return to the dashboard and wait until the domain shows Verified. DNS changes can take a few minutes to a few hours to spread. Keep the records published after the domain is verified.
If your DNS provider supports Domain Connect (a standard that lets a service add DNS records for you after you approve them), the domain's page offers to continue to the provider. Sign in there and approve the changes instead of copying records. Ternwire checks the domain when you return. Automatic setup adds the DKIM and return-path records. It does not change DMARC, so add that record yourself if neither this domain nor its parent has one.
Where to add records
Every DNS host has its own screens. These steps match the most common ones. In each, paste the name without your domain at the end if the host adds it for you, and keep the default TTL.
Cloudflare
- Sign in to the Cloudflare dashboard and select your domain.
- Open DNS, then Records, and choose Add record.
- Pick the type shown in Ternwire, paste the name and the value, then choose Save.
- Repeat for each record. Cloudflare adds your domain to the name for you.
GoDaddy
- Sign in to GoDaddy and open your Domain Portfolio.
- Select your domain, then open DNS.
- Choose Add New Record, pick the type shown in Ternwire, paste the name and the value, then choose Save.
- Repeat for each record. GoDaddy adds your domain to the name for you.
Namecheap
- Sign in to Namecheap and open Domain List.
- Choose Manage next to your domain, then open the Advanced DNS tab.
- Choose Add New Record, pick the type shown in Ternwire, paste the name into Host and the value into Value, then save it with the check mark.
- Repeat for each record. Namecheap adds your domain to the host for you.
Squarespace (formerly Google Domains)
- Sign in to Squarespace and open Domains.
- Select your domain, then open DNS and DNS Settings.
- Under Custom records, choose Add record, pick the type shown in Ternwire, paste the name into Host and the value into Data, then choose Save.
- Repeat for each record. Squarespace adds your domain to the host for you.
Automate domain setup
For automation, POST /v1/domains accepts a JSON body with a domain field. GET /v1/domains/:domainId returns the status and the required DNS records. These management operations require a live key with the appropriate access, even if you later send test-mode messages.
curl --request POST "https://ternwire.com/v1/domains" \
--header "Authorization: Bearer $TERNWIRE_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "domain": "updates.example.com" }'After you publish the records, POST /v1/domains/:domainId/check looks them up now. It returns each record with found, and for a record that does not match yet, observedValue: what DNS answered, so a typo or an old value shows. readyToSend turns true once the domain can send. DNS changes can take minutes to spread, so wait a minute or two between checks.
One-click DNS setup through the API
GET /v1/domains/:domainId/dns-setup finds the domain's DNS provider and whether it supports Domain Connect. When status is ready, actionUrl is a page at the provider where the domain's owner signs in and approves the records. An app or an AI agent can hand that link to the person who controls the domain. When status is manual, add the records in dnsRecords by hand, using the steps in where to add records. Either way, call the check afterwards.
{
"domainId": "domain_0123456789",
"domain": "updates.example.com",
"zone": "example.com",
"host": "updates",
"status": "ready",
"provider": { "id": "cloudflare", "name": "Cloudflare", "controlPanelUrl": "https://dash.cloudflare.com/" },
"actionUrl": "https://dash.cloudflare.com/domainconnect/v2/domainTemplates/providers/ternwire.com/services/ses-email/apply?...",
"message": "Approve the changes in Cloudflare. No copying needed.",
"dnsRecords": [
{ "kind": "dkim", "type": "TXT", "name": "tw._domainkey.updates.example.com", "value": "v=DKIM1; k=rsa; p=…", "status": "pending", "blocking": true }
]
}Both need the same key as the other domain endpoints: a live key with the send scope that is not limited to some domains.
Understand the domain state
The dashboard shows each domain in plain words. The API returns the same state in state:
| Shown in the dashboard as | API state | Meaning |
|---|---|---|
| Waiting for DNS records | pending | Ternwire is waiting for your DNS records. |
| Verified | active | Ready. You can send from this domain. |
| Verified | verified | The records are found and Ternwire is finishing setup. In a few minutes it becomes active. Nothing to do. |
| Couldn't verify | failed | Ternwire couldn't confirm the records. See domain doesn't verify. |
| Disabled, Deleting | disabled, deleting | The domain can't be used for new emails. |
Once a domain shows Verified, you can send from it. No other approval is needed. Sending also stops if your workspace is paused for review or is over its plan or spending limit.
Domain doesn't verify
If the domain still waits after a few hours, or shows Couldn't verify, check these usual causes:
- The name contains your domain twice, such as
ternwire._domainkey.example.com.example.com. Most DNS hosts add your domain for you, so paste the name without it. The domain's page can show the names in either format. - The records are at the wrong place. Add them where your domain's DNS is actually run. If your domain uses another company's name servers, such as Cloudflare's, add the records there, not at the registrar.
- The value was cut off or changed. Copy the whole value with the copy button. Some hosts add quotes to TXT values on their own, which is fine.
- The type is wrong. Use exactly the type shown in Ternwire for each record, such as
TXT,CNAMEorMX.
After you fix a record, choose Check DNS now on the domain's page. Still stuck? Contact support with the domain name.
Send before your domain is ready
Until your domain is active, you can try Ternwire from its test address, onboarding@sandbox.ternwire.com. The dashboard offers it on Send test email while you have no verified domain, and the API accepts it with a live or test key. Use a live key to see the email arrive, because a test key never delivers real email:
curl --request POST "https://ternwire.com/v1/emails" \
--header "Authorization: Bearer $TERNWIRE_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: sandbox-first-email-001" \
--data '{
"from": "onboarding@sandbox.ternwire.com",
"to": ["you@yourapp.com"],
"subject": "Hello from Ternwire",
"text": "My first email."
}'The test address is for trying Ternwire, so it has limits:
- It only sends to people with a verified email address who are members of your workspace, such as you and teammates you invite. Any other recipient is refused with
sandbox_recipient_not_member. - Your workspace can send 10 emails from it in any 24 hours, and each recipient counts as one. More are refused with
sandbox_daily_limit_reached. Test-key emails aren't delivered, so they don't count. onboarding@is the only sender on that domain. Any other address on it is refused withsandbox_sender_address.- Newsletters can't use it, and are refused with
sandbox_marketing_not_allowed. - Its emails count toward your plan like any other, and show up under Messages marked Sandbox, with the same delivery states, bounces and webhooks.
To email anyone else, from your own address, add and verify your domain. You don't need to change anything else: switch the from address once the domain shows Verified.
Troubleshoot rejected senders
Check the domain part of the from address, and that the API key belongs to the workspace that owns the domain. If a domain stops showing Verified, check its DNS records and its page in the dashboard before retrying. Do not repeatedly submit the same message with new idempotency keys while investigating.
Authentication records establish authorization to send. They do not guarantee inbox placement. Keep transactional content expected by recipients, handle bounces and complaints, and follow the acceptable use policy.