Orders
An order is the fastest path from “nothing” to “working mailboxes”: it registers one or more domains and creates mailboxes on each of them in a single call, then runs the whole pipeline (availability check → registration → DNS/DMARC → mailbox creation) asynchronously.
| Method | Path | Description |
|---|---|---|
POST | /v1/api/orders | Create an order for one or more domains + mailboxes |
GET | /v1/api/orders/{id} | Get order status, including per-domain and per-mailbox progress |
Create an order
curl -X POST https://api.infrabox.software/v1/api/orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID" \
-H "Content-Type: application/json" \
-d '{
"domains": [
{
"name": "yourdomain.com",
"redirect_url": "https://yourcompany.com",
"registration_years": 1,
"mailboxes": [
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"platform": "GOOGLE"
}
]
}
],
"contact_details": {
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone": "+1234567890",
"organization": "Example Corp",
"address_line1": "123 Main St",
"city": "New York",
"state": "NY",
"country": "US",
"postal_code": "10001"
}
}'domains[].mailboxes[]— one entry per mailbox to create on that domain.platformisGOOGLE(default),MICROSOFT, orAZURE.domains[].sequencer— optionally, a sequencer identifier to auto-connect newly created mailboxes into (see Sequencers) as part of the same order.contact_detailsat the top level applies to every domain unless a domain provides its own.- Domain registration contact details (WHOIS/registrant) are required by registrars — provide real values, not placeholders.
Response (201):
{
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"domains": [
{ "status": "yourdomain.com queued" }
]
}A 201 here means the order was accepted, not that anything finished. Domain registration and
mailbox creation happen in the background — poll GET /v1/api/orders/{order_id} for progress.
Check order status
curl https://api.infrabox.software/v1/api/orders/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Workspace-Id: YOUR_WORKSPACE_UID"Each domain in the response carries its own status:
queued → checking_availability → registering → waiting_for_activation → creating_mailboxes → generating_consent_url → completed (or error / warning), and each mailbox under it carries
pending → creating → active (or error). Poll on an interval (a few seconds to start, backing
off) rather than tight-looping — domain registration in particular can take a couple of minutes.
Errors
| Status | Meaning |
|---|---|
400 | Invalid body, or X-Workspace-Id header missing |
401 | Missing/invalid API key |
404 | Workspace not found, or (on GET) order not found / not owned by your team |
500 | Internal error |