# Create a task

Raises a task: title, an optional description, dueAt (RFC3339), priority, assigneeAccountId (the roster's account id), tags, and entityRef "<definitionKey>/<rowId>" to file it on a record. A task with a due TIME also lands on the assignee's calendar when their preferences mirror tasks. To book a meeting AND a task in one write, use post.calendar.events with createTask instead.

Access class: `workspace`.

## Endpoint

`POST /v1/tasks`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "assigneeAccountId": "",
    "assigneeUserId": 1,
    "description": "string",
    "dueAt": "string",
    "entityId": 1,
    "entityKind": "string",
    "entityRef": "string",
    "priority": "string",
    "tags": [
      "string"
    ],
    "taskType": "string",
    "title": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
