---
title: "POST /deals/{deal_id}/tasks"
method: POST
path: "/deals/{deal_id}/tasks"
tags: ["tasks"]
---

# POST /deals/{deal_id}/tasks

`POST /deals/{deal_id}/tasks`

Create a new task related to this deal.

## Path parameters

- `deal_id` integer, required

## Request body

- PostDealsDealIdTasks — Create a new task related to this deal.
  - `text` string, required — Text content of this task.
  - `assigned_users` integer[] — Array of IDs of users assigned to this task.
  - `due_date` string, date-time — When this task is due.
  - `finished_date` string, date-time — When this date was finished.
  - `finished_by` integer — ID of user who finished this task.
  - `type` 'VISITA' | 'REUNIAO' | 'LIGACAO' | 'EMAIL' | 'PROPOSTA' | 'WHATSAPP' — Task type.
  - `metrics` integer[] — Array of metric IDs to associated with this task.

## Response `201`

Created

- object
  - `data` TaskEntity
    - `id` integer — Task ID.
    - `accountId` integer — Account ID.
    - `user` object — User that created this task.
      - `accountId` integer — Account ID.
      - `id` integer — User ID.
      - `name` string — User name.
    - `text` string — Text content.
    - `organization` object — Related organization.
      - `id` string — Organization ID.
      - `name` string — Display name (Nome fantasia).
      - `email` string — Contact email.
    - `person` object — Related person.
      - `id` integer — Person ID.
      - `name` string — Person name.
      - `email` string, email — Email address.
    - `deal` object — Related deal.
      - `id` string
      - `title` string
    - `dueDate` unknown
    - `finishedAt` unknown
    - `finishedBy` object — User who finished this task.
      - `accountId` integer — Account ID.
      - `id` integer — User ID.
      - `name` string — User name.
    - `createdAt` unknown
    - `updatedAt` unknown
    - `assignedUsers` LeanUserEntity[] — Users assigned to this task
      - `accountId` integer — Account ID.
      - `id` integer — User ID.
      - `name` string — User name.
    - `metrics` ActivityMetricEntity[] — Metrics associated with this task.
      - `id` integer — Metric ID.
      - `name` string — Metric name.
      - `value` number — Metric value.
    - `type` string — Task type.
    - `_webUrl` string — Web platform URL.

---

[API](https://skmtc.net/agendor/apis/agendor-api.md) · [All operations](https://skmtc.net/agendor/apis/agendor-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agendor/agendor-api/revisions/965855d16b06/schema)
