Connect a domain you own

Start connecting a domain registered anywhere. Answers with the TXT record that proves ownership; once it is found, the connection names two nameservers to set at the registrar, and the domain gets mailboxes when they move. Safe to repeat: the same name answers with the same connection.

POSThttps://app.trygtm.com/api/v1/domains/connections
Scope
write

Headers

Idempotency-Keystringoptional
A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.

Body

namestringrequired
The domain, such as acme-mail.com. A registered domain, not a subdomain.

Request

curl -X POST https://app.trygtm.com/api/v1/domains/connections \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q4 logistics leaders"
  }'

Response

{
  "data": {
    "id": "5c6d7e8f-9012-4a3b-8c4d-5e6f70819203",
    "name": "acme-outreach.com",
    "status": "awaiting_verification",
    "domain_id": null,
    "verification": {
      "type": "TXT",
      "host": "_trygtm-verification",
      "name": "_trygtm-verification.acme-outreach.com",
      "value": "trygtm-verification=3f9c2a7d41b8e05c6a9d2f7e1b4c8a03d5e6f7a8b9c0d1e2"
    },
    "last_check": null,
    "nameservers": null,
    "existing_mail_hosts": [],
    "error": null,
    "expires_at": "2026-09-29T09:40:00.000Z",
    "created_at": "2026-09-22T09:40:00.000Z"
  }
}

Was this page helpful?