# Create Task — Dart

> Creates a new task within a dartboard. See the documentation

- Key: `dart-create-task`
- Type: Action (Write)
- Version: 1.0.0
- App: Dart (`dart`) — https://pipedream.com/apps/dart.md
- This page (HTML): https://pipedream.com/apps/dart/actions/create-task
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/dart/actions/create-task/create-task.mjs

## Description

Creates a new task within a dartboard. [See the documentation](https://app.dartai.com/api/v0/public/docs/#/Task/createTask)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `title` | `string` | Yes | The title, which is a short description of what needs to be done |
| `parentId` | `string` | No | The universal, unique ID of the parent task. These tasks have a parent-child relationship where the current task is the child and this task ID corresponds to the parent. Subtasks inherit context from their parent and are typically smaller units of work Options are loaded from the connected account. |
| `dartboard` | `string` | No | The full title of the dartboard, which is a project or list of tasks Options are loaded from the connected account. |
| `type` | `string` | No | The title of the type of the task Options are loaded from the connected account. |
| `status` | `string` | No | The status from the list of available statuses Options are loaded from the connected account. |
| `description` | `string` | Yes | A longer description of the task, which can include markdown formatting |
| `assignees` | `string[]` | No | The names or emails of the users that the task is assigned to. Either this or assignee must be included, depending on whether the workspaces allows multiple assignees or not Options are loaded from the connected account. |
| `assignee` | `string` | No | The name or email of the user that the task is assigned to. Either this or assignees must be included, depending on whether the workspaces allows multiple assignees or not Options are loaded from the connected account. |
| `tags` | `string[]` | No | Any tags that should be applied to the task, which can be used to filter and search for tasks. Tags are also known as labels or components and are strings that can be anything, but should be short and descriptive Options are loaded from the connected account. |
| `priority` | `string` | No | The priority, which is a string that can be one of the specified options. This is used to sort tasks and determine which tasks should be done first Options are loaded from the connected account. |
| `startAt` | `string` | No | The start date, which is a date that the task should be started by in ISO format, like YYYY-MM-DD |
| `dueAt` | `string` | No | The due date for the task in ISO format, like YYYY-MM-DD |
| `size` | `string` | No | The size of the task Options are loaded from the connected account. |
| `customProperties` | `object` | No | The custom properties, which is an object of custom properties that are associated with the task |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "dart",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "dart-create-task",
  arguments: {
    title: "Title",
    parentId: "Parent Task ID",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "dart-create-task",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    dart: { authProvisionId: "apn_xxxxxxx" },
    title: "Title",
    parentId: "Parent Task ID",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "dart-create-task",
    "configured_props": {
      "dart": { "authProvisionId": "apn_xxxxxxx" },
      "title": "Title",
      "parentId": "Parent Task ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/dart.md · All apps: https://pipedream.com/apps
