Create milestone ​
POST/api/v1/workspaces/{slug}/projects/{project_id}/milestones/
Create a new milestone in a project.
Path Parameters ​
project_id:requiredstringProject id.
slug:requiredstringSlug.
Body Parameters ​
title:requiredstringTitle.
target_date:optionalstringTarget date.
external_id:optionalstringExternal id.
external_source:optionalstringExternal source.
Scopes ​
API key authentication or an OAuth token with equivalent access.
Create milestone
bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/milestones/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Example Name",
"target_date": "2024-01-01",
"external_id": "550e8400-e29b-41d4-a716-446655440000",
"external_source": "github"
}'python
import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/milestones/",
headers={"X-API-Key": "your-api-key"},
json={
"title": "Example Name",
"target_date": "2024-01-01",
"external_id": "550e8400-e29b-41d4-a716-446655440000",
"external_source": "github"
}
)
print(response.json())javascript
const response = await fetch(
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/milestones/",
{
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Example Name",
target_date: "2024-01-01",
external_id: "550e8400-e29b-41d4-a716-446655440000",
external_source: "github",
}),
}
);
const data = await response.json();Response201
json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Example Name",
"target_date": "2024-01-01",
"external_id": "550e8400-e29b-41d4-a716-446655440000",
"external_source": "github",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
