Infrastructure API
Buy domains and Google Workspace or Microsoft 365 mailboxes from your own product with just an API key. Self-serve, white-label, prepaid, with a free sandbox.
The Infrastructure API sells sending infrastructure through your product: domains, Google Workspace and Microsoft 365 mailboxes, DNS with SPF, DKIM and DMARC, forwarding, and mailboxes connected to your app without passwords. Any GraphKit organization can turn it on in the dashboard. There is no onboarding call, no contract and no cap on accounts, domains or mailboxes.
- Domains at cost, at the registrar's current price. Mailboxes at $3 a month each, Google or Microsoft. Your own
/pricinganswers with exactly what you pay. - Sending & warmup per mailbox: campaign sending, warmup and health for mailboxes you bought here or your customers' own (OAuth or SMTP/IMAP), with a sign-in to the sending app in your brand. The Email add-on is $30 a month while any of your mailboxes is on, plus $2 per bought mailbox or $3 per outside mailbox a month, from your balance.
- White-label is included. No response, webhook, DNS record, login link or email names GraphKit's vendors. Workspaces and tenants carry your customer's company name.
- Prepaid. Live keys spend a balance you top up by card. Test keys spend free sandbox credit.
Get started
Sign up and enable it
Create a GraphKit account, then open Organization → Developers and choose Enable Infrastructure API. Organization owners and admins can do this. Your sandbox gets $500 of test credit at once.
Create a test key
Under API keys, choose Create key, name it and keep Test (gk_test_). Copy the key: it's shown once and GraphKit only stores a hash.
export GK=https://api.graphkit.com/v1/infrastructure
export GK_KEY=gk_test_…
curl -s $GK/pricing -H "Authorization: Bearer $GK_KEY"Buy in the sandbox
Test keys run the same code as live keys against simulated vendors, so an order reaches ready in well under a minute. Every POST, PUT, PATCH and DELETE needs an Idempotency-Key header.
# 1. An account per customer of yours (external_id is your id for them)
curl -s -X PUT $GK/accounts/cust_42 -H "Authorization: Bearer $GK_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: acct-cust_42" \
-d '{"name":"Acme Inc","registrant":{"first_name":"Ada","last_name":"Lovelace","organization":"Acme Inc",
"email":"ada@acme.com","phone":"+1.4155550100","address1":"1 Market St","address2":"",
"city":"San Francisco","state":"CA","postal_code":"94105","country":"US"}}'
# 2. A quote freezes prices for 15 minutes
curl -s -X POST $GK/accounts/cust_42/quotes -H "Authorization: Bearer $GK_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: quote-1" \
-d '{"items":[{"type":"domain","domain":"acmeoutreach.com","years":1},
{"type":"mailboxes","domain":"acmeoutreach.com","provider":"google",
"mailboxes":[{"local_part":"ada","first_name":"Ada","last_name":"Lovelace","admin":true}]}]}'
# 3. Ordering charges due_now_micros to the balance
curl -s -X POST $GK/accounts/cust_42/orders -H "Authorization: Bearer $GK_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: order-1" \
-d '{"quote_id":"qt_…"}'Poll GET /accounts/cust_42/orders/{order_id} or listen for order.updated webhooks. The steps are always register, dns, mail_auth, mailboxes, delegation and ready.
Magic names test the edge cases: a domain label containing fail-register, fail-dns, fail-mailboxes, taken, premium, pwfallback or tokenmode makes the sandbox behave that way. Out of credit? Refill sandbox tops it back up to $500.
Add a webhook endpoint
Under Webhooks, add an endpoint per mode. GraphKit shows the signing secret; verify each delivery's GraphKit-Signature: t=…,v1=… header as HMAC-SHA256 of t + "." + body, and reject anything older than five minutes. Deliveries are retried for 72 hours, and the dashboard lists recent ones with Redeliver. In the sandbox the endpoint may be http:// on localhost or a private host.
Top up and go live
Under Live balance, pick an amount ($10 minimum) and pay in Stripe Checkout. Keep Save this card for auto top-up on if you want GraphKit to top up by itself when the balance falls below a threshold you choose. Receipts are emailed and linked under Transactions. Only organization owners can pay.
Then create a Live (gk_live_) key (your email address must be confirmed) and switch your base key. Live and sandbox objects, balances and webhooks are fully separate.
Money
Amounts are integer micro-USD (1000000 = $1.00).
| What | When it's charged | Price |
|---|---|---|
| Domain registration | When you order | The registrar's current price, at cost (/pricing) |
| Domain renewal | When you call POST /domains/{id}/renew; nothing renews by itself | The current renew price |
| Mailbox | The first month with the order, then each month while it's active | $3 a month |
| Email add-on | When your first mailbox's sending & warmup turns on, then each month while any is on | $30 a month (sending.addon_monthly_micros) |
| Sending & warmup, bought mailbox | When turned on (unless that month is paid), then each month while on | $2 a month (sending.bought_monthly_micros) |
| Sending & warmup, outside mailbox | When it's connected and on, then each month while on | $3 a month (sending.outside_monthly_micros) |
Turning sending & warmup off stops it at once; the month already paid is not refunded, and turning it on again within that month costs nothing more. An order, renewal or first sending month that would take the balance below zero is refused with 402 partner_balance_insufficient and nothing is charged. There is no credit line: top up, or turn on auto top-up. partner.balance_low fires when the balance drops below its threshold. A failed item is refunded to the balance automatically.
Auto top-up charges the saved card off-session. If the bank declines it or asks the cardholder to confirm (3D Secure), GraphKit pauses auto top-up and notifies the organization's owners. Top up by card once, then turn auto top-up back on.
Limits
There are no caps on accounts, domains or mailboxes. What remains:
- Technical limits: at most 5 mailboxes per domain (3 recommended for deliverability).
- Rate limits: at least 20 requests a second per key;
429withRetry-Afterabove it. - Abuse protection: live keys need a confirmed email, card payments are screened by Stripe, and GraphKit can suspend an organization's access. Suspended keys get
403 partner_suspendedwith the reason.
Endpoints
All under https://api.graphkit.com/v1/infrastructure, with Authorization: Bearer gk_….
| Area | Endpoints |
|---|---|
| Prices and search | GET /pricing, GET /domains/search?q=, POST /domains/check |
| Accounts | PUT, GET /accounts/{external_id}, GET /accounts |
| Quotes and orders | POST /accounts/{external_id}/quotes, POST /accounts/{external_id}/orders, GET …/orders/{order_id} |
| Domains | GET /domains/{id}, PATCH (forwarding, privacy, DMARC), POST …/renew, POST …/transfer-out, DNS records under …/dns |
| Existing domains | POST /accounts/{external_id}/domains/connect (nameservers, Cloudflare or manual records) |
| Mailboxes | GET /mailboxes/{id}, PATCH (names), PUT …/photo, DELETE (cancel at the end of the month), POST …/resume |
| Connecting mailboxes | PUT /partner/delegation (your Google client ID and Microsoft app), POST /mailboxes/{id}/access-token, GET …/credentials |
| Sending & warmup | GET/PUT /mailboxes/{id}/sending, POST/GET /accounts/{external_id}/outside-mailboxes, GET/DELETE /outside-mailboxes/{id}, PUT …/sending, POST /accounts/{external_id}/sending/login-links; webhook sending.updated |
| Webhooks and events | PUT /partner/webhook, POST /partner/webhook/rotate, GET /events?after= |
| Balance and settings | GET /partner/balance, GET/PATCH /partner/settings |
Errors are {"error": {"code", "message", "request_id", "details"}} with stable codes such as invalid_request, domain_unavailable, quote_expired, partner_balance_insufficient, upstream_unavailable (retry with the same Idempotency-Key) and partner_suspended.
Dashboard reference
Organization → Developers holds everything for the API:
| Section | What you do there |
|---|---|
| Overview | The base URL, both balances, what each mode has bought and spent |
| API keys | Create, rename and revoke test and live keys |
| Live balance | Card top-ups, the saved card, auto top-up and recent top-ups with receipts |
| Transactions | Every balance change per mode |
| Webhooks | One endpoint per mode, the signing secret (reveal, rotate), recent deliveries and redelivery |
| White-label | Who sends ICANN registrant notices (the registrar or you), and the default DMARC policy |
Key creation, webhook secrets and top-ups are dashboard actions only: Kit and connected MCP apps can't create keys or see secrets.
Questions about a specific integration? See the API overview for the workspace REST API, or contact support from the app.