---
title: "Create a milestone"
method: POST
path: "/repos/{owner}/{repo}/milestones"
tags: ["issue"]
---

# Create a milestone

`POST /repos/{owner}/{repo}/milestones`

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- CreateMilestoneOption — CreateMilestoneOption options for creating a milestone
  - `description` string — Description provides details about the milestone
  - `due_on` string, date-time — Deadline is the due date for the milestone
  - `state` 'open' | 'closed' — State indicates the initial state of the milestone
  - `title` string — Title is the title of the new milestone

## Response `201`

Milestone

- Milestone — Milestone milestone is a collection of issues on one repository
  - `closed_at` string, date-time
  - `closed_issues` integer — ClosedIssues is the number of closed issues in this milestone
  - `created_at` string, date-time
  - `description` string — Description provides details about the milestone
  - `due_on` string, date-time
  - `id` integer — ID is the unique identifier for the milestone
  - `open_issues` integer — OpenIssues is the number of open issues in this milestone
  - `state` 'open' | 'closed' — State indicates if the milestone is open or closed
  - `title` string — Title is the title of the milestone
  - `updated_at` string, date-time

## Other responses

- `404` — APINotFound is a not found empty response

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/revisions/350de506cefa/schema)
