EndpointsCreate order draft

Order Drafts

Create order draft

Starts redeeming an Offer for the signed-in customer, from its ID or the short hash of its link. Any draft field may be set now or later, in any order. The answer lists what is still missing and the problems to fix. Retrying with the same Idempotency-Key answers the same draft.

POST/order_drafts
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

Optional caller-supplied idempotency key. Any non-empty key up to 64 characters is accepted. Endpoint-specific documentation describes how the key is used.

Required string length: 1 - 64

Example: "create-prod-2026-05-07"

Body

application/json
offerstringrequired

The Offer ID (offer_...) or the 8-character short hash from the Offer link

Required string length: 1 - 56

Example: "offer_j572abc..."

workspaceobject

An existing Workspace of the customer, or a new one in a named Organization of the customer, created at once and owned by the customer. Setting the same new name again on this draft answers the same Workspace.

workspace.kindenum<string>required

Available options: existing

Required string length: 1 - 53

cluster_idstring | null

A Cluster in the Workspace; null clears it. To use a new hosted Cluster, create it (and its server) through /v1/clusters first.

Required string length: 1 - 55

valuesobject

Replaces the configuration values as a whole. Sensitive fields (x-ui.sensitive) are refused here; send them with :redeem.

Response

application/json

Order draft created

idstringrequired

Order draft ID

Required string length: 1 - 55

Example: "odft_j572abc..."

offer_idstringrequired

The Offer this draft redeems

statusenum<string>required

draft: editable. redeeming: fields frozen while the Offer is redeemed and the Install created; :redeem again resumes it. installing: the Install exists (install_id, operation_id). failed: the Offer redeemed but the Install could not be created (condition install-failed). cancelled: ended by the customer.

Available options: draft, redeeming, installing, cancelled, failed

workspace_idstring | nullrequired
cluster_idstring | nullrequired
valuesobjectrequired

The customer's configuration values, without the Offer's values and without sensitive values.

missingobject[]required
child attributes
missing.kindenum<string>required

Available options: workspace

problemsobject[]required
child attributes
problems.kindenum<string>required

Available options: offer

problems.reasonenum<string>required

Available options: not_found, not_for_you, unavailable, exhausted

problems.messagestringrequired

Why, for the customer to read

install_idstring | nullrequired
operation_idstring | nullrequired

The Install's create Operation; poll /v1/operations

conditionsobject[]required

What needs attention now; empty when nothing does. Reasons:

  • install-failed (error): the Offer was redeemed but the Install could not be created; the draft is failed.

Maximum array length: 32 elements

child attributes
conditions.reasonstringrequired

Kebab-case reason; the resource documents the reasons it reports.

Maximum string length: 64

Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$

Example: "agent-offline"

conditions.severityenum<string>required

error: the resource failed; the condition says why. warning: it is limited or held until the person acts or it recovers. info: worth knowing, nothing to do.

Available options: error, warning, info

conditions.messagestringrequired

Safe to show the person as is.

Maximum string length: 512

conditions.remedyobject | nullrequired

What the person can do; null when nothing they do helps.

conditions.remedy.kindenum<string>required

Available options: free-capacity

conditions.remedy.metricenum<string>required

Available options: kaas/clusters, compute/machines, compute/cpu, compute/memory, compute/machines_concurrency, compute/managed_vm_trial, agents/turns_concurrency, agents/sandboxes, agents/sandboxes_running, agents/retained_filesystem_lifetime, codemode/executions, api/secrets_access, api/secrets_write, domain_routing/preview_hostnames, domain_routing/custom_domains, source_control/repositories

Maximum string length: 256

Unix timestamp (seconds) when this condition last changed.

Required range: x >= 0

redeemed_atinteger | nullrequired

Unix timestamp (seconds)

Required range: x >= 0

created_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

updated_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

expires_atintegerrequired

Unix timestamp (seconds). After this time a draft can no longer change or redeem.

Required range: x >= 0

etagstringrequired