> ## 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 repository change request

> Creates a fork-backed repository change request. Fork write credentials are minted separately.



## OpenAPI

````yaml /openapi-public.json post /repository_change_requests
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:
  /repository_change_requests:
    post:
      tags:
        - Repository change requests
      summary: Create repository change request
      description: >-
        Creates a fork-backed repository change request. Fork write credentials
        are minted separately.
      operationId: repositoryChangeRequests.create
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 53
            description: >-
              Optional workspace/scope context for the request. Carries a single
              workspace wire id (`ws_…`) today. Only needed for broad tokens — a
              workspace-owned token implies its workspace.
            example: ws_j572abc123def456
          required: false
          description: >-
            Optional workspace/scope context for the request. Carries a single
            workspace wire id (`ws_…`) today. Only needed for broad tokens — a
            workspace-owned token implies its workspace.
          name: akua-context
          in: header
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            description: >-
              Required caller-supplied idempotency key. Any non-empty key up to
              64 characters is accepted. Endpoint-specific documentation
              describes how the key is used.
            example: create-prod-2026-05-07
          required: true
          description: >-
            Required caller-supplied idempotency key. Any non-empty key up to 64
            characters is accepted. Endpoint-specific documentation describes
            how the key is used.
          name: idempotency-key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRepositoryChangeRequestBody'
      responses:
        '201':
          description: Repository change request created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRepositoryChangeRequestResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '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'
      security:
        - BearerAuth: []
components:
  schemas:
    CreateRepositoryChangeRequestBody:
      oneOf:
        - type: object
          properties:
            parent_repository_id:
              type: string
              minLength: 1
              maxLength: 55
              description: Repository that will receive the accepted change request.
            expires_at_seconds:
              type: integer
              exclusiveMinimum: 0
              description: Seconds until the repository change request expires.
            kind:
              type: string
              enum:
                - user
          required:
            - parent_repository_id
            - kind
          additionalProperties: false
        - type: object
          properties:
            parent_repository_id:
              type: string
              minLength: 1
              maxLength: 55
              description: Repository that will receive the accepted change request.
            expires_at_seconds:
              type: integer
              exclusiveMinimum: 0
              description: Seconds until the repository change request expires.
            kind:
              type: string
              enum:
                - wizard
          required:
            - parent_repository_id
            - kind
          additionalProperties: false
        - type: object
          properties:
            parent_repository_id:
              type: string
              minLength: 1
              maxLength: 55
              description: Repository that will receive the accepted change request.
            expires_at_seconds:
              type: integer
              exclusiveMinimum: 0
              description: Seconds until the repository change request expires.
            kind:
              type: string
              enum:
                - agent
              description: Agent actor creating the change request.
            agent_id:
              type: string
              minLength: 1
              maxLength: 54
              description: Agent that found the likely source or configuration fix.
            remediation_evidence:
              type: object
              properties:
                summary:
                  type: string
                  minLength: 1
                  maxLength: 2000
                likely_fix:
                  type: string
                  minLength: 1
                  maxLength: 2000
                resource_refs:
                  type: array
                  items:
                    type: object
                    properties:
                      resource:
                        type: string
                        minLength: 1
                        maxLength: 120
                      id:
                        type: string
                        minLength: 1
                        maxLength: 200
                    required:
                      - resource
                      - id
                    additionalProperties: false
                  minItems: 1
                  maxItems: 20
              required:
                - summary
                - likely_fix
                - resource_refs
              additionalProperties: false
              description: >-
                Evidence that the agent found a likely source or configuration
                fix before opening the change request.
          required:
            - parent_repository_id
            - kind
            - agent_id
            - remediation_evidence
          additionalProperties: false
    CreateRepositoryChangeRequestResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 54
        html_url:
          type: string
          maxLength: 2048
          format: uri
          description: Absolute dashboard URL for this resource. OUTPUT_ONLY.
          example: https://akua.dev/repository-change-requests/rcr_j572abc123def456
        workspace_id:
          type: string
          minLength: 1
          maxLength: 53
        parent_repository_id:
          type: string
          minLength: 1
          maxLength: 55
        fork_repository_id:
          type: string
          minLength: 1
          maxLength: 55
        state:
          type: string
          enum:
            - AWAITING_CHANGES
            - VALIDATING
            - READY
            - ACCEPTING
            - ACCEPTED
            - REJECTED
            - WITHDRAWN
            - EXPIRED
            - FAILED
          description: Repository change request lifecycle state
        change_type:
          type: string
          enum:
            - manifest_patch
            - inputs_change
            - package_change
            - unknown
        created_by_type:
          type: string
          enum:
            - user
            - wizard
            - agent
        created_by_id:
          type: string
        remediation_evidence:
          type:
            - object
            - 'null'
          properties:
            summary:
              type: string
              minLength: 1
              maxLength: 2000
            likely_fix:
              type: string
              minLength: 1
              maxLength: 2000
            resource_refs:
              type: array
              items:
                type: object
                properties:
                  resource:
                    type: string
                    minLength: 1
                    maxLength: 120
                  id:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - resource
                  - id
                additionalProperties: false
              minItems: 1
              maxItems: 20
          required:
            - summary
            - likely_fix
            - resource_refs
          additionalProperties: false
        created_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
        updated_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
        expires_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
        rejection_reason:
          type:
            - string
            - 'null'
        etag:
          type: string
      required:
        - id
        - html_url
        - workspace_id
        - parent_repository_id
        - fork_repository_id
        - state
        - change_type
        - created_by_type
        - created_by_id
        - remediation_evidence
        - created_at
        - updated_at
        - expires_at
        - rejection_reason
        - etag
    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
    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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at
        https://akua.dev/developers/api-tokens

````