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

# Update Movespec Draft

> Replace the mutable draft YAML for one MoveSpec.



## OpenAPI

````yaml /generated/api.openapi.json put /api/movespecs/{movespec_id}/draft
openapi: 3.1.0
info:
  title: Kynasmith Public API
  version: 0.1.0
servers: []
security: []
paths:
  /api/movespecs/{movespec_id}/draft:
    put:
      tags:
        - movespecs
      summary: Update Movespec Draft
      description: Replace the mutable draft YAML for one MoveSpec.
      operationId: update_movespec_draft_api_movespecs__movespec_id__draft_put
      parameters:
        - in: path
          name: movespec_id
          required: true
          schema:
            format: uuid
            title: Movespec Id
            type: string
        - in: header
          name: Idempotency-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Idempotency-Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveSpecDraftUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoveSpecDraftResource'
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: The request payload or query parameters are invalid.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Authentication failed.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Caller is not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Referenced resource does not exist.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Request conflicts with current resource state.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
          description: Request validation failed for the targeted resource state.
      security:
        - BearerAccessToken: []
        - BearerAccessToken: []
components:
  schemas:
    MoveSpecDraftUpdateRequest:
      description: Replace-draft request payload.
      properties:
        yaml_source:
          description: Full mutable YAML source to persist.
          title: Yaml Source
          type: string
      required:
        - yaml_source
      title: MoveSpecDraftUpdateRequest
      type: object
    MoveSpecDraftResource:
      description: >-
        Mutable draft resource for one MoveSpec.


        The ``updated_by`` field has been moved to
        ``MoveSpecDraftFirstPartyResource``

        as it exposes internal actor identifiers (#31).
      properties:
        draft_id:
          description: Draft identifier.
          format: uuid
          title: Draft Id
          type: string
        movespec_id:
          description: Owning MoveSpec identifier.
          format: uuid
          title: Movespec Id
          type: string
        updated_at:
          description: Last draft update timestamp.
          format: date-time
          title: Updated At
          type: string
        yaml_source:
          description: Mutable YAML source under active authoring.
          title: Yaml Source
          type: string
      required:
        - draft_id
        - movespec_id
        - yaml_source
        - updated_at
      title: MoveSpecDraftResource
      type: object
    PublicErrorEnvelope:
      description: Stable public error envelope shared across transports.
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorDetail'
          description: Structured error payload.
      required:
        - error
      title: PublicErrorEnvelope
      type: object
    PublicErrorDetail:
      description: Stable public error payload shared across transports.
      properties:
        code:
          description: Machine-readable error code.
          title: Code
          type: string
        details:
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: boolean
              - type: 'null'
          description: Bounded structured error details.
          title: Details
          type: object
        message:
          description: Human-readable error message.
          title: Message
          type: string
        retryable:
          description: Whether the caller can retry safely.
          title: Retryable
          type: boolean
      required:
        - code
        - message
        - retryable
      title: PublicErrorDetail
      type: object
  securitySchemes:
    BearerAccessToken:
      description: Backend-issued machine access token for project-scoped API access.
      scheme: bearer
      type: http

````