Update a milestone
PATCH
/repos/{owner}/{repo}/milestones/{id}
const url = 'https://gitea.com/api/v1/repos/example/example/milestones/example';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"description":"example","due_on":"2026-04-15T12:00:00Z","state":"example","title":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://gitea.com/api/v1/repos/example/example/milestones/example \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "due_on": "2026-04-15T12:00:00Z", "state": "example", "title": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
id
required
string
The milestone to edit, identified by ID and if not available by name
Request Body
Section titled “Request Body”Media typeapplication/json
EditMilestoneOption options for editing a milestone
object
description
Description provides updated details about the milestone
string
due_on
Deadline is the updated due date for the milestone
string format: date-time
state
State indicates the updated state of the milestone
string
title
Title is the updated title of the milestone
string
Examplegenerated
{ "description": "example", "due_on": "2026-04-15T12:00:00Z", "state": "example", "title": "example"}Responses
Section titled “Responses”Milestone
Media typeapplication/json
Milestone milestone is a collection of issues on one repository
object
closed_at
string format: date-time
closed_issues
ClosedIssues is the number of closed issues in this milestone
integer format: int64
created_at
string format: date-time
description
Description provides details about the milestone
string
due_on
string format: date-time
id
ID is the unique identifier for the milestone
integer format: int64
open_issues
OpenIssues is the number of open issues in this milestone
integer format: int64
state
StateType issue state type
string
title
Title is the title of the milestone
string
updated_at
string format: date-time
Examplegenerated
{ "closed_at": "2026-04-15T12:00:00Z", "closed_issues": 1, "created_at": "2026-04-15T12:00:00Z", "description": "example", "due_on": "2026-04-15T12:00:00Z", "id": 1, "open_issues": 1, "state": "example", "title": "example", "updated_at": "2026-04-15T12:00:00Z"}APINotFound is a not found empty response
Media typeapplication/json