Use the REST API to manage milestones.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /repos/{owner}/{repo}/milestones
Lists milestones for a repository.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
state (string)
The state of the milestone. Either open, closed, or all.
Default: open
Can be one of: open, closed, all
sort (string)
What to sort results by. Either due_on or completeness.
Default: due_on
Can be one of: due_on, completeness
direction (string)
The direction of the sort. Either asc or desc.
Default: asc
Can be one of: asc, desc
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/milestones
Response schema (Status: 200):
Array of Milestone:
url: required, string, format: urihtml_url: required, string, format: urilabels_url: required, string, format: uriid: required, integernode_id: required, stringnumber: required, integerstate: required, string, enum: open, closed, default: "open"title: required, stringdescription: required, string or nullcreator: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringopen_issues: required, integerclosed_issues: required, integercreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timeclosed_at: required, string or null, format: date-timedue_on: required, string or null, format: date-timePOST /repos/{owner}/{repo}/milestones
Creates a milestone.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
title (string) (required)
The title of the milestone.
state (string)
The state of the milestone. Either open or closed.
Default: open
Can be one of: open, closed
description (string)
A description of the milestone.
due_on (string)
The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
201 - Created
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/milestones \
-d '{
"title": "v1.0",
"state": "open",
"description": "Tracking milestone for version 1.0",
"due_on": "2012-10-09T23:39:01Z"
}'
Response schema (Status: 201):
url: required, string, format: urihtml_url: required, string, format: urilabels_url: required, string, format: uriid: required, integernode_id: required, stringnumber: required, integerstate: required, string, enum: open, closed, default: "open"title: required, stringdescription: required, string or nullcreator: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringopen_issues: required, integerclosed_issues: required, integercreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timeclosed_at: required, string or null, format: date-timedue_on: required, string or null, format: date-timeGET /repos/{owner}/{repo}/milestones/{milestone_number}
Gets a milestone using the given milestone number.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
milestone_number (integer) (required)
The number that identifies the milestone.
200 - OK
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/milestones/MILESTONE_NUMBER
Response schema (Status: 200):
Same response schema as Create a milestone.
PATCH /repos/{owner}/{repo}/milestones/{milestone_number}
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
milestone_number (integer) (required)
The number that identifies the milestone.
title (string)
The title of the milestone.
state (string)
The state of the milestone. Either open or closed.
Default: open
Can be one of: open, closed
description (string)
A description of the milestone.
due_on (string)
The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Request:
curl -L \
-X PATCH \
https://api.github.com/repos/OWNER/REPO/milestones/MILESTONE_NUMBER \
-d '{
"title": "v1.0",
"state": "open",
"description": "Tracking milestone for version 1.0",
"due_on": "2012-10-09T23:39:01Z"
}'
Response schema (Status: 200):
Same response schema as Create a milestone.
DELETE /repos/{owner}/{repo}/milestones/{milestone_number}
Deletes a milestone using the given milestone number.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
milestone_number (integer) (required)
The number that identifies the milestone.
204 - No Content
404 - Resource not found
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/milestones/MILESTONE_NUMBER
Response schema (Status: 204):