---
title: "Create a new task"
method: POST
path: "/contracts/{contract_id}/tasks"
tags: ["Tasks"]
---

# Create a new task

`POST /contracts/{contract_id}/tasks`

## Request

- Base URL: `https://api.letsdeel.com/rest`
- URL: `https://api.letsdeel.com/rest/contracts/{contract_id}/tasks`
- Auth: HTTP bearer

Adds a new task to a contract. Use it to record new work; to change a task that already exists, use PATCH /tasks/{task_id}, and for a one-off payment that is not a task, use POST /contracts/{contract_id}/off-cycle-payments instead.

 **Token scopes**: `contracts:write`

## Path parameters

- `contract_id` string, required

## Request body

- object
  - `data` ContractsContractIdTasksPostRequestBodyContentApplicationJsonSchemaData, required
    - `amount` string, required: The amount to be associated with the task, in the appropriate currency.
    - `group_key` string, nullable: When provided, tasks sharing the same group_key within the same payment cycle are merged into a single aggregated line item on the invoice. The group_key is used as the invoice line item description. Requires is_auto_approved to be true.
    - `description` string, nullable, required: A description of the task.
    - `date_submitted` union, required: The date the task was submitted, in ISO 8601 format. Also accepts date-time (YYYY-MM-DDTHH:MM:SSZ).
      - string, date
      - string, date-time
    - `is_auto_approved` boolean: If true, the task will be automatically approved as part of the request. Required to be true when group_key is provided.
    - `hourly_report_preset_id` string, uuid, nullable: Id of an existing TRACKING preset.

## Response `201`

The task was successfully created.

- TasksCreateContractTaskResponse201
  - `data` ContractsContractIdTasksPostResponsesContentApplicationJsonSchemaData, required
    - `id` string, uuid: The unique identifier for the created task.
    - `status` 'approved' | 'declined' | 'new' | 'not_payable' | 'paid' | 'pending' | 'processing', nullable: The current status of the task.
    - `created` boolean: Indicates whether the task creation operation was successful.

## Other responses

- `400`: Bad request. Missing required fields or invalid data format.
- `401`: Unauthorized. Authentication credentials are missing or invalid.
- `403`: Operation failed.
- `404`: Operation failed.
- `500`: Internal server error. An unexpected error occurred while processing the request.

## Changes

- **2026-10-29** `d6919c567aec`: 1 breaking
  - the request property `data` became required
- **2026-10-28** `d33ed9070985`: 1 warning, 2 info
  - added the new `new` enum value to the `data/status/oneOf[subschema #1: ContractsContractIdTasksPostResponsesContentApplicationJsonSchemaDataStatus]/` response property for the response status `201`
  - added the new optional request property `data/group_key`
  - added the new optional request property `data/hourly_report_preset_id`

[Operation history](https://skmtc.dev/deel/apis/endpoints-2/changes/contracts/:contract_id/tasks/post.md)

---

[API](https://skmtc.dev/deel/apis/endpoints-2.md) - [All operations](https://skmtc.dev/deel/apis/endpoints-2/llms.txt) - [OpenAPI document](https://skmtc.dev/deel/apis/endpoints-2/revisions/b48979ae8a04?raw)
