### Start Timer Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/v2/timetracking.mdx Starts a timer for a user. Optionally, a project and task can be specified. There can only be one active timer per user. ```APIDOC ## POST /v2/users/:userId/timetracking/start ### Description Starts a timer for a specific user. This can be optionally associated with a project and task. Only one timer can be active per user at a time. ### Method POST ### Endpoint /v2/users/:userId/timetracking/start ### Parameters #### Path Parameters - **userId** (string) - Required - The ID of the user to start the timer for. #### Request Body - **timezone** (string) - Required - The timezone of the user. - **typeOfWorkId** (string) - Required - The ID of the type of work. - **projectId** (string) - Optional - The ID of the project to associate the timer with. - **taskId** (string) - Optional - The ID of the task to associate the timer with. ### Request Example ```json { "timezone": "Europe/Berlin", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000" } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the running time entry. - **userId** (string) - The ID of the user. - **typeOfWorkId** (string) - The ID of the type of work. - **projectId** (string) - The ID of the project. - **taskId** (string) - The ID of the task. - **startDate** (string) - The start date and time in UTC. - **duration** (integer) - The duration in seconds (will be 0 for a running timer). - **timezone** (string) - The timezone of the time entry. #### Response Example ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000", "startDate": "2024-05-14T10:00:00Z", "duration": 0, "timezone": "Europe/Berlin" } ``` ``` -------------------------------- ### Preview awork Docs Locally with Fern Source: https://github.com/awork-io/developer-docs/blob/main/README.md Run this command in your terminal to start a local development server for previewing the awork documentation. ```sh fern docs dev ``` -------------------------------- ### Start Timer Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/timetracking.mdx Starts a timer for a specific user. Only one active timer is allowed per user. The timer automatically stops after 24 hours or when the maximum allowed time is reached. ```APIDOC ## POST /api/v1/users/:userId/timetracking/start ### Description Starts a timer for a user. ### Method POST ### Endpoint /api/v1/users/:userId/timetracking/start ### Parameters #### Path Parameters - **userId** (string) - Required - The ID of the user to start the timer for. #### Request Body - **timezone** (string) - Required - The user's timezone. - **typeOfWorkId** (string) - Required - The ID of the type of work. - **projectId** (string) - Optional - The ID of the project. - **taskId** (string) - Optional - The ID of the task. ### Request Example ```json { "timezone": "Europe/Berlin", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000" } ``` ``` -------------------------------- ### Create Time Entry with Start Date and Duration Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/timetracking.mdx Use this endpoint to create a time entry by specifying the start date and duration. Required fields include timezone, userId, and typeOfWorkId. ```sh curl -X POST "https://api.awork.com/api/v1/timeentries" \ -H "Content-Type: application/json" \ -d '{ "timezone": "Europe/Berlin", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "startDateUtc": "2024-05-14T10:00:00Z", "duration": 3600 }' ``` -------------------------------- ### VSCode mcp.json Configuration Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/mcp-server.mdx Configure the awork MCP server in VSCode's mcp.json file. This example uses Bearer Token authentication and prompts for the API key. ```json { "servers": { "awork": { "url": "https://api.awork.com/api/v1/mcp", "type": "http", "headers": { "Authorization": "Bearer ${input:awork-api-key}", "Content-Type": "application/json", "Accept": "application/json" } } }, "inputs": [ { "type": "promptString", "id": "awork-api-key", "description": "awork API Key", "password": true } ] } ``` -------------------------------- ### Create Time Entry with Project and Task Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/v2/timetracking.mdx This example shows how to create a time entry and assign it to a specific project and task by including projectId and taskId. If both duration and endDate are provided, endDate takes precedence. ```curl curl -X POST "https://api.awork.com/api/v2/timeentries" \ -H "Content-Type: application/json" \ -d '{ "timezone": "Europe/Berlin", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000", "startDate": "2024-05-14T10:00:00Z", "duration": 3600 }' ``` -------------------------------- ### Create Time Entry with Start Date and Duration Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/v2/timetracking.mdx Use this endpoint to create a time entry by specifying the start date and duration. Ensure you provide the timezone, userId, and typeOfWorkId. The duration is in seconds. ```curl curl -X POST "https://api.awork.com/api/v2/timeentries" \ -H "Content-Type: application/json" \ -d '{ "timezone": "Europe/Berlin", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "startDate": "2024-05-14T10:00:00Z", "duration": 3600 }' ``` -------------------------------- ### Start Timer for User Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/timetracking.mdx Initiate the time tracking timer for a specific user. This endpoint requires the user's ID, timezone, and typeOfWorkId. The timer can also be associated with a project and task. ```sh curl -X POST https://api.awork.com/api/v1/users/123e4567-e89b-12d3-a456-426614174000/timetracking/start \ -H "Content-Type: application/json" \ -d '{ "timezone": "Europe/Berlin", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Example Webhook Request Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/webhooks.mdx This cURL command demonstrates the structure of a POST request sent to a configured webhook URL when a project automation trigger occurs. It includes necessary headers like Content-Type and custom authorization, along with a JSON payload containing event details. ```sh curl -X POST https://example.com/webhook \ -H 'Content-Type: application/json' \ -H 'Api-Key: abcd...' \ -d '{ "eventName": "Task Status Changed", "traceId": "5a8e9540f698455b48cd092811ade4e9", "project": { "id": "123e4567-e89b-12d3-a456-426614174000", ... }, "task": { "id": "123e4567-e89b-12d3-a456-426614174000", ... } }' ``` -------------------------------- ### Get Valid Project Statuses for a Project Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Retrieves the project statuses that are valid for a specific existing project. ```APIDOC ## GET /projects/{projectId}/projectstatuses ### Description Retrieves the valid project statuses for a given project. ### Method GET ### Endpoint /api/v1/projects/{projectId}/projectstatuses ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project. ``` -------------------------------- ### Adding a New API Group to docs.yml Source: https://github.com/awork-io/developer-docs/blob/main/AGENTS.md This YAML example shows how to add a new API group to the `docs.yml` layout, including a custom overview page and the corresponding OpenAPI tag. ```yaml - page: Feature Overview path: ./pages/api/feature.mdx icon: appropriate-icon - feature tag name # Must match OpenAPI tag - related tag name ``` -------------------------------- ### Start Timer for User Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/v2/timetracking.mdx Initiate the time tracking timer for a specific user. This endpoint requires the user's ID, timezone, and typeOfWorkId. Additional project and task IDs can be provided to associate the timer with specific work items. ```curl curl -X POST https://api.awork.com/api/v2/users/123e4567-e89b-12d3-a456-426614174000/timetracking/start \ -H "Content-Type: application/json" \ -d '{ "timezone": "Europe/Berlin", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Get Valid Project Statuses for a Project Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Retrieve the project statuses that are applicable to a specific existing project. This endpoint accounts for workflow-inherited statuses. ```shell curl -X GET "https://api.awork.com/api/v1/projects/123e4567-e89b-12d3-a456-426614174000/projectstatuses" ``` -------------------------------- ### Create Project Custom Field Definition Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/psa-agentursoftware-integration.mdx Use this endpoint to create a custom field definition for projects. This is a one-time setup per workspace. Ensure 'entity' is set to 'project'. ```sh curl -X POST "https://api.awork.com/api/v1/customfielddefinitions" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{ "name": "External Project Link", "type": "link", "entity": "project", "order": 1 }' ``` -------------------------------- ### Example Webhook Payload for Project Added Event Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/webhooks.mdx This JSON object represents the payload received when a project is added. It includes details about the event, the project entity, and changes made. ```json { "timestamp": "2025-07-24T14:28:39.5966465+00:00", "eventType": "project_added", "entity": { "id": "123e4567-e89b-12d3-a456-426614174000", "hasImage": false, "createdOn": "2023-09-03T20:28:39.5961826Z", "createdBy": "123e4567-e89b-12d3-a456-426614174000", "updatedOn": "2025-07-24T14:28:40.017585Z", "updatedBy": "123e4567-e89b-12d3-a456-426614174000", "projectStatus": { "typeOrder": 2, "isArchived": false, "type": "not-started", "name": "Not started", "id": "fb7de344-aa95-4d75-ae1b-c7c01393f267" }, "tags": ["design"], "plannedDuration": 0, "tasksCount": 0, "tasksDoneCount": 0, "members": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "userId": "123e4567-e89b-12d3-a456-426614174000", "firstName": "Carla", "lastName": "Creative", "hasImage": false, "projectRoleId": "123e4567-e89b-12d3-a456-426614174000", "projectRoleName": "Project Member", "isResponsible": true, "isDeactivated": false } ], "trackedDuration": 0, "teams": [], "projectStatusId": "123e4567-e89b-12d3-a456-426614174000", "name": "Website Design", "isPrivate": false, "timeBudget": 0, "isBillableByDefault": false }, "entityId": "123e4567-e89b-12d3-a456-426614174000", "entityType": "project", "entityLink": "https://superstar-design.awork.com/projects/123e4567-e89b-12d3-a456-426614174000", "traceId": "5a8e9540f698455b48cd092811ade4e9", "triggeredBy": { "id": "123e4567-e89b-12d3-a456-426614174000", "firstName": "Carla", "lastName": "Creative" }, "changes": [ { "property": "ClosedBy", "new": "123e4567-e89b-12d3-a456-426614174000" }, { "property": "ClosedOn", "new": "2025-07-24T14:28:39.5966465+00:00" }, { "property": "TaskStatusId", "old": "123e4567-e89b-12d3-a456-426614174000", "new": "123e4567-e89b-12d3-a456-426614174001" }, { "property": "UpdatedOn", "old": "2025-07-24T14:28:39.5966465+00:00", "new": "2025-07-24T14:28:39.5966465+00:00" } ] } ``` -------------------------------- ### Generate Upload URL for a Task Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/files.mdx Use this endpoint to get a pre-signed URL for uploading files. The response contains the upload URL and a unique upload ID. ```shell curl -X POST https://api.awork.com/api/v1/files/generateUploadURL \ -H 'Content-Type: application/json' ``` -------------------------------- ### Get Valid Task Statuses for a Project Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Fetch the task statuses that are valid for a particular project. This ensures you are using statuses relevant to the project's configuration. ```shell curl -X GET "https://api.awork.com/api/v1/projects/123e4567-e89b-12d3-a456-426614174000/taskstatuses" ``` -------------------------------- ### Create Project From Scratch Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Use this endpoint to create a new project with only a name. The `name` field is the only required parameter. ```shell curl -X POST "https://api.awork.com/api/v1/projects" \ -H "Content-Type: application/json" \ -d '{ "name": "My new project" }' ``` -------------------------------- ### Filter by Guid Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/filtering.mdx Filter records by a Guid property. The `guid` type identifier must be used, followed by the GUID value. ```sh /users?filterby=id eq guid'12345678-aaaa-bbbb-cccc-ddddeeeeffff' ``` -------------------------------- ### Create Project from Template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/psa-agentursoftware-integration.mdx Create a new project in awork using a project template. This is useful when a quotation is approved in your PSA and a corresponding project needs to be set up in awork. ```sh curl -X POST "https://api.awork.com/api/v1/projects" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{ "name": "Website Relaunch - ACME GmbH", "companyId": "11111111-2222-3333-4444-555555555555", "projectTemplateId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "isBillableByDefault": true }' ``` -------------------------------- ### Create Project from Scratch Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Creates a new project with a specified name. The `name` field is the only required field. ```APIDOC ## POST /projects ### Description Creates a new project from scratch. ### Method POST ### Endpoint /api/v1/projects ### Parameters #### Request Body - **name** (string) - Required - The name of the project. ``` -------------------------------- ### Create a Project Template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projecttemplates.mdx Use this endpoint to create a new project template. The `name` field is required. ```shell curl -X POST https://api.awork.com/api/v1/projecttemplates \ -H 'Content-Type: application/json' \ -d '{ "name": "Client Delivery Template" }' ``` -------------------------------- ### Get Custom Field Values of a Task Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/customfields.mdx Retrieve the custom field values associated with a task by making a GET request to the task endpoint. The custom field values are included in the response payload. ```sh curl -X GET https://api.awork.com/api/v1/tasks/123e4567-e89b-12d3-a456-426614174000 \ -H "Content-Type: application/json" ``` ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "baseType": "projecttask", "customFields": [ { "customFieldDefinitionId": "123e4567-e89b-12d3-a456-426614174000", "textValue": "S1: Business Critical" } ] ... } ``` -------------------------------- ### Create Workflow from Project Configuration Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/workflows.mdx Create a new workflow using an existing project's configuration as a blueprint. Optionally, link the new workflow to the project and copy statuses and automations. ```shell curl -X POST https://api.awork.com/api/v1/workflows/fromproject/123e4567-e89b-12d3-a456-426614174000 \ -H 'Content-Type: application/json' \ -d '{ "name": "Workflow from Consulting Template", "copyProjectStatuses": true, "copyTaskStatuses": true, "copyCustomFields": true, "copyAutomations": true, "linkProjectToWorkflow": true }' ``` -------------------------------- ### Create Project With Workflow Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Create a project and link it to a workflow by providing `workflowId`. Optionally, specify `projectStatusId` from that workflow. ```shell curl -X POST "https://api.awork.com/api/v1/projects" \ -H "Content-Type: application/json" \ -d '{ "name": "My workflow-based project", "workflowId": "223e4567-e89b-12d3-a456-426614174000", "projectStatusId": "323e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Get Workflow Task Statuses Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Fetches the task statuses available for a given workflow. ```APIDOC ## GET /workflows/{workflowId}/taskstatuses ### Description Retrieves the task statuses associated with a specific workflow. ### Method GET ### Endpoint /api/v1/workflows/{workflowId}/taskstatuses ### Parameters #### Path Parameters - **workflowId** (string) - Required - The ID of the workflow. ``` -------------------------------- ### Get Current User Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/users.mdx Retrieves information about the currently authenticated user, including their workspace details. ```APIDOC ## GET /users/me ### Description Retrieves the details of the current user, including their workspace ID. ### Method GET ### Endpoint https://api.awork.com/api/v1/users/me ### Response #### Success Response (200) - **id** (string) - The unique identifier of the user. - **workspace** (object) - Information about the user's workspace. - **id** (string) - The unique identifier of the workspace. - **name** (string) - The name of the workspace. - **url** (string) - The URL of the workspace. ### Response Example ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "workspace": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "NCNSTN", "url": "https://ncnstn.awork.com" } } ``` ``` -------------------------------- ### Apply Task Bundle to Project Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projecttemplates.mdx Import tasks and task lists from a task bundle into a project. Existing task lists with matching names will be reused. ```shell curl -X POST https://api.awork.com/api/v1/projects/123e4567-e89b-12d3-a456-426614174000/addtaskbundle \ -H 'Content-Type: application/json' \ -d '{ "taskBundleId": "123e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Get Valid Task Statuses for a Project Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Retrieves the task statuses that are valid for a specific existing project. ```APIDOC ## GET /projects/{projectId}/taskstatuses ### Description Retrieves the valid task statuses for a given project. ### Method GET ### Endpoint /api/v1/projects/{projectId}/taskstatuses ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project. ``` -------------------------------- ### Get Workflow Project Statuses Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Fetches the project statuses available for a given workflow, useful before creating a workflow-based project. ```APIDOC ## GET /workflows/{workflowId}/projectstatuses ### Description Retrieves the project statuses associated with a specific workflow. ### Method GET ### Endpoint /api/v1/workflows/{workflowId}/projectstatuses ### Parameters #### Path Parameters - **workflowId** (string) - Required - The ID of the workflow. ``` -------------------------------- ### Invite a New User to a Workspace Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/users.mdx Use this endpoint to invite a new user to your awork workspace. Requires the workspace ID and role ID. ```sh curl -X POST https://api.awork.com/api/v1/invitations \ -H 'Content-Type: application/json' \ -d '{ "email": "carla.creative@ncnstn.com", "invitationFlow": "invite", "workspaceId": "123e4567-e89b-12d3-a456-426614174000", "roleId": "123e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Get Last Time Entry Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/v2/timetracking.mdx Retrieves the last time entry for a user. This can be used to check if a timer is currently running. ```APIDOC ## GET /v2/users/:userId/timeentries/last ### Description Retrieves the most recent time entry for a given user. A duration of 0 indicates that a timer is currently running. ### Method GET ### Endpoint /v2/users/:userId/timeentries/last ### Parameters #### Path Parameters - **userId** (string) - Required - The ID of the user whose last time entry to retrieve. ### Response #### Success Response (200) - **id** (string) - The ID of the time entry. - **userId** (string) - The ID of the user. - **typeOfWorkId** (string) - The ID of the type of work. - **projectId** (string) - The ID of the project. - **taskId** (string) - The ID of the task. - **startDate** (string) - The start date and time in UTC. - **endDate** (string) - The end date and time in UTC (null if timer is running). - **duration** (integer) - The duration in seconds (0 if timer is running). - **isDateOnly** (boolean) - Indicates if the time entry is date only. - **timezone** (string) - The timezone of the time entry. #### Response Example ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000", "startDate": "2024-05-14T10:00:00Z", "endDate": null, "duration": 0, "isDateOnly": false, "timezone": "Europe/Berlin" } ``` ``` -------------------------------- ### OAuth 2.0 Endpoints Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/authentication.mdx These endpoints are required to get an Access Token and exchange a Refresh Token for a new Access Token. ```APIDOC ## OAuth 2.0 Endpoints **Authorization:** `https://api.awork.com/api/v1/accounts/authorize` **Token:** `https://api.awork.com/api/v1/accounts/token` **Authorization Endpoint:** Used to request user authorization and initially retrieve an `Authorization Code`. **Token Endpoint:** Used to retrieve an `Access Token` from either an `Authorization Code` or a `Refresh Token`. ``` -------------------------------- ### Create Project From Template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Create a new project using a project template by specifying the `projectTemplateId` in the request body. ```shell curl -X POST "https://api.awork.com/api/v1/projects" \ -H "Content-Type: application/json" \ -d '{ "name": "My new project from a template", "projectTemplateId": "123e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Create Project from Template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Creates a new project using a specified project template. ```APIDOC ## POST /projects ### Description Creates a new project from a project template. ### Method POST ### Endpoint /api/v1/projects ### Parameters #### Request Body - **name** (string) - Required - The name of the project. - **projectTemplateId** (string) - Required - The ID of the project template to use. ``` -------------------------------- ### Create a project template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projecttemplates.mdx Creates a new project template with a specified name. ```APIDOC ## POST /api/v1/projecttemplates ### Description Creates a new project template. ### Method POST ### Endpoint /api/v1/projecttemplates ### Request Body - **name** (string) - Required - The name of the project template. ### Request Example ```json { "name": "Client Delivery Template" } ``` ``` -------------------------------- ### Get task details including custom fields Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/customfields.mdx Retrieves the details of a specific task, including any set custom field values. ```APIDOC ## GET /api/v1/tasks/{taskId} ### Description Retrieves the details of a task, including its custom field values. ### Method GET ### Endpoint /api/v1/tasks/{taskId} ### Parameters #### Path Parameters - **taskId** (string) - Required - The ID of the task to retrieve. ### Response #### Success Response (200) - **id** (string) - The ID of the task. - **baseType** (string) - The base type of the task. - **customFields** (array) - An array of custom field objects associated with the task. - **customFieldDefinitionId** (string) - The ID of the custom field definition. - **textValue** (string) - The text value of the custom field (if applicable). - **numberValue** (number) - The number value of the custom field (if applicable). - **dateValue** (string) - The date value of the custom field (if applicable). - **datetimeValue** (string) - The datetime value of the custom field (if applicable). - **selectValue** (string) - The select value of the custom field (if applicable). - **linkValue** (string) - The link value of the custom field (if applicable). - **booleanValue** (boolean) - The boolean value of the custom field (if applicable). - **userValue** (string) - The user ID value of the custom field (if applicable). ### Response Example ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "baseType": "projecttask", "customFields": [ { "customFieldDefinitionId": "123e4567-e89b-12d3-a456-426614174000", "textValue": "S1: Business Critical" } ] ... } ``` ``` -------------------------------- ### Create a Task Template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projecttemplates.mdx Define a new task template within a task bundle. This includes properties like name, description, priority, planned duration, and type of work. ```shell curl -X POST https://api.awork.com/api/v1/taskbundles/123e4567-e89b-12d3-a456-426614174000/tasktemplates \ -H 'Content-Type: application/json' \ -d '{ "name": "Create wireframe mockups", "description": "Design initial wireframes for the homepage", "isPrio": false, "plannedDuration": 14400, "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Publish awork Docs using Fern Source: https://github.com/awork-io/developer-docs/blob/main/README.md Execute this command to generate and publish the awork documentation to Fern. The --log-level debug flag provides verbose output. ```sh fern generate --docs --log-level debug ``` -------------------------------- ### Get Workflow Task Statuses Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Retrieve valid task statuses for a specific workflow. This is useful for understanding the available task states within that workflow. ```shell curl -X GET "https://api.awork.com/api/v1/workflows/223e4567-e89b-12d3-a456-426614174000/taskstatuses" ``` -------------------------------- ### Create Task List Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/psa-agentursoftware-integration.mdx Create a new task list within a project. This is part of setting up the project structure if a full project template is not used. ```sh curl -X POST "https://api.awork.com/api/v1/projects/{aworkProjectId}/tasklists" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{ "name": "Concept & Design" }' ``` -------------------------------- ### Get Workflow Project Statuses Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Fetch valid project statuses for a given workflow before creating a workflow-based project. This helps in selecting a correct `projectStatusId`. ```shell curl -X GET "https://api.awork.com/api/v1/workflows/223e4567-e89b-12d3-a456-426614174000/projectstatuses" ``` -------------------------------- ### Create a Task List Template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projecttemplates.mdx Add a task list template to an existing task bundle. The `name` and `order` fields are used to define the list's properties. ```shell curl -X POST https://api.awork.com/api/v1/taskbundles/123e4567-e89b-12d3-a456-426614174000/tasklisttemplates \ -H 'Content-Type: application/json' \ -d '{ "name": "Design", "order": 1 }' ``` -------------------------------- ### Get Current User Information Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/users.mdx Retrieve details about the currently authenticated user, including their workspace ID. This is useful for obtaining IDs needed for other API requests. ```sh curl -X GET https://api.awork.com/api/v1/users/me ``` ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "workspace": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "NCNSTN", "url": "https://ncnstn.awork.com" } } ``` -------------------------------- ### Create a Workflow Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/workflows.mdx Use this endpoint to create a new reusable workflow in your workspace. Specify the workflow's name and an optional icon. ```shell curl -X POST https://api.awork.com/api/v1/workflows \ -H 'Content-Type: application/json' \ -d '{ "name": "Client Delivery Workflow", "icon": "workflow" }' ``` -------------------------------- ### Create task list Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/psa-agentursoftware-integration.mdx This operation creates a new task list within a specified awork project. Task lists help organize tasks. ```APIDOC ## POST /api/v1/projects/{aworkProjectId}/tasklists ### Description Creates a new task list within a project. ### Method POST ### Endpoint https://api.awork.com/api/v1/projects/{aworkProjectId}/tasklists ### Parameters #### Path Parameters - **aworkProjectId** (string) - Required - The ID of the awork project. ### Request Body - **name** (string) - Required - The name of the task list. ### Request Example ```json { "name": "Concept & Design" } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created task list. ``` -------------------------------- ### Create Time Entry Manually Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/timetracking.mdx Create a time entry by specifying the start date and duration. The timezone, typeOfWorkId, and userId are required. Optionally, projectId and taskId can be provided. ```APIDOC ## POST /api/v1/timeentries ### Description Creates a new time entry. ### Method POST ### Endpoint /api/v1/timeentries ### Parameters #### Request Body - **timezone** (string) - Required - The user's timezone. - **userId** (string) - Required - The ID of the user for whom the time entry is created. - **typeOfWorkId** (string) - Required - The ID of the type of work. - **startDateUtc** (string) - Required - The start date and time of the time entry in UTC. - **duration** (integer) - Required - The duration of the time entry in seconds. - **projectId** (string) - Optional - The ID of the project. - **taskId** (string) - Optional - The ID of the task. ### Request Example ```json { "timezone": "Europe/Berlin", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000", "startDateUtc": "2024-05-14T10:00:00Z", "duration": 3600 } ``` ``` -------------------------------- ### Create project from template Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/psa-agentursoftware-integration.mdx This operation creates a new project in awork, optionally using a project template. It's used when a quotation is approved in the PSA. ```APIDOC ## POST /api/v1/projects ### Description Creates a new project in awork. ### Method POST ### Endpoint https://api.awork.com/api/v1/projects ### Request Body - **name** (string) - Required - The name of the project. - **companyId** (string) - Required - The ID of the company the project belongs to. - **projectTemplateId** (string) - Optional - The ID of the project template to use. - **isBillableByDefault** (boolean) - Optional - Whether the project is billable by default. ### Request Example ```json { "name": "Website Relaunch - ACME GmbH", "companyId": "11111111-2222-3333-4444-555555555555", "projectTemplateId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "isBillableByDefault": true } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created project. ``` -------------------------------- ### Create a New Task Bundle Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projecttemplates.mdx Create a new task bundle, which is a container for task and task list templates. The `name` field is the only required parameter. ```shell curl -X POST https://api.awork.com/api/v1/taskbundles \ -H 'Content-Type: application/json' \ -d '{ "name": "Website Launch", "description": "Complete task bundle for launching a new website", "icon": "rocket" }' ``` -------------------------------- ### Create a Project Task Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/tasks.mdx Use this endpoint to create a new project task. Ensure you provide all required fields such as name, baseType, typeOfWorkId, taskStatusId, and entityId. ```sh curl -X POST https://api.awork.com/api/v1/tasks \ -H 'Content-Type: application/json' \ -d '{ "name": "My first task", "baseType": "projecttask", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "taskStatusId": "123e4567-e89b-12d3-a456-426614174000", "entityId": "123e4567-e89b-12d3-a456-426614174000" }' ``` -------------------------------- ### Apply task bundle to project Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projecttemplates.mdx Applies a configured task bundle to a project, creating tasks and task lists based on the templates. ```APIDOC ## POST /api/v1/projects/{projectId}/addtaskbundle ### Description Applies a task bundle to a project, creating tasks and task lists. ### Method POST ### Endpoint /api/v1/projects/{projectId}/addtaskbundle ### Parameters #### Path Parameters - **projectId** (string) - Required - The ID of the project to apply the task bundle to. ### Request Body - **taskBundleId** (string) - Required - The ID of the task bundle to apply. ### Request Example ```json { "taskBundleId": "123e4567-e89b-12d3-a456-426614174000" } ``` ``` -------------------------------- ### Get Invoiceable Time Entries Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/psa-agentursoftware-integration.mdx Fetch time entries that are billable but not yet billed for a specific awork project. This data can be used to export entries for invoicing in the external PSA system. ```sh curl -X GET "https://api.awork.com/api/v1/projects/{aworkProjectId}/timeentries?filterby=isBillable%20eq%20true%20and%20isBilled%20eq%20false" \ -H "Authorization: Bearer {token}" ``` -------------------------------- ### Create Project with Workflow Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/projects.mdx Creates a new project and links it to a workflow. Optionally, a `projectStatusId` from that workflow can be provided. ```APIDOC ## POST /projects ### Description Creates a new project and links it to a workflow. ### Method POST ### Endpoint /api/v1/projects ### Parameters #### Request Body - **name** (string) - Required - The name of the project. - **workflowId** (string) - Optional - The ID of the workflow to link the project to. - **projectStatusId** (string) - Optional - The ID of the project status within the workflow. ``` -------------------------------- ### Get Last Time Entry for User Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/v2/timetracking.mdx Retrieve the last time entry for a given user. This is used to check if the timer is currently running. A duration of 0 indicates an active timer. ```curl curl -X GET https://api.awork.com/api/v2/users/123e4567-e89b-12d3-a456-426614174000/timeentries/last ``` -------------------------------- ### Create Time Entry Manually Source: https://github.com/awork-io/developer-docs/blob/main/fern/pages/api/v2/timetracking.mdx Creates a new time entry by specifying the start date and duration. Required fields include timezone, typeOfWorkId, and userId. Optionally, projectId and taskId can be provided. ```APIDOC ## POST /api/v2/timeentries ### Description Creates a new time entry. You can specify `startDate` and `duration`, or `startDate` and `endDate`. If both `duration` and `endDate` are provided, `endDate` takes precedence. ### Method POST ### Endpoint /api/v2/timeentries ### Parameters #### Request Body - **timezone** (string) - Required - The timezone for the time entry. - **userId** (string) - Required - The ID of the user for whom the time entry is created. - **typeOfWorkId** (string) - Required - The ID of the type of work. - **projectId** (string) - Optional - The ID of the project. - **taskId** (string) - Optional - The ID of the task. - **startDate** (string) - Required - The start date and time of the time entry in ISO 8601 format. - **endDate** (string) - Optional - The end date and time of the time entry in ISO 8601 format. - **duration** (integer) - Optional - The duration of the time entry in seconds. - **isDateOnly** (boolean) - Optional - Indicates if the time entry is date only. ### Request Example ```json { "timezone": "Europe/Berlin", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000", "startDate": "2024-05-14T10:00:00Z", "duration": 3600 } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created time entry. - **userId** (string) - The ID of the user. - **typeOfWorkId** (string) - The ID of the type of work. - **projectId** (string) - The ID of the project. - **taskId** (string) - The ID of the task. - **startDate** (string) - The start date and time in UTC. - **endDate** (string) - The end date and time in UTC. - **duration** (integer) - The duration in seconds. - **isDateOnly** (boolean) - Indicates if the time entry is date only. - **timezone** (string) - The timezone of the time entry. #### Response Example ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "userId": "123e4567-e89b-12d3-a456-426614174000", "typeOfWorkId": "123e4567-e89b-12d3-a456-426614174000", "projectId": "123e4567-e89b-12d3-a456-426614174000", "taskId": "123e4567-e89b-12d3-a456-426614174000", "startDate": "2024-05-14T10:00:00Z", "endDate": "2024-05-14T11:00:00Z", "duration": 3600, "isDateOnly": false, "timezone": "Europe/Berlin" } ``` ```