---
title: "Task"
url: "https://rolebase.io/en/api/task"
---

[Rolebase](/) ⟩ [API Reference](/en/api)

 API Reference

# `task`

Represents a task or to-do item in Rolebase. Tasks are associated with circles, can be assigned to members, and support tracking progress with statuses and due dates.

## Fields

Field

Type

Description

`id`

`uuid`

Unique identifier for the task (auto-generated)

`orgId`

`uuid`

Reference to the organization this task belongs to

`circleId`

`uuid`

Reference to the circle this task is associated with

`memberId`

`uuid`

Reference to the assigned member (optional)

`title`

`String`

Title of the task

`description`

`String`

Detailed description of the task

`status`

`Task_Status_Enum`

Current status: Open, InProgress, InReview, Blocked, or Done

`dueDate`

`Timestamp`

When the task is due (optional)

`createdAt`

`Timestamp`

When the task was created (defaults to current timestamp)

`archived`

`Boolean`

Whether the task is archived (defaults to false)

`private`

`Boolean`

Whether the task is private (defaults to false)

## Task Status

The `status` field accepts the following enum values:

*   **Open** — Task is open and active
*   **InProgress** — Task is currently being worked on
*   **InReview** — Task is under review
*   **Blocked** — Task is blocked by another task or issue
*   **Done** — Task has been completed

## Relationships

### Object Relationships

*   `org` — The organization this task belongs to
*   `circle` — The circle this task is associated with
*   `member` — The member assigned to this task (if any)

### Array Relationships

*   `logs` — Activity logs tracking changes to this task

## Query Examples

### List Tasks for an Organization

```
query GetTasks($orgId: uuid!) {
  task(where: { orgId: { _eq: $orgId } }) {
    id
    title
    description
    status
    dueDate
    circle {
      role {
        name
      }
    }
    member {
      name
    }
    logs {
      createdAt
      display
      changes
    }
  }
}
```

### Get a Specific Task

```
query GetTask($id: uuid!) {
  task_by_pk(id: $id) {
    id
    title
    description
    status
    dueDate
    circle {
      role {
        name
      }
    }
    member {
      name
    }
  }
}
```

## Mutation Examples

### Create a Task

```
mutation CreateTask {
  insert_task_one(
    object: {
      orgId: "your-org-id"
      circleId: "circle-id"
      title: "Implement new feature"
      description: "Add user authentication to the app"
      status: Open
      dueDate: "2024-01-15T00:00:00Z"
      memberId: "assigned-member-id"
    }
  ) {
    id
    title
    status
  }
}
```

### Update a Task

```
mutation UpdateTask {
  update_task_by_pk(
    pk_columns: { id: "task-id" }
    _set: { status: InProgress, description: "Updated task description" }
  ) {
    id
    status
    description
  }
}
```

## Permissions

Task access is controlled by several factors:

*   **Circle membership** — Circle participants can access their circle’s tasks
*   **Privacy settings** — Private tasks are only visible to assigned members and circle participants
*   **Organization role** — Organization members can access non-private tasks
*   **Assignment** — Assigned members always have access to their tasks

Tasks can be organized into custom views using the [task\_view](/en/api/task_view) entity. Activity logs automatically track changes to task status and assignments.
