curl -X POST https://api.gork.email/v1/domains \
-H "Authorization: Bearer gk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "outbound.yourdomain.com"
}'
import { GorkClient } from "@gorkmail/sdk"
const client = new GorkClient({ apiKey: process.env.GORK_API_KEY })
const domain = await client.domains.create({
domain: "outbound.yourdomain.com"
})
console.log(domain.dnsInstructions)
{
"data": {
"id": "dom_83fa90bc712e",
"domainName": "outbound.yourdomain.com",
"status": "pending",
"dnsInstructions": [
{
"type": "TXT",
"name": "_gork-challenge.outbound.yourdomain.com",
"value": "gork-verification=37a1c890f42b",
"purpose": "Domain Ownership Verification"
},
{
"type": "MX",
"name": "outbound.yourdomain.com",
"value": "route1.mx.cloudflare.net",
"priority": 10,
"purpose": "Inbound Email Routing"
},
{
"type": "TXT",
"name": "outbound.yourdomain.com",
"value": "v=spf1 include:_spf.mx.cloudflare.net ~all",
"purpose": "SPF Sender Authorization"
},
{
"type": "TXT",
"name": "_dmarc.outbound.yourdomain.com",
"value": "v=DMARC1; p=quarantine; pct=100;",
"purpose": "DMARC Policy"
}
]
}
}
Domains
Create Domain
Register a custom domain to enable sending and receiving from branded email addresses.
POST
/
v1
/
domains
curl -X POST https://api.gork.email/v1/domains \
-H "Authorization: Bearer gk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "outbound.yourdomain.com"
}'
import { GorkClient } from "@gorkmail/sdk"
const client = new GorkClient({ apiKey: process.env.GORK_API_KEY })
const domain = await client.domains.create({
domain: "outbound.yourdomain.com"
})
console.log(domain.dnsInstructions)
{
"data": {
"id": "dom_83fa90bc712e",
"domainName": "outbound.yourdomain.com",
"status": "pending",
"dnsInstructions": [
{
"type": "TXT",
"name": "_gork-challenge.outbound.yourdomain.com",
"value": "gork-verification=37a1c890f42b",
"purpose": "Domain Ownership Verification"
},
{
"type": "MX",
"name": "outbound.yourdomain.com",
"value": "route1.mx.cloudflare.net",
"priority": 10,
"purpose": "Inbound Email Routing"
},
{
"type": "TXT",
"name": "outbound.yourdomain.com",
"value": "v=spf1 include:_spf.mx.cloudflare.net ~all",
"purpose": "SPF Sender Authorization"
},
{
"type": "TXT",
"name": "_dmarc.outbound.yourdomain.com",
"value": "v=DMARC1; p=quarantine; pct=100;",
"purpose": "DMARC Policy"
}
]
}
}
Register a custom sending/receiving domain with your gork.email organization. Once registered, gork.email generates SPF, DKIM, DMARC, and MX records for DNS authentication.
Body
string
required
The domain or subdomain to register (e.g.
mail.yourdomain.com or outbound.company.com).Response
object
curl -X POST https://api.gork.email/v1/domains \
-H "Authorization: Bearer gk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "outbound.yourdomain.com"
}'
import { GorkClient } from "@gorkmail/sdk"
const client = new GorkClient({ apiKey: process.env.GORK_API_KEY })
const domain = await client.domains.create({
domain: "outbound.yourdomain.com"
})
console.log(domain.dnsInstructions)
{
"data": {
"id": "dom_83fa90bc712e",
"domainName": "outbound.yourdomain.com",
"status": "pending",
"dnsInstructions": [
{
"type": "TXT",
"name": "_gork-challenge.outbound.yourdomain.com",
"value": "gork-verification=37a1c890f42b",
"purpose": "Domain Ownership Verification"
},
{
"type": "MX",
"name": "outbound.yourdomain.com",
"value": "route1.mx.cloudflare.net",
"priority": 10,
"purpose": "Inbound Email Routing"
},
{
"type": "TXT",
"name": "outbound.yourdomain.com",
"value": "v=spf1 include:_spf.mx.cloudflare.net ~all",
"purpose": "SPF Sender Authorization"
},
{
"type": "TXT",
"name": "_dmarc.outbound.yourdomain.com",
"value": "v=DMARC1; p=quarantine; pct=100;",
"purpose": "DMARC Policy"
}
]
}
}