> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akua.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create order draft worker bootstrap

> Creates a short-lived worker bootstrap token and renders command/cloud-init data for the cluster allocated to this order draft. Only valid while the draft is waiting for compute bootstrap.



## OpenAPI

````yaml /openapi-public.json post /order_drafts/{id}:createWorkerBootstrap
openapi: 3.1.0
info:
  title: Akua API
  version: 1.0.0
  description: >-
    Public API for managing Akua workspaces, clusters, products, and installs.


    Authenticate with a workspace API token via the `Authorization: Bearer
    sk_akua_...` header.


    A workspace-owned token implies its workspace. Broad tokens select the
    active workspace via the optional `Akua-Context` header.
  contact:
    name: Akua API support
    email: support@akua.dev
    url: https://akua.dev/docs
servers:
  - url: https://api.akua.dev/v1
    description: Production
security: []
tags:
  - name: Auth
    description: Authentication and token management.
  - name: Agents
    description: Agent identities and configuration.
  - name: Agent sessions
    description: Durable agent conversations and tasks.
  - name: Agent turns
    description: Submitted agent work and event emission.
  - name: Agent events
    description: Normalized agent event history and streams.
  - name: Custom domains
    description: Workspace custom domains and routing targets.
  - name: Cloudflare
    description: Cloudflare account credentials and gateway control.
  - name: Clusters
    description: Kubernetes clusters and cluster access operations.
  - name: ComputeConfigs
    description: Workspace compute provider configurations.
  - name: Entitlements
    description: Effective workspace capabilities and limits.
  - name: Dashboards
    description: Dashboard and widget resources.
  - name: Installs
    description: Installation and render operations.
  - name: Machines
    description: Compute machines and lifecycle events.
  - name: Notifications
    description: User notification state.
  - name: Offer Channels
    description: Private offer channels and policy versions.
  - name: Offers
    description: Marketplace offers and redemption tracking.
  - name: Operations
    description: Long-running operation status and controls.
  - name: Order Drafts
    description: Draft checkout orders and checkout sessions.
  - name: Organizations
    description: Organizations, memberships, and managed workspaces.
  - name: Packages
    description: Software packages, versions, and input schemas.
  - name: Products
    description: Marketplace product catalog resources.
  - name: Preview hostnames
    description: Install preview hostnames and routing state.
  - name: Quotas
    description: Workspace quota limits and usage.
  - name: Regions
    description: Available deployment regions.
  - name: Registry
    description: Container registry credentials and repositories.
  - name: Repository change requests
    description: Fork-backed repository change reviews and lifecycle actions.
  - name: Repositories
    description: Source repositories available to the workspace.
  - name: Secrets
    description: Workspace secrets and secret versions.
  - name: Snippets
    description: Reusable snippets and snippet runs.
  - name: Workspace subdomains
    description: Workspace subdomain identity.
  - name: Workspaces
    description: Workspace resources, members, and billing state.
paths:
  /order_drafts/{id}:createWorkerBootstrap:
    post:
      tags:
        - Order Drafts
      summary: Create order draft worker bootstrap
      description: >-
        Creates a short-lived worker bootstrap token and renders
        command/cloud-init data for the cluster allocated to this order draft.
        Only valid while the draft is waiting for compute bootstrap.
      operationId: orderDrafts.createWorkerBootstrap
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 55
            description: Order draft ID
            example: odft_j572abc...
          required: true
          description: Order draft ID
          name: id
          in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                ttl_seconds:
                  type: integer
                  minimum: 60
                  maximum: 86400
              additionalProperties: false
      responses:
        '200':
          description: Worker bootstrap data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDraftWorkerBootstrap'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    OrderDraftWorkerBootstrap:
      type: object
      properties:
        token:
          type: string
          description: Short-lived worker join token (one-time view).
        expires_at:
          type: integer
          minimum: 0
          description: Token expiry time (unix seconds).
        command:
          type: string
          description: >-
            Bash bootstrap command with the token already substituted, ready to
            run on a worker node.
        cloud_init:
          type: string
          description: >-
            Cloud-init YAML with the token already substituted, ready to use as
            worker-node user-data.
        artifacts:
          $ref: '#/components/schemas/WorkerBootstrapArtifacts'
      required:
        - token
        - expires_at
        - command
        - cloud_init
    ApiErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          properties: {}
          description: Always empty for error responses
      required:
        - success
        - errors
        - result
    WorkerBootstrapArtifacts:
      type: object
      properties:
        linux:
          type: object
          properties:
            amd64:
              $ref: '#/components/schemas/WorkerBootstrapArtifact'
            arm64:
              $ref: '#/components/schemas/WorkerBootstrapArtifact'
        windows:
          type: object
          properties:
            amd64:
              $ref: '#/components/schemas/WorkerBootstrapArtifact'
            arm64:
              $ref: '#/components/schemas/WorkerBootstrapArtifact'
      description: >-
        Platform-specific bootstrap artifacts with tokens already substituted.
        Populated only on create responses.
    ApiErrorEntry:
      type: object
      properties:
        code:
          type: integer
          example: 7002
          description: Machine-readable error code
        message:
          type: string
          example: Resource not found
          description: Human-readable error message
        path:
          type: array
          items:
            type: string
          example:
            - body
            - name
          description: Field path that caused the error, when applicable
        metadata:
          type: object
          additionalProperties:
            type: string
      required:
        - code
        - message
    WorkerBootstrapArtifact:
      oneOf:
        - type: object
          properties:
            supported:
              type: boolean
              enum:
                - true
              description: >-
                Whether this platform/architecture artifact is currently
                supported.
            command:
              type: string
              description: >-
                Bootstrap command with the token already substituted.
                Reveal-on-create only.
            shell:
              type: string
              enum:
                - bash
                - powershell
              description: >-
                Shell expected to execute the bootstrap command or downloaded
                script.
            download_url:
              type: string
              format: uri
              description: Token-free script URL used by the bootstrap command.
            cloud_init:
              type: string
              description: >-
                Cloud-init YAML with the token already substituted.
                Reveal-on-create only.
          required:
            - supported
        - type: object
          properties:
            supported:
              type: boolean
              enum:
                - false
              description: >-
                Whether this platform/architecture artifact is currently
                supported. Unsupported entries do not include token-bearing
                commands.
          required:
            - supported
          additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at
        https://akua.dev/developers/api-tokens

````