Skip to content

Provisioning API · Internal testing only

deleteDomain

DELETE
/domains/{dom}
curl --request DELETE \
--url https://api.builders.ac/api/provisioning/v1alpha1/domains/dom_01k5nb3wz7q2hj8vd4rt6ye9ma \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: example'

Destructive: requires proof of possession. Asynchronous, because the teardown takes mailboxes off Microsoft 365 before the domain goes, so it answers 202 with the operation rather than 204. Repeating it while the teardown runs returns the same operation. Proof is obtained on demand: first send this exact request without Sealed-Proof, open the Sealed-Nonce from the 403 response, then retry without changing the request.

dom
required
string
>= 30 characters <= 30 characters /^[dD][oO][mM]_[0-7][0-9a-hjkmnp-tv-zA-HJKMNP-TV-Z]{25}$/

Domain TypeIDs are accepted case-insensitively. Responses use canonical lowercase.

Sealed-Proof
string
>= 43 characters <= 43 characters /^[A-Za-z0-9_-]{43}$/

The one-time plaintext obtained by opening the Sealed-Nonce challenge for this exact request. Omit it initially; after a 403 challenge, retry with the same method, route, resources, query, body, credential, and Idempotency-Key.

Idempotency-Key
required
string
>= 1 characters <= 255 characters /^[\x20-\x7E]+$/

A client-generated key containing 1–255 printable ASCII characters (0x20 through 0x7E). Reuse it only for exact retries of one logical request.

Accepted. Poll the operation.

Media typeapplication/json
object
id
required

Canonical lowercase TypeID.

string
>= 29 characters <= 29 characters /^op_[0-7][0-9a-hjkmnp-tv-z]{25}$/
object
required
Allowed value: operation
workspace_id
required

Canonical lowercase TypeID.

string
>= 30 characters <= 30 characters /^wsp_[0-7][0-9a-hjkmnp-tv-z]{25}$/
parent_operation_id

Nearest ancestor public Operation which caused this child Operation. Omitted on root Operations.

string
>= 29 characters <= 29 characters /^op_[0-7][0-9a-hjkmnp-tv-z]{25}$/
type
required
Allowed value: domain.deprovision
state
required
string
Allowed value: pending
done
required
target
required
object
type
required
Allowed value: domain
ids
required
Array<string>
>= 1 items <= 100 items unique items
metadata
required
object
domain
required
object
id
required

Canonical lowercase TypeID.

string
>= 30 characters <= 30 characters /^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$/
name
required
string
>= 1 characters <= 253 characters
state
required
string
Allowed values: pending provisioning awaiting_nameservers active failed deprovisioning deprovisioned
created_at
required
string format: date-time
started_at
string format: date-time
finished_at
string format: date-time
cancel_requested_at

Cancellation was requested. It is honoured only at a safe boundary, so keep polling state and done to learn whether it took effect.

string format: date-time
update_by_date
required

Next date by which meaningful progress should be visible.

string format: date-time
completion_by_date
required

Public completion SLA for this Operation.

string format: date-time
Example
{
"id": "op_01k5nd7v2qe9ma4bt3rz8hy6xw",
"object": "operation",
"workspace_id": "wsp_01k5n2rf8bd3xa9e7m4jt6vq5h",
"parent_operation_id": "op_01k5nf4b8yt3qd7vm2ae9rz6hx",
"type": "domain.deprovision",
"state": "pending",
"done": false,
"target": {
"type": "domain",
"ids": [
"dom_01k5nb3wz7q2hj8vd4rt6ye9ma"
]
},
"metadata": {
"domain": {
"id": "dom_01k5nb3wz7q2hj8vd4rt6ye9ma",
"name": "northwind-outbound.com"
},
"state": "pending"
},
"created_at": "2026-04-15T09:15:04Z",
"update_by_date": "2026-04-15T09:45:04Z",
"completion_by_date": "2026-04-15T10:15:04Z"
}
Location
string format: uri
x-correlation-id
string

The id of this request, echoed on every response and repeated in the correlation_id member of a problem body. Quote it in support requests.

Authentication required. The example shows authentication_required; this status is also answered with invalid_api_key. Branch on code, not on the status.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
code
required

Extensible enum. Branch on this, never on title. New codes may appear at any time, so treat an unrecognised one as its HTTP status; GET /problems lists every code this version can answer with, and GET /problems/{code} resolves one.

string
retryable
required
boolean
retry_after
string format: date-time
correlation_id
required
string
errors
object
key
additional properties
Array<string>
Example
{
"type": "https://api.builders.ac/api/provisioning/v1alpha1/problems/authentication_required",
"title": "Authentication required",
"status": 401,
"detail": "Provide an active Provisioning API Key as a Bearer token.",
"code": "authentication_required",
"retryable": false,
"correlation_id": "9f1c2b7a-3d5e-4c81-9a77-2f6b0e4d51c3"
}
x-correlation-id
string

The id of this request, echoed on every response and repeated in the correlation_id member of a problem body. Quote it in support requests.

Either permission is absent, or API-secret proof is missing or invalid. A proof challenge carries a request-bound Sealed-Nonce and WWW-Authenticate; open it and retry this exact request.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
code
required

Extensible enum. Branch on this, never on title. New codes may appear at any time, so treat an unrecognised one as its HTTP status; GET /problems lists every code this version can answer with, and GET /problems/{code} resolves one.

string
retryable
required
boolean
retry_after
string format: date-time
correlation_id
required
string
errors
object
key
additional properties
Array<string>
Example
{
"type": "https://api.builders.ac/api/provisioning/v1alpha1/problems/insufficient_proof",
"title": "API Secret proof required",
"status": 403,
"detail": "Open the Sealed-Nonce with the API Secret, then retry this request with the resulting value in Sealed-Proof.",
"code": "insufficient_proof",
"retryable": true,
"correlation_id": "9f1c2b7a-3d5e-4c81-9a77-2f6b0e4d51c3"
}
Sealed-Nonce
string
/^age-v1\.[A-Za-z0-9_-]+$/

A credential- and request-bound, single-use age v1 challenge. Strip age-v1., Base64URL-decode the remaining text to the binary age file, then open it with the matching API Secret.

Cache-Control
string
Allowed value: private, no-store

Proof challenges are never cached.

WWW-Authenticate
string

Present as Sealed error="insufficient_proof" only for a proof challenge.

x-correlation-id
string

The id of this request, echoed on every response and repeated in the correlation_id member of a problem body. Quote it in support requests.

Not found. The example shows not_found.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
code
required

Extensible enum. Branch on this, never on title. New codes may appear at any time, so treat an unrecognised one as its HTTP status; GET /problems lists every code this version can answer with, and GET /problems/{code} resolves one.

string
retryable
required
boolean
retry_after
string format: date-time
correlation_id
required
string
errors
object
key
additional properties
Array<string>
Example
{
"type": "https://api.builders.ac/api/provisioning/v1alpha1/problems/not_found",
"title": "Not found",
"status": 404,
"detail": "The requested resource was not found.",
"code": "not_found",
"retryable": false,
"correlation_id": "9f1c2b7a-3d5e-4c81-9a77-2f6b0e4d51c3"
}
x-correlation-id
string

The id of this request, echoed on every response and repeated in the correlation_id member of a problem body. Quote it in support requests.

Another operation already holds this domain. Wait for it to finish, then delete again.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
code
required

Extensible enum. Branch on this, never on title. New codes may appear at any time, so treat an unrecognised one as its HTTP status; GET /problems lists every code this version can answer with, and GET /problems/{code} resolves one.

string
retryable
required
boolean
retry_after
string format: date-time
correlation_id
required
string
errors
object
key
additional properties
Array<string>
type
required
title
required
Allowed value: Resource operation in progress
status
required
Allowed value: 409
code
required
Allowed value: resource_operation_in_progress
retryable
required
detail
required
Allowed value: Wait for the current operation to finish, then retry with a new Idempotency-Key.
operation_id

The Operation holding the resource. Null when the blocking run is a dashboard workflow, which has no public Operation; absent on chapters that do not report it.

string | null
>= 30 characters <= 30 characters /^op_[0-7][0-9a-hjkmnp-tv-z]{25}$/
Examples
Exampleresource_operation_in_progress

Resource operation in progress

{
"type": "https://api.builders.ac/api/provisioning/v1alpha1/problems/resource_operation_in_progress",
"title": "Resource operation in progress",
"status": 409,
"detail": "Wait for the current operation to finish, then retry with a new Idempotency-Key.",
"code": "resource_operation_in_progress",
"retryable": true,
"correlation_id": "9f1c2b7a-3d5e-4c81-9a77-2f6b0e4d51c3",
"operation_id": "op_01k5nd7v2qe9ma4bt3rz8hy6xw"
}
x-correlation-id
string

The id of this request, echoed on every response and repeated in the correlation_id member of a problem body. Quote it in support requests.

Rate limit exceeded. The example shows rate_limit_exceeded.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
code
required

Extensible enum. Branch on this, never on title. New codes may appear at any time, so treat an unrecognised one as its HTTP status; GET /problems lists every code this version can answer with, and GET /problems/{code} resolves one.

string
retryable
required
boolean
retry_after
string format: date-time
correlation_id
required
string
errors
object
key
additional properties
Array<string>
Example
{
"type": "https://api.builders.ac/api/provisioning/v1alpha1/problems/rate_limit_exceeded",
"title": "Rate limit exceeded",
"status": 429,
"detail": "Too many requests were made for this policy.",
"code": "rate_limit_exceeded",
"retryable": true,
"correlation_id": "9f1c2b7a-3d5e-4c81-9a77-2f6b0e4d51c3",
"retry_after": "2026-04-15T09:16:04Z"
}
x-correlation-id
string

The id of this request, echoed on every response and repeated in the correlation_id member of a problem body. Quote it in support requests.

Service unavailable. The example shows service_unavailable; this status is also answered with encryption_keys_unavailable, provider_unreachable. Branch on code, not on the status.

Media typeapplication/problem+json
object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
required
string
code
required

Extensible enum. Branch on this, never on title. New codes may appear at any time, so treat an unrecognised one as its HTTP status; GET /problems lists every code this version can answer with, and GET /problems/{code} resolves one.

string
retryable
required
boolean
retry_after
string format: date-time
correlation_id
required
string
errors
object
key
additional properties
Array<string>
Example
{
"type": "https://api.builders.ac/api/provisioning/v1alpha1/problems/service_unavailable",
"title": "Service unavailable",
"status": 503,
"detail": "Retry the request later; the service is temporarily unavailable.",
"code": "service_unavailable",
"retryable": true,
"correlation_id": "9f1c2b7a-3d5e-4c81-9a77-2f6b0e4d51c3"
}
x-correlation-id
string

The id of this request, echoed on every response and repeated in the correlation_id member of a problem body. Quote it in support requests.