# Task Endpoints {#task-endpoints}


API endpoints for task management, statuses, priorities, and related features.


## Tasks {#tasks}



### List Tasks {#list-tasks}


```http
GET /api/tasks?take=20&skip=0&relations[]=project&relations[]=creator
Authorization: Bearer {token}
```

**Response (200 OK):**

```json
{
  "items": [
    {
      "id": "...",
      "title": "Implement user dashboard",
      "description": "Create the main dashboard view",
      "number": 42,
      "prefix": "PROJ",
      "status": "IN_PROGRESS",
      "priority": "HIGH",
      "size": "MEDIUM",
      "estimate": 28800,
      "dueDate": "2024-02-01T00:00:00.000Z",
      "projectId": "...",
      "organizationId": "...",
      "creator": { "id": "...", "name": "John Doe" },
      "tags": [{ "name": "Frontend" }],
      "taskStatusId": "...",
      "taskPriorityId": "...",
      "taskSizeId": "..."
    }
  ],
  "total": 150
}
```


### Get Task by ID {#get-task-by-id}


```http
GET /api/tasks/{id}?relations[]=members&relations[]=teams
Authorization: Bearer {token}
```


### Create Task {#create-task}


```http
POST /api/tasks
Authorization: Bearer {token}
Content-Type: application/json

{
  "title": "New Feature Task",
  "description": "Implement the new feature",
  "status": "TODO",
  "priority": "MEDIUM",
  "size": "LARGE",
  "estimate": 57600,
  "dueDate": "2024-02-15",
  "projectId": "project-uuid",
  "organizationId": "org-uuid",
  "members": [{ "id": "employee-uuid" }],
  "tags": [{ "id": "tag-uuid" }]
}
```


### Update Task {#update-task}


```http
PUT /api/tasks/{id}
Authorization: Bearer {token}
Content-Type: application/json

{
  "title": "Updated Task Title",
  "status": "IN_PROGRESS",
  "priority": "HIGH"
}
```


### Delete Task {#delete-task}


```http
DELETE /api/tasks/{id}
Authorization: Bearer {token}
```


## Task Statuses {#task-statuses}



### List Statuses {#list-statuses}


```http
GET /api/tasks/statuses?where[projectId]={project-id}
Authorization: Bearer {token}
```

**Default Statuses:** `OPEN`, `IN_PROGRESS`, `READY_FOR_REVIEW`, `IN_REVIEW`, `BLOCKED`, `DONE`


### Create Custom Status {#create-custom-status}


```http
POST /api/tasks/statuses
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "QA Testing",
  "value": "qa-testing",
  "icon": "checkmark-circle-outline",
  "color": "#FFA500",
  "order": 5,
  "projectId": "project-uuid",
  "organizationId": "org-uuid"
}
```


## Task Priorities {#task-priorities}



### List Priorities {#list-priorities}


```http
GET /api/tasks/priorities
Authorization: Bearer {token}
```

**Default Priorities:** `URGENT`, `HIGH`, `MEDIUM`, `LOW`


### Create Custom Priority {#create-custom-priority}


```http
POST /api/tasks/priorities
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Critical",
  "value": "critical",
  "icon": "alert-triangle-outline",
  "color": "#FF0000",
  "organizationId": "org-uuid"
}
```


## Task Sizes {#task-sizes}



### List Sizes {#list-sizes}


```http
GET /api/tasks/sizes
Authorization: Bearer {token}
```

**Default Sizes:** `X_LARGE`, `LARGE`, `MEDIUM`, `SMALL`, `TINY`


## Issue Types {#issue-types}



### List Issue Types {#list-issue-types}


```http
GET /api/tasks/issue-types
Authorization: Bearer {token}
```

**Default Types:** `BUG`, `STORY`, `TASK`, `EPIC`


## Task Views {#task-views}



### Daily Board View {#daily-board-view}


```http
GET /api/tasks/daily?date=2024-01-15&employeeId={id}
Authorization: Bearer {token}
```


### Team Tasks {#team-tasks}


```http
GET /api/tasks/team?where[organizationTeamId]={team-id}
Authorization: Bearer {token}
```


### My Tasks {#my-tasks}


```http
GET /api/tasks/employee/{employee-id}
Authorization: Bearer {token}
```


## Sprint Management {#sprint-management}



### List Sprints {#list-sprints}


```http
GET /api/organization-sprint?where[projectId]={project-id}
Authorization: Bearer {token}
```


### Create Sprint {#create-sprint}


```http
POST /api/organization-sprint
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Sprint 1",
  "projectId": "project-uuid",
  "startDate": "2024-01-15",
  "endDate": "2024-01-29",
  "goal": "Complete dashboard features",
  "organizationId": "org-uuid"
}
```


## Goals & KPIs {#goals--kpis}



### List Goals {#list-goals}


```http
GET /api/goals
Authorization: Bearer {token}
```


### Create Goal {#create-goal}


```http
POST /api/goals
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Q1 Revenue Target",
  "deadline": "END_OF_QUARTER",
  "level": "ORGANIZATION",
  "organizationId": "org-uuid"
}
```


### Key Results {#key-results}


```http
GET /api/key-results?where[goalId]={goal-id}
Authorization: Bearer {token}
```


## Related Pages {#related-pages}


- [Project Endpoints](https://sourcey-gauzy.pages.dev/api/project-endpoints/index.md) — project management API
- [API Overview](https://sourcey-gauzy.pages.dev/api/overview/index.md) — general API information
