List Tasks
This endpoint returns a page of tasks for the authenticated account.
Endpoint
Section titled “Endpoint”GET /v1/tasks/tasksAuthentication
Section titled “Authentication”Include your API key in the x-api-key header. See Authentication.
Required Scope
Section titled “Required Scope”tasks:readQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
clientId | string | No | Return only tasks for this client. |
projectId | string | No | Return only tasks for this project. |
billingCategory | "billable" | "non-billable" | "not-assigned" | No | Filter by the task’s billing category. The values are lowercase. not-assigned matches tasks with a null category. Any other value applies no filter. |
archived | string | No | "true" returns only archived tasks. Any other value, or no value, returns only non-archived tasks. |
all | string | No | "true" returns all tasks, including archived and deleted tasks, and ignores archived. |
page | string | No | 0-based page index. Defaults to 0. |
pageSize | string | No | Number of items per page. Defaults to 25. |
sortCol | string | No | Sort column. One of taskName, taskDescription, createdAt, updatedAt, Client.client_name, Project.project_name, Project.EndCustomer.name. |
sortDir | string | No | Sort direction: asc or desc (not case-sensitive). |
The API uses sortCol and sortDir only when both are present and valid. Otherwise it ignores them without an error and sorts by updatedAt then createdAt, newest first. See Pagination for paging and sorting rules.
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl "https://api.crewsum.com/v1/tasks/tasks?projectId=project-mno123pqr4567890&page=0&pageSize=25" \ -H "x-api-key: $CREWSUM_API_KEY"const response = await fetch( "https://api.crewsum.com/v1/tasks/tasks?projectId=project-mno123pqr4567890&page=0&pageSize=25", { headers: { "x-api-key": process.env.CREWSUM_API_KEY }, },);const result = await response.json();GET /v1/tasks/tasks?projectId=project-mno123pqr4567890&page=0&pageSize=25 HTTP/1.1Host: api.crewsum.comx-api-key: <your-api-key>Response
Section titled “Response”On success, the API returns HTTP 200 OK.
Example Response
Section titled “Example Response”{ "message": "Successfully fetched tasks", "data": { "tasks": [ { "id": "task-pqr123stu4567890", "name": "Task Name", "description": "A brief description of the task", "isArchived": false, "createdAt": "2026-01-05T15:45:00.000Z", "updatedAt": null, "clientId": "client-ghi123jkl4567890", "projectId": "project-mno123pqr4567890", "clientName": "Client Name", "projectName": "Project Name", "isDeleted": false, "clientDeleted": false, "projectDeleted": false, "isDefault": false, "autoAssign": true, "projectEndCustomer": "End Customer Name", "billingCategory": "BILLABLE", "isAvailableForNewSelection": true, "submittedHours": 16 } ], "count": 1 }}Behavior
Section titled “Behavior”countis the total number of matching tasks across all pages.- Deleted tasks are returned only when
allis"true". - List items have the same fields as Get Task, plus
isAvailableForNewSelection. isAvailableForNewSelectionistruewhen the task can be used for new assignments or time entries. A task is available when it is not archived or deleted. A project’s default task is available only while the project has no active non-default tasks.billingCategoryis the parent project’s category when the project has one. ThebillingCategoryfilter uses the category stored on the task.clientDeletedandprojectDeletedare currently alwaysfalse.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
500 | Crewsum could not fetch tasks. The message is Error fetching tasks. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks”This endpoint does not trigger a webhook.