> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developers.awork.com/apiv1/project-milestones/get-project-milestones-by-project-id/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server. # Returns milestones for the specified project. GET https://api.awork.com/api/v1/projects/{projectId}/milestones Returns milestones assigned to the specified project. The user must have `project-planning-data:read` permission for the project. Reference: https://developers.awork.com/apiv1/project-milestones/get-project-milestones-by-project-id ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `projectId` (string, required) — The id of the project. ## Response ### 200 OK - `list of ProjectMilestone` ## Errors ### 401 Unauthorized Error Unauthorized - `code` (string, required) — The error code. - `description` (string, required) — The description of the error. - `link` (string, required) — The link to the API documentation page. - `details` (list of string, optional, nullable) — A list of details describing the error. - `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property. - `traceId` (string, optional, nullable) — The request trace id for tracking the request. ## Types ### ProjectMilestone - `name` (string, required) — The name of the milestone. - `color` (enum, required) — The color of the milestone. - Allowed values: `blue`, `purple`, `red`, `yellow`, `green`, `asphalt` - `projectId` (string, required) — The id of the project the milestone is related to. - `dueDate` (string, optional) — The date the milestone is due. - `id` (string, optional) - `project` (Project, optional) — /// This class contains all information to handle projects. - `createdOn` (string, optional) — The date this entity was created. - `createdBy` (string, optional) — The id of the user who created this entity. - `updatedOn` (string, optional) — The date this entity was last modified. - `updatedBy` (string, optional) — The id of the user who last modified this entity. ### ValidationErrorResponse The validation error response. - `property` (string, optional, nullable) — The name of the property that failed validation. - `message` (string, optional, nullable) — The reason why this property failed validation. ### Project /// This class contains all information to handle projects. - `name` (string, required) — The name of the Project. Max allowed length: 1000 characters. - `isPrivate` (boolean, optional) — Whether this is a private project only visible to members and the creator. Defaults to false. Can only be changed from public to private if no times have been tracked on this project. Can always be made public. - `description` (string, optional, nullable) — The project description. Max allowed length: 25000 characters. - `startDate` (string, optional, nullable) — The start date of the project. - `dueDate` (string, optional, nullable) — The due date of the project. - `companyId` (string, optional, nullable) — The id of the company. - `timeBudget` (integer, optional, nullable) — The time budget the project has, in seconds. - `isBillableByDefault` (boolean, optional, nullable) — Whether project times should be billable by default. - `projectTypeId` (string, optional, nullable) — The id of the project type of this project. - `color` (string, optional, nullable) — The color of the project for display purposes in awork. The supported colors are defined by the awork frontend. Can be null when no color assigned. - `deductNonBillableHours` (boolean, optional) — Whether to deduct non-billable hours from project budgets. - `isProjectKeyVisible` (boolean, optional, nullable) — Whether project key should be visible for this project. If null, it will use the workspace default setting. - `projectStatusId` (string, optional) — The id of the project status. - `projectTemplateId` (string, optional, nullable) — The id of the template which is used to create the project. - `publicProjectTemplateId` (string, optional, nullable) — The id of the public template which is used to create the project. - `workflowId` (string, optional, nullable) — The id of the workflow to link to the project. Cannot be specified if ProjectTemplateId is set. - `id` (string, optional) — Id of the project. - `projectKey` (string, optional, nullable) — The unique project key within the workspace (e.g., "NIKE"). Maximum 32 characters, uppercase letters, numbers, and dashes only. - `hasImage` (boolean, optional) — Whether the project has an image. - `createdOn` (string, optional) — The date this entity was created. - `createdBy` (string, optional) — The id of the user who created this entity. - `updatedOn` (string, optional) — The date this entity was last modified. - `updatedBy` (string, optional) — The id of the user who last modified this entity. - `closedOn` (string, optional, nullable) — The date the project was set to closed. - `closedBy` (string, optional, nullable) — The user who closed the project. - `createdByProjectTemplateId` (string, optional, nullable) — The id of the template the project was created from. - `projectType` (NestedTypeModel, optional) - `projectStatus` (ExtendedProjectStatusModel, optional) - `company` (NestedCompanyModelForProjects, optional) - `tags` (list of ProjectTagModel, optional, nullable) — The tags for this project. - `totalPlannedDurationWithHierarchy` (long, optional, nullable) — The total planned duration of the project with hierarchy, in seconds. Calculated based on the planned durations of tasks and task lists of the project. Sum of Sum(TotalPlannedDurationWithHierarchy of all task lists) and Sum(TotalPlannedDurationWithHierarchy of all parent tasks without list) - `tasksCount` (integer, optional, nullable) — The number of all tasks related to the project. - `tasksDoneCount` (integer, optional, nullable) — The number of all tasks in status 'done' related to the project. - `members` (list of ProjectMember, optional, nullable) — The members of this project. - `trackedDuration` (integer, optional, nullable) — The summed up duration of all time trackings for this project. - `customFields` (list of CustomField, optional, nullable) — Custom fields of the project. - `resourceVersion` (long, optional) — The version of the entity, updated on every modification, to the ticks in UTC. Not identical to UpdatedOn. - `teams` (list of TeamModel, optional, nullable) — The teams the project is associated to. - `isExternal` (boolean, optional) — True if this entity is coming from an external workspace (awork Connect). - `isRetainer` (boolean, optional) — Whether the project is a retainer project. Retainer projects have at least one retainer with budgets. - `isMultiAssignmentAllowed` (boolean, optional) — Indicates whether multi-assignment is allowed for tasks in this project's workspace. - `plannedDuration` (long, optional, nullable, deprecated) — The total planned time of the project, in seconds. The time is calculated as te sum of the planned duration by all project tasks. ### NestedTypeModel - `id` (string, optional) — The identifier of the nested model. - `name` (string, optional, nullable) — The name of the entity. - `icon` (string, optional, nullable) — The icon of the type. - `isArchived` (boolean, optional) — Whether the type is archived. ### ExtendedProjectStatusModel - `id` (string, optional) — The identifier of the nested model. - `name` (string, optional, nullable) — The name of the entity. - `description` (string, optional, nullable) — The description of the type. - `type` (string, optional, nullable) — The type of the status. - `isArchived` (boolean, optional) — Whether the type is archived. - `typeOrder` (integer, optional) — The order of the status type. - `isExternal` (boolean, optional) — True if this entity is coming from an external workspace (awork Connect). ### NestedCompanyModelForProjects - `id` (string, optional) — The identifier of the nested model. - `name` (string, optional, nullable) — The name of the entity. - `hasImage` (boolean, optional) — Whether the company has a profile image. - `description` (string, optional, nullable) — The description of the company. - `tags` (list of DefaultTagModel, optional, nullable) — The tags of the company. ### ProjectTagModel A tag model used for the project. Do not delete, we need to create copies of the tag model for each entity to avoid issues with Automapper. - `id` (string, optional) - `name` (string, optional, nullable) — The name of the tag. - `color` (string, optional, nullable) — The color of the tag. ### ProjectMember - `id` (string, optional) — The id of the project member entity. - `userId` (string, optional) — The id of the user who is this project member. - `firstName` (string, optional, nullable) — The first name of the user. - `lastName` (string, optional, nullable) — The last name of the user. - `hasImage` (boolean, optional, nullable) — Whether the user has an image. - `projectRoleId` (string, optional) — The project role of the project member. - `projectRoleName` (string, optional, nullable) — The project role name of the project member. - `isResponsible` (boolean, optional) — Whether the user is responsible for this project. - `isDeactivated` (boolean, optional) — Whether the user is deactivated. - `isExternal` (boolean, optional) — True if this entity is coming from an external workspace (awork Connect). ### CustomField Represents the custom field value. - `customFieldDefinitionId` (string, optional) — The custom field definition id. - `userIdValue` (string, optional, nullable) — The the user id value. - `clientIdValue` (string, optional, nullable) — The client id value. - `numberValue` (double, optional, nullable) — The number value. - `selectionOptionIdValue` (string, optional, nullable) — The selection option id value. - `selectionOption` (CustomFieldSelectionOption, optional) - `textValue` (string, optional, nullable) — The text value. - `dateValue` (string, optional, nullable) — The date value. - `booleanValue` (boolean, optional, nullable) — The boolean value. ### TeamModel - `id` (string, optional) — The id of the team. - `name` (string, optional, nullable) — The name of the team. - `icon` (string, optional, nullable) — The icon which is assigned to the team. - `color` (string, optional, nullable) — The color of the team. ### DefaultTagModel - `id` (string, optional) — The Id of the tag. - `name` (string, optional, nullable) — The name of the tag. - `color` (string, optional, nullable) — The color of the tag. - `entityId` (string, optional) — The id of the entity the tag is related to. ### CustomFieldSelectionOption - `value` (string, required) — The selection value which can be later used in a select custom field. - `id` (string, optional) — The id of the custom field selection option. - `color` (enum, optional, nullable) — The color of the selection option. - Allowed values: `red`, `orange`, `yellow`, `green`, `cyan`, `blue`, `indigo`, `purple`, `steel` - `order` (double, optional) — The order of the custom field selection option. ## Examples **Response** ```json [ { "name": "Internal Review", "color": "green", "projectId": "123e4567-e89b-12d3-a456-426614174000", "dueDate": "2022-03-01T15:00:00Z", "id": "123e4567-e89b-12d3-a456-426614174000", "project": { "name": "Website Design", "isPrivate": false, "description": "Sitemap, design, assets and implementation of the new online presence.", "startDate": "2022-03-01T00:00:00Z", "dueDate": "2022-05-01T00:00:00Z", "companyId": "123e4567-e89b-12d3-a456-426614174000", "timeBudget": 576000, "isBillableByDefault": true, "projectTypeId": "123e4567-e89b-12d3-a456-426614174000", "color": "purple", "deductNonBillableHours": true, "isProjectKeyVisible": true, "projectStatusId": "123e4567-e89b-12d3-a456-426614174000", "projectTemplateId": "123e4567-e89b-12d3-a456-426614174000", "publicProjectTemplateId": "123e4567-e89b-12d3-a456-426614174000", "workflowId": "123e4567-e89b-12d3-a456-426614174000", "id": "123e4567-e89b-12d3-a456-426614174000", "projectKey": "string", "hasImage": true, "createdOn": "2024-01-15T09:30:00Z", "createdBy": "123e4567-e89b-12d3-a456-426614174000", "updatedOn": "2024-01-15T09:30:00Z", "updatedBy": "123e4567-e89b-12d3-a456-426614174000", "closedOn": null, "closedBy": "123e4567-e89b-12d3-a456-426614174000", "createdByProjectTemplateId": "123e4567-e89b-12d3-a456-426614174000", "projectType": { "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d", "name": "Design", "icon": "thumb_up", "isArchived": false }, "projectStatus": { "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d", "name": "Design", "description": "Work in progress", "type": "todo", "isArchived": false, "typeOrder": 1, "isExternal": true }, "company": { "id": "80a2b26b-9fb3-42b5-b6dc-126c437cad5d", "name": "Design", "hasImage": true, "description": "A brand strategy and design agency", "tags": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Design", "color": "purple", "entityId": "123e4567-e89b-12d3-a456-426614174000" } ] }, "tags": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Design", "color": "purple" } ], "totalPlannedDurationWithHierarchy": 432000, "tasksCount": 12, "tasksDoneCount": 3, "members": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "userId": "123e4567-e89b-12d3-a456-426614174000", "firstName": "Lisa", "lastName": "Smith", "hasImage": true, "projectRoleId": "123e4567-e89b-12d3-a456-426614174000", "projectRoleName": "Project Manager", "isResponsible": true, "isDeactivated": false, "isExternal": true } ], "trackedDuration": 72000, "customFields": [ { "customFieldDefinitionId": "123e4567-e89b-12d3-a456-426614174000", "userIdValue": "123e4567-e89b-12d3-a456-426614174000", "clientIdValue": "123e4567-e89b-12d3-a456-426614174000", "numberValue": 123.45, "selectionOptionIdValue": "123e4567-e89b-12d3-a456-426614174000", "selectionOption": { "value": "Website Design", "id": "123e4567-e89b-12d3-a456-426614174000", "color": "purple", "order": 0 }, "textValue": "S1: Business Critical", "dateValue": "2024-01-15T09:30:00Z", "booleanValue": true } ], "resourceVersion": 637825154598057900, "teams": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Designers", "icon": "paintbrush", "color": "purple" } ], "isExternal": true, "isRetainer": true, "isMultiAssignmentAllowed": true, "plannedDuration": 432000 }, "createdOn": "2024-01-15T09:30:00Z", "createdBy": "123e4567-e89b-12d3-a456-426614174000", "updatedOn": "2024-01-15T09:30:00Z", "updatedBy": "123e4567-e89b-12d3-a456-426614174000" } ] ``` **SDK Code** ```python import requests url = "https://api.awork.com/api/v1/projects/projectId/milestones" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.awork.com/api/v1/projects/projectId/milestones'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.awork.com/api/v1/projects/projectId/milestones" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.awork.com/api/v1/projects/projectId/milestones") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.awork.com/api/v1/projects/projectId/milestones") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.awork.com/api/v1/projects/projectId/milestones', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.awork.com/api/v1/projects/projectId/milestones"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.awork.com/api/v1/projects/projectId/milestones")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```