Create a milestone
POST
/repos/{owner}/{repo}/milestones https://api.github.com
Creates a milestone.
Parameters
path Path Parameters
| Name | Type |
|---|---|
owner
required
The account owner of the repository. The name is not case sensitive. | string |
repo
required
The name of the repository without the | string |
Request Body
application/json
required
{
title: string;
state?: "open" | "closed";
description?: string;
due_on?: string;
}
title: string;
state?: "open" | "closed";
description?: string;
due_on?: string;
}
Responses
201 application/json
Response
interface Milestone {
url: string;
html_url: string;
labels_url: string;
id: number;
node_id: string;
number: number;
state: "open" | "closed";
title: string;
description: string | null;
creator:SimpleUser | null;
open_issues: number;
closed_issues: number;
created_at: string;
updated_at: string;
closed_at: string | null;
due_on: string | null;
}
url: string;
html_url: string;
labels_url: string;
id: number;
node_id: string;
number: number;
state: "open" | "closed";
title: string;
description: string | null;
creator:
open_issues: number;
closed_issues: number;
created_at: string;
updated_at: string;
closed_at: string | null;
due_on: string | null;
}
Client Errors
404 application/json
Resource not found
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
422 application/json
Validation failed, or the endpoint has been spammed.
interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}