---
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`

## Request

- Base URL: `https://api.agendor.com.br/v3`
- URL: `https://api.agendor.com.br/v3/deals/{deal_id}/tasks`
- Auth: API key in header `Authorization`

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
      - `currency` object: Currency this deal is denominated in. Null means BRL.
        - `id` integer: Currency ID.
        - `isoCode` string: ISO 4217 currency code (e.g. USD).
        - `name` string: Currency name.
        - `symbol` string: Currency symbol (e.g. $).
      - `exchangeRate` number, float: Exchange rate to BRL currently applied to this deal. Null when the deal is in BRL.
      - `exchangeRateSource` 'deal' | 'closed' | 'account': Where the applied exchange rate comes from: 'deal' (manual override), 'closed' (frozen when the deal was won/lost) or 'account' (current account rate). Null when the deal is in BRL.
      - `valueInBrl` number, float: Monetary value converted to BRL. Equal to value when the deal is in BRL.
    - `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.
    - `audioTranscription` object: VoIP transcription. Included when available and includeVoip=true.
      - `id` integer: Audio transcription ID.
      - `content` string: Audio transcription content. May be null.
      - `liked` boolean: Whether the user liked the transcription. Null when no rating was provided.
      - `feedback` string: User feedback. May be null.
    - `audioSummary` object: VoIP summary. Present only with includeVoip=true and when available.
      - `id` integer: Audio summary ID.
      - `content` string: Audio summary content. May be null.
      - `liked` boolean: Whether the user liked the summary. Null when no rating was provided.
      - `feedback` string: User feedback. May be null.
      - `audioTranscriptionId` integer: ID of the transcription used to produce this summary.

---

[API](https://skmtc.dev/agendor/apis/agendor-api.md) - [All operations](https://skmtc.dev/agendor/apis/agendor-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agendor/apis/agendor-api/revisions/86c250dbf468?raw)
