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

# Begin a Build from an exported game or from project source

> Requires builds.write for the Game.



## OpenAPI

````yaml scripts/reference/sources/openapi/management.json POST /v1/management/games/{gameId}/build-publications
openapi: 3.1.0
info:
  title: Summer Creator Management API
  version: summer.management.creator/v1
  description: >-
    Create and manage your Summer Games store games: store page drafts,
    revisions, preview links, media, builds and releases, and the owner approval
    that publishes them.
servers:
  - url: https://api.summer.games
security:
  - developerBearer: []
tags:
  - name: Games
  - name: Items
  - name: Media
paths:
  /v1/management/games/{gameId}/build-publications:
    parameters:
      - $ref: '#/components/parameters/GameID'
    post:
      tags:
        - Games
      summary: Begin a Build from an exported game or from project source
      description: >-
        Requires builds.write for the Game. Creates a publication in state
        uploading, preallocates its Build identity and binds the declared digest
        and size; the bytes follow through :source-upload. With source.uploadId,
        an existing private upload supplies those bytes instead; source-upload
        returns uploadRequired false and source-complete queues the same durable
        intake. A game without a host becomes a Build directly; a hosted bundle
        enters the durable publisher workflow, which assembles its exact server
        pack with the selected trusted template executable. Completion attaches
        the client pack and queues per-platform verifications. Platform exports
        nothing from project source for these uploads. Execution mode, target
        platforms and player permissions are fixed here; intake later checks the
        bytes against them. The route gameId is the publication destination. An
        omitted build.gameId is bound to it; an explicit different gameId is
        rejected, never rewritten. Replaying the same Idempotency-Key and body
        returns the original acceptance.
      operationId: createBuildPublication
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/ExportedGamePublicationRequest'
                - $ref: '#/components/schemas/SourceBuildPublicationRequest'
      responses:
        '202':
          description: Publication accepted and awaiting its upload
          headers:
            Location:
              schema:
                type: string
              description: The publication's operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildPublicationAccepted'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            upload_not_ready: seal the private upload first;
            upload_format_unsupported: the retained bytes have no importer for
            the declared publication format; artifact_exists: these exact bytes
            are already a Build of the Game or the upload of another open
            publication; client_version_conflict: a single pack's client version
            already names other bytes; template_execution_unsupported: a game
            without a host targets a platform other than iOS;
            runtime_execution_unsupported: the declared execution cannot use the
            selected template path; deployment_not_actionable: Summer declined
            the Game; conflict: the Build version is already taken.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            game_identity_mismatch: the exported declaration names a different
            Game; upload a portable export or use its original Game.
            invalid_request: the declaration is malformed or names fields its
            source kind does not use.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    GameID:
      name: gameId
      in: path
      required: true
      schema:
        type: string
        pattern: ^game_[A-Za-z0-9_-]{8,123}$
  schemas:
    ExportedGamePublicationRequest:
      type: object
      additionalProperties: false
      required:
        - source
        - clientVersion
        - build
      description: >-
        A game without a host targets iOS and names its client in build.client.
        A hosted game uploads a summer-bundle, declares its full server-only
        summer.build.v2 intent, and names the client scene in exportedClient.
        Intake verifies both packs, configuration and declarations. The export
        stamp selects the template set; Platform packages the exported server
        without rebuilding it.
      oneOf:
        - properties:
            build:
              properties:
                executionMode:
                  const: standalone
          not:
            required:
              - exportedClient
        - required:
            - exportedClient
          properties:
            source:
              properties:
                format:
                  const: summer-bundle
            build:
              properties:
                executionMode:
                  const: hosted
      properties:
        source:
          type: object
          additionalProperties: false
          required:
            - kind
            - format
            - archiveSha256
            - sizeBytes
          properties:
            uploadId:
              type: string
              description: >-
                Optional sealed private upload of this Game with the same digest
                and size. No second transfer is needed; call source-complete to
                queue intake.
            kind:
              type: string
              const: exported-game
            format:
              type: string
              enum:
                - summer-bundle
                - pck
              description: >-
                summer-bundle: a summer.games zip with an optional hosted
                server.pck; pck: one Summer-stamped pack for a game without a
                host (stock Godot packs are not accepted yet).
            archiveSha256:
              type: string
              pattern: ^sha256:[0-9a-f]{64}$
            sizeBytes:
              type: integer
              minimum: 1
              maximum: 42949672960
              description: Exact upload size; a pack is at least 100 bytes.
        clientVersion:
          type: string
          description: >-
            The client pack's version: canonical vMAJOR.MINOR.PATCH with
            optional positive -rREVISION. A client version names exactly one
            pack for the Game.
        exportedClient:
          type: object
          additionalProperties: false
          required:
            - entryPoint
          description: >-
            Client scene for a hosted bundle; the hosted Build remains
            server-only.
          properties:
            entryPoint:
              type: string
              pattern: ^res://.+\.tscn$
        build:
          oneOf:
            - type: object
              additionalProperties: false
              required:
                - version
                - executionMode
                - targetPlatforms
                - client
              properties:
                gameId:
                  type: string
                  description: Optional; must be the route's Game.
                version:
                  type: string
                  minLength: 1
                  maxLength: 128
                executionMode:
                  type: string
                  const: standalone
                targetPlatforms:
                  type: array
                  items:
                    type: string
                    enum:
                      - android
                      - ios
                  minItems: 1
                  maxItems: 2
                  uniqueItems: true
                  description: >-
                    The phone apps that run the pack: iOS, Android or both. One
                    ETC2/ASTC pack serves both. Fixed for the Build; to add a
                    platform later, publish a new Build.
                client:
                  type: object
                  additionalProperties: false
                  required:
                    - entryPoint
                  properties:
                    entryPoint:
                      type: string
                      pattern: ^res://.+\.tscn$
                      description: 'The scene the pack opens: the bundle''s client.mainScene.'
                permissions:
                  $ref: '#/components/schemas/BuildPermissions'
            - allOf:
                - 94d92ead-adc1-4c4c-a9ae-2026671fd629
                - type: object
                  required:
                    - executionMode
                    - schema
                    - server
                    - runtime
                  not:
                    required:
                      - client
                  properties:
                    executionMode:
                      const: hosted
                    schema:
                      const: summer.build.v2
                    version:
                      type: string
                      minLength: 1
                      maxLength: 128
    SourceBuildPublicationRequest:
      type: object
      required:
        - source
        - build
      properties:
        source:
          type: object
          additionalProperties: false
          required:
            - kind
            - archiveSha256
            - sizeBytes
          properties:
            kind:
              type: string
              const: platform-upload
            archiveSha256:
              type: string
              pattern: ^sha256:[0-9a-f]{64}$
            sizeBytes:
              type: integer
              minimum: 1
              maximum: 2147483648
        build:
          type: object
          description: The build intent (summer.build.json fields).
    BuildPublicationAccepted:
      type: object
      required:
        - operationId
        - publicationId
        - buildId
        - sourceId
        - state
      properties:
        operationId:
          type: string
        publicationId:
          type: string
        buildId:
          type: string
          description: Preallocated; readable once the publication is preview_ready.
        sourceId:
          type: string
        state:
          type: string
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
            - retryable
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            retryable:
              type: boolean
    BuildPermissions:
      type: array
      uniqueItems: true
      maxItems: 5
      description: >-
        Optional player-data and delegated-action requests declared by this
        immutable Build. Omission means none. A declaration is not player
        consent; refusal never prevents Game admission.
      items:
        type: string
        enum:
          - social.friends.read
          - social.messages.read
          - social.messages.send
          - social.messages.read_state.write
          - game.chat.send
  responses:
    NotFound:
      description: Missing or inaccessible resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Required dependency unavailable; the error is retryable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    developerBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Your Summer account token. An agent gets it by signing in with OAuth:
        `summer login --store` in the Summer CLI, or the Summer connector in an
        AI app. Agent tokens can call only the operations on these pages.
        Publishing needs an approval from the game's owner first.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.