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

# Create or scope a release milestone

> Requires a repository in the active workspace, verified configuration and active protection, and GitHub triage/write/maintain/admin scope permissions. Saves GitHub mutations sequentially, then attempts sync. A failure may report mutationStarted and confirmed saved work; do not blindly repeat creation after partial success. This endpoint does not provide request-level idempotency.



## OpenAPI

````yaml /api-reference/openapi.json post /api/milestones/create
openapi: 3.1.0
info:
  title: LaneSync API
  description: >-
    REST API for LaneSync release governance — milestones, evidence, quality,
    and sync.
  version: 1.0.0
  contact:
    name: LaneSync
    url: https://lanesync.dev
servers:
  - url: https://lanesync.dev
    description: Hosted SaaS
security: []
tags:
  - name: Health
    description: Liveness and readiness
  - name: Auth
    description: GitHub OAuth and sessions
  - name: Dashboard
    description: Org-wide milestone views
  - name: Milestones
    description: Release pipeline and deploy gates
  - name: Repos
    description: Repository bootstrap and configuration
  - name: Sync
    description: GitHub sync triggers
  - name: Evidence
    description: CI evidence upload (no session)
  - name: Quality
    description: Quality scorecards and exports
  - name: Projects
    description: Multi-repo release projects
  - name: Team
    description: Workspace members and invites
  - name: Webhook
    description: GitHub App webhooks
  - name: Reviews
    description: Live evidence reviewer policy and eligibility
  - name: History
    description: Recorded shipped releases
  - name: MCP
    description: Remote MCP connection, OAuth, and personal keys
paths:
  /api/milestones/create:
    post:
      tags:
        - Milestones
      summary: Create or scope a release milestone
      description: >-
        Requires a repository in the active workspace, verified configuration
        and active protection, and GitHub triage/write/maintain/admin scope
        permissions. Saves GitHub mutations sequentially, then attempts sync. A
        failure may report mutationStarted and confirmed saved work; do not
        blindly repeat creation after partial success. This endpoint does not
        provide request-level idempotency.
      operationId: createReleaseMilestone
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseCreateRequest'
      responses:
        '200':
          description: >-
            Milestone and confirmed scope writes; synced reports readiness
            refresh separately
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseCreateResult'
        '400':
          description: Invalid input or unavailable installation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseCreateError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >-
            Repository not in the selected workspace, or GitHub resource
            unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseCreateError'
        '409':
          description: Setup unverified, milestone closed, or scope changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseCreateError'
        '422':
          description: GitHub rejected a write; inspect confirmed progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseCreateError'
        '500':
          description: >-
            Creation or refresh failed; inspect mutationStarted and saved
            progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseCreateError'
      security:
        - sessionCookie: []
components:
  schemas:
    ReleaseCreateRequest:
      type: object
      properties:
        owner:
          type: string
        repo:
          type: string
        title:
          type: string
        description:
          type: string
        dueDate:
          type: string
          format: date
        existingMilestoneNumber:
          type: integer
          minimum: 1
        issues:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              assignee:
                type: string
            required:
              - title
        issueNumbers:
          type: array
          items:
            type: integer
            minimum: 1
      required:
        - owner
        - repo
      description: >-
        Provide a title for a new milestone, or existingMilestoneNumber for an
        open existing milestone. dueDate is optional YYYY-MM-DD. Existing issues
        must be open and unscoped, or already in the selected existing
        milestone.
    ReleaseCreateResult:
      type: object
      properties:
        milestone:
          $ref: '#/components/schemas/CreatedReleaseMilestone'
        issues:
          type: array
          items:
            type: object
            properties:
              number:
                type: integer
                minimum: 1
              title:
                type: string
            required:
              - number
              - title
        linkedIssueNumbers:
          type: array
          items:
            type: integer
            minimum: 1
        synced:
          type: boolean
        createdBy:
          type: string
      required:
        - milestone
        - issues
        - linkedIssueNumbers
        - synced
    ReleaseCreateError:
      type: object
      properties:
        error:
          type: string
        mutationStarted:
          type: boolean
        milestone:
          $ref: '#/components/schemas/CreatedReleaseMilestone'
        issues:
          type: array
          items:
            type: object
            properties:
              number:
                type: integer
                minimum: 1
              title:
                type: string
        linkedIssueNumbers:
          type: array
          items:
            type: integer
            minimum: 1
      required:
        - error
    CreatedReleaseMilestone:
      type: object
      properties:
        number:
          type: integer
          minimum: 1
        title:
          type: string
        url:
          type: string
          format: uri
      required:
        - number
        - title
        - url
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid session
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Not a workspace member
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: connect.sid
      description: GitHub OAuth session cookie

````

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