> ## Documentation Index
> Fetch the complete documentation index at: https://visaflo.ca/knowledge-base/llms.txt
> Use this file to discover all available pages before exploring further.

# Tasks, Notes, and Workflows

> Use VisaFlo API tasks, notes, and workflow templates to turn inbound activity into work.

## Tasks

Tasks attach to exactly one `case`, `client`, or `lead`. VisaFlo inherits assignees from the linked record.

### Create a Task

`POST /api/public/task/create`

```json theme={null}
{
  "title": "Call the client back",
  "description": "Confirm documents received from intake form.",
  "priority": "high",
  "status": "open",
  "dueDate": "2026-05-01",
  "entity": {
    "type": "case",
    "id": "VFLO_CASE_ID"
  },
  "reminderSettings": ["1_day_before", "on_due_date"]
}
```

| Field              | Values                                                                                                                           |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `priority`         | `low`, `medium`, `high`, `urgent`                                                                                                |
| `status`           | `open`, `in_progress`, `completed`                                                                                               |
| `dueDate`          | Optional `YYYY-MM-DD` date.                                                                                                      |
| `reminderSettings` | Optional array: `on_due_date`, `1_day_before` through `6_days_before`, or `1_week_before`. A due date is required for reminders. |

### Read and Update Tasks

| Method  | Endpoint                   | Purpose                                                                         |
| ------- | -------------------------- | ------------------------------------------------------------------------------- |
| `GET`   | `/api/public/task/list`    | List tasks, optionally filtered by entity, status, priority, or due-date range. |
| `GET`   | `/api/public/task/:taskId` | Get one task.                                                                   |
| `PATCH` | `/api/public/task/:taskId` | Update title, description, priority, status, due date, entity, or reminders.    |

To clear a due date, send `"dueDate": null` or an empty string in the update body. To clear reminders, send an empty `reminderSettings` array.

## Workflow Templates

Use a workflow when an event should create a predictable set of tasks.

1. Call `GET /api/public/workflow/list`.
2. Store the selected workflow ID in your integration configuration.
3. Call `POST /api/public/task/create-from-workflow` when the linked entity reaches the trigger point.

```json theme={null}
{
  "workflowId": "VFLO_WORKFLOW_ID",
  "entity": {
    "type": "case",
    "id": "VFLO_CASE_ID"
  }
}
```

## Notes

Use notes to preserve context from an external system or webhook.

| Method  | Endpoint                                         | Purpose                                |
| ------- | ------------------------------------------------ | -------------------------------------- |
| `POST`  | `/api/public/note/create`                        | Add a note to a case, client, or lead. |
| `GET`   | `/api/public/note/list`                          | List notes for an entity.              |
| `GET`   | `/api/public/note/:entityType/:entityId/:noteId` | Read one note.                         |
| `PATCH` | `/api/public/note/:entityType/:entityId/:noteId` | Update note content or title.          |

For a lead or client, send `content`. For a case note, VisaFlo maps `content` to the case note's `description` when `description` is not sent.
