Tasks / Create Task
**Create Task** Creates a new task in the NIZU Cloud workspace. --- ### Authentication This endpoint requires a valid client token. - Send the **token** using the existing collection/auth se
Body parameters
module
|
string |
Example: tasks
|
data
|
array |
Example:
|
**Create Task**
Creates a new task in the NIZU Cloud workspace.
---
### Authentication
This endpoint requires a valid client token.
- Send the **token** using the existing collection/auth setup (e.g. `a3eec190332cscd1cg5ac30a64834f4c`).
- Make sure the active environment provides [https://api.nizu.dev/v2/](https://api.nizu.dev/v2/) and authentication variables.
---
### HTTP Request
- **Method:** `POST`
- **URL:** [https://api.nizu.dev/v2/](https://api.nizu.dev/v2/)
- **Body type:** `raw` JSON
---
### Request Body
The payload must contain a top-level `module` and a `data` array of field/value pairs.
``` json
{
"module": "tasks",
"data": [
{ "field": "title", "value": "My Task" },
{ "field": "description", "value": "My Long Description of a task in html
..." },
{ "field": "project_id", "value": "0" },
{ "field": "milestone_id", "value": "0" },
{ "field": "assigned_to", "value": "2" },
{ "field": "deadline", "value": "2024-02-14 16:35:39" },
{ "field": "labels", "value": "" },
{ "field": "points", "value": "1" },
{ "field": "status", "value": "to_do" },
{ "field": "status_id", "value": "1" }
]
}
```
#### Fields
- `module` (string, required) – must be set to `"tasks"`.
- `data` (array, required) – list of objects with:
- `field` (string) – logical field name (e.g. `title`, `description`, `project_id`, `assigned_to`, `deadline`, `status`).
- `value` (string) – value for the corresponding field.
**Notes**
- `deadline` should be a date-time string in the format `YYYY-MM-DD HH:MM:SS`.
- `project_id`, `milestone_id`, `assigned_to`, `status_id`, and `points` are numeric identifiers serialized as strings.
- `labels` can contain comma-separated labels; leave empty string (`""`) if not used.
- status can be: **`'to_do','in_progress','done','awaiting_for_feedback','testing'`**
- context can be: `'project','client','lead','invoice','estimate','order','contract','proposal','subscription','ticket','expense','general'`
---
### Responses
- **200 OK / 201 Created** – Task successfully created.
- The response body typically contains the created task record and/or an acknowledgment.
- **4xx** – Client or validation error (for example, missing/invalid `module`, malformed `data`, or missing auth token).
- **5xx** – Server error while processing the task creation.
Use the existing test `"Successful POST request"` in this request to quickly verify that a `200` or `201` response was returned.