Gandi API for arova-ai.com
Manage DNS records and email for the arova-ai.com domain using the Gandi REST API.
Authentication
The Gandi Personal Access Token (PAT) is stored in 1Password under the item name gandi-ewill-pat.
Before making any API call, retrieve the token:
GANDI_PAT=$(op read "op://project-ewill/gandi-ewill-pat/credential")
Then use it in all API requests as a Bearer token:
curl -s -H "Authorization: Bearer $GANDI_PAT" ...
Domain
All operations target the domain arova-ai.com. The base URL is:
https://api.gandi.net/v5
Quick Reference
DNS Records
Read references/livedns-api.md for complete endpoint documentation. Here are the most common operations:
List all DNS records:
curl -s -H "Authorization: Bearer $GANDI_PAT" \
"https://api.gandi.net/v5/livedns/domains/arova-ai.com/records" | jq .
Get a specific record (e.g., A record for @):
curl -s -H "Authorization: Bearer $GANDI_PAT" \
"https://api.gandi.net/v5/livedns/domains/arova-ai.com/records/@/A" | jq .
Create/update a record (PUT overwrites, POST creates if not exists):
curl -s -X PUT -H "Authorization: Bearer $GANDI_PAT" \
-H "Content-Type: application/json" \
-d '{"rrset_values": ["192.0.2.1"], "rrset_ttl": 3600}' \
"https://api.gandi.net/v5/livedns/domains/arova-ai.com/records/www/CNAME"
Delete a record:
curl -s -X DELETE -H "Authorization: Bearer $GANDI_PAT" \
"https://api.gandi.net/v5/livedns/domains/arova-ai.com/records/test/A"
Common record types:
A— IPv4 addressAAAA— IPv6 addressCNAME— Alias to another domain (value must end with.)MX— Mail exchange (value:"10 mail.example.com.")TXT— Text record (value must be quoted: `""v=spf1 ...""``)NS— Nameserver delegation
TTL range: 300 to 2,592,000 seconds (5 min to 30 days).
Email — Forwarding
List all forwarding addresses:
curl -s -H "Authorization: Bearer $GANDI_PAT" \
"https://api.gandi.net/v5/email/forwards/arova-ai.com" | jq .
Create a forwarding address:
curl -s -X POST -H "Authorization: Bearer $GANDI_PAT" \
-H "Content-Type: application/json" \
-d '{"source": "info", "destinations": ["kyle@example.com"]}' \
"https://api.gandi.net/v5/email/forwards/arova-ai.com"
Update forwarding destinations:
curl -s -X PUT -H "Authorization: Bearer $GANDI_PAT" \
-H "Content-Type: application/json" \
-d '{"destinations": ["kyle@example.com", "team@example.com"]}' \
"https://api.gandi.net/v5/email/forwards/arova-ai.com/info"
Delete a forwarding address:
curl -s -X DELETE -H "Authorization: Bearer $GANDI_PAT" \
"https://api.gandi.net/v5/email/forwards/arova-ai.com/info"
Email — Mailboxes
List all mailboxes:
curl -s -H "Authorization: Bearer $GANDI_PAT" \
"https://api.gandi.net/v5/email/mailboxes/arova-ai.com" | jq .
Create a mailbox:
curl -s -X POST -H "Authorization: Bearer $GANDI_PAT" \
-H "Content-Type: application/json" \
-d '{"login": "support", "mailbox_type": "standard_2023", "password": "SecureP@ss123!", "aliases": ["help"], "antispam": true}' \
"https://api.gandi.net/v5/email/mailboxes/arova-ai.com"
Password requirements: 8-200 chars, min 1 uppercase, 3 numbers, 1 special character.
Update a mailbox (aliases, password, responder):
curl -s -X PATCH -H "Authorization: Bearer $GANDI_PAT" \
-H "Content-Type: application/json" \
-d '{"aliases": ["help", "info"]}' \
"https://api.gandi.net/v5/email/mailboxes/arova-ai.com/{mailbox_id}"
Email — Domain Settings
Check email offer status (antispam, DKIM):
curl -s -H "Authorization: Bearer $GANDI_PAT" \
"https://api.gandi.net/v5/email/offers/arova-ai.com" | jq .
Enable DKIM and antispam:
curl -s -X PATCH -H "Authorization: Bearer $GANDI_PAT" \
-H "Content-Type: application/json" \
-d '{"antispam": "active", "dkim": "active"}' \
"https://api.gandi.net/v5/email/offers/arova-ai.com"
Workflow Guidelines
Always retrieve the PAT from 1Password first — never hardcode it or ask the user for it.
Before modifying DNS, list current records — show the user what exists before making changes. This prevents accidental overwrites.
Use PUT for overwrites, PATCH for additions — when adding values to an existing record (like adding an IP to an A record), use PATCH with
add_rrset_values. When replacing the entire record, use PUT.Create a snapshot before bulk changes — for safety:
curl -s -X POST -H "Authorization: Bearer $GANDI_PAT" \ -H "Content-Type: application/json" \ -d '{"name": "before-changes-YYYY-MM-DD"}' \ "https://api.gandi.net/v5/livedns/domains/arova-ai.com/snapshots"Confirm destructive operations — always show the user what will be deleted/overwritten and ask for confirmation before executing DELETE or zone-wide PUT operations.
Format output clearly — pipe responses through
jqfor readability. For record listings, present them in a table format.
Reference Files
For complete API endpoint documentation, read:
references/livedns-api.md— All LiveDNS endpoints, parameters, and response formatsreferences/email-api.md— All Email endpoints for forwards, mailboxes, offers, and slots