Update a milestone
const url = 'https://gitea.example.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":"open","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.example.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": "open", "title": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
The milestone to edit, identified by ID and if not available by name
Request Body
Section titled “Request Body”EditMilestoneOption options for editing a milestone
object
Description provides updated details about the milestone
Deadline is the updated due date for the milestone
State indicates the updated state of the milestone
Title is the updated title of the milestone
Responses
Section titled “Responses”Milestone
Milestone milestone is a collection of issues on one repository
object
ClosedIssues is the number of closed issues in this milestone
Description provides details about the milestone
ID is the unique identifier for the milestone
OpenIssues is the number of open issues in this milestone
State indicates if the milestone is open or closed open StateOpen StateOpen pr is opened closed StateClosed StateClosed pr is closed
Title is the title of the milestone
Example
{ "state": "open"}APINotFound is a not found empty response