---
title: "POST /organizations/{organization_id}/deals"
method: POST
path: "/organizations/{organization_id}/deals"
tags: ["deals"]
---

# POST /organizations/{organization_id}/deals

`POST /organizations/{organization_id}/deals`

## Request

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

Create a new deal for organization.

## Path parameters

- `organization_id` integer, required

## Request body

- PostOrganizationsOrganizationIdDeals: Create a new deal for organization.
  - `title` string, required: Title to identify this deal.
  - `dealStatusText` 'ongoing' | 'won' | 'lost': Deal status name.
  - `description` string: Your own description for this deal.
  - `endTime` string, date-time: When this deal was finished.
  - `products_entities` object[]
    - `id` integer, required: Product id.
    - `unitValue` number, float: Product value.
    - `discount` number, float: Product value.
    - `quantity` number, float: Product value.
  - `products` string[]
  - `ranking` 0 | 1 | 2 | 3 | 4 | 5: Ranking displayed as stars in deal page.
  - `startTime` string, date-time: When this deal started.
  - `author` integer: User ID of the author of this deal.
  - `ownerUser` integer: Owner user ID or email.
  - `funnel` integer: Funnel ID.
  - `dealStage` integer: Deal stage sequence number.
  - `value` number, float: Monetary value of this deal.
  - `currency` string: ISO 4217 code of an active currency for this account (e.g. USD). Omit for BRL.
  - `exchangeRate` number, float: Exchange rate override for this deal. Only accepted when currency is set to a non-BRL currency that allows manual rate override, with a value greater than 0.
  - `allowedUsers` integer[]: Array of IDs of users that should be able to see this deal.
  - `allowToAllUsers` true: Set true if this deal should be visible to all users.
  - `customFields` object: Custom Fields information. A key-value map where each key is the identifier (name) of a custom field and the value is the desired content. Example: { "customFields": { "custom_field_identifier_1" : "desired value", "custom_field_identifier_2" : "desired value 2" } }
  - `checkRequiredFields` boolean: Check if required fields are filled when changing the deal stage or status.

## Response `201`

Created

- object
  - `data` FullDealEntity
    - `id` integer: Deal ID.
    - `parentDealId` integer: Parent deal ID.
    - `title` string: Deal title.
    - `accountId` integer: Account ID.
    - `startTime` unknown
    - `endTime` unknown
    - `wonAt` unknown
    - `lostAt` unknown
    - `organization` object: Related organization info.
      - `id` integer: Organization ID.
      - `accountId` integer: Account ID.
      - `name` string: Display name (Nome fantasia).
      - `legalName` string: Legal name (Razão social).
      - `email` string, email: Contact email.
      - `cnpj` string: Document number (CNPJ).
      - `description` string: Organization description.
      - `logo` object: Logo image URLs.
        - `full` string, url: Full sized logo image URL.
        - `thumb` string, url: Thumb sized logo image URL.
        - `thumb_large` string, url: Large thumb sized logo image URL.
      - `ranking` 0 | 1 | 2 | 3 | 4 | 5: Numeric ranking.
      - `website` string, url: Homepage URL.
      - `createdAt` unknown
      - `updatedAt` unknown
      - `products` ProductEntity[]: Associated products.
        - `id` integer: Product ID.
        - `name` string: Product name.
        - `code` string: Product code.
        - `categoryId` integer: Product category id.
        - `price` number, double: Product price.
        - `unit` string: Product unit.
        - `active` boolean: Product active.
        - `imageUrl` string: Product image URL.
        - `imageThumbUrl` string: Product image thumbnail URL.
        - `createdAt` unknown
        - `customFields` unknown
        - `description` string: Product description (HTML).
      - `contact` object: Contact information.
        - `email` string, email: Email address.
        - `work` string: Formatted work phone number.
        - `mobile` string: Formatted mobile phone number.
        - `fax` string: Formatted fax number.
        - `ramal` string: Phone line branch number.
        - `radio` string: Radio phone number.
        - `whatsapp` string: WhatsApp phone number.
        - `facebook` string, url: Facebook profile URL.
        - `twitter` string, url: Twitter profile URL.
        - `linkedIn` string, url: LinkedIn profile URL.
        - `skype` string: Skype username.
        - `instagram` string, url: Instagram profile URL.
      - `address` object: Address information.
        - `country` string: Country name.
        - `district` string: District (city subdivision) name.
        - `streetName` string: Street name.
        - `streetNumber` integer: Building number.
        - `additionalInfo` string: Additional address info.
        - `postalCode` string: Postal code (CEP).
        - `state` 'AC' | 'AL' | 'AP' | 'AM' | 'BA' | 'CE' | 'DF' | 'ES' | 'GO' | 'MA' | 'MT' | 'MS' | 'MG' | 'PA' | 'PB' | 'PR' | 'PE' | 'PI' | 'RJ' | 'RN' | 'RS' | 'RO' | 'RR' | 'SC' | 'SP' | 'SE' | 'TO': State abbreviation.
        - `city` string: City name.
      - `category` object: Associated category.
        - `id` integer: Category ID.
        - `name` string: Category name.
      - `leadOrigin` object: Associated lead origin.
        - `id` integer: Lead origin ID.
        - `name` string: Lead origin name.
      - `sector` object: Associated sector.
        - `id` integer: Sector ID.
        - `name` string: Sector name.
      - `people` LeanPersonEntity[]: First page of people in this organization.
        - `id` integer: Person ID.
        - `name` string: Person name.
        - `email` string, email: Email address.
      - `author` object: User that created this organization.
        - `accountId` integer: Account ID.
        - `id` integer: User ID.
        - `name` string: User name.
      - `ownerUser` object: User that currently owns this organization.
        - `accountId` integer: Account ID.
        - `id` integer: User ID.
        - `name` string: User name.
      - `allowedUsers` LeanUserEntity[]: Users allowed to view this organization.
        - `accountId` integer: Account ID.
        - `id` integer: User ID.
        - `name` string: User name.
      - `customFields` object: Custom fields.
      - `_webUrl` string, url: Web platform URL.
    - `person` object: Related person info.
      - `id` integer: Person ID.
      - `accountId` integer: Account ID.
      - `name` string: Person's name.
      - `email` string: Contact email.
      - `organization` object: Related organization info.
        - `id` string: Organization ID.
        - `name` string: Display name (Nome fantasia).
        - `email` string: Contact email.
      - `cpf` string: Document number (CPF).
      - `role` string: Person's role in organization.
      - `ranking` 0 | 1 | 2 | 3 | 4 | 5: Numeric ranking.
      - `description` string: Person description.
      - `birthday` string: Person's birthdate.
      - `avatar` string, url: Avatar image URL.
      - `createdAt` unknown
      - `updatedAt` unknown
      - `products` ProductEntity[]: Associated products.
        - `id` integer: Product ID.
        - `name` string: Product name.
        - `code` string: Product code.
        - `categoryId` integer: Product category id.
        - `price` number, double: Product price.
        - `unit` string: Product unit.
        - `active` boolean: Product active.
        - `imageUrl` string: Product image URL.
        - `imageThumbUrl` string: Product image thumbnail URL.
        - `createdAt` unknown
        - `customFields` unknown
        - `description` string: Product description (HTML).
      - `contact` object: Contact information.
        - `email` string, email: Email address.
        - `work` string: Formatted work phone number.
        - `mobile` string: Formatted mobile phone number.
        - `fax` string: Formatted fax number.
        - `ramal` string: Phone line branch number.
        - `radio` string: Radio phone number.
        - `whatsapp` string: WhatsApp phone number.
        - `facebook` string, url: Facebook profile URL.
        - `twitter` string, url: Twitter profile URL.
        - `linkedIn` string, url: LinkedIn profile URL.
        - `skype` string: Skype username.
        - `instagram` string, url: Instagram profile URL.
      - `address` object: Address information.
        - `country` string: Country name.
        - `district` string: District (city subdivision) name.
        - `streetName` string: Street name.
        - `streetNumber` integer: Building number.
        - `additionalInfo` string: Additional address info.
        - `postalCode` string: Postal code (CEP).
        - `state` 'AC' | 'AL' | 'AP' | 'AM' | 'BA' | 'CE' | 'DF' | 'ES' | 'GO' | 'MA' | 'MT' | 'MS' | 'MG' | 'PA' | 'PB' | 'PR' | 'PE' | 'PI' | 'RJ' | 'RN' | 'RS' | 'RO' | 'RR' | 'SC' | 'SP' | 'SE' | 'TO': State abbreviation.
        - `city` string: City name.
      - `category` object: Associated category.
        - `id` integer: Category ID.
        - `name` string: Category name.
      - `leadOrigin` object: Associated lead origin.
        - `id` integer: Lead origin ID.
        - `name` string: Lead origin name.
      - `author` object: User that created this organization.
        - `accountId` integer: Account ID.
        - `id` integer: User ID.
        - `name` string: User name.
      - `ownerUser` object: User that currently owns this organization.
        - `accountId` integer: Account ID.
        - `id` integer: User ID.
        - `name` string: User name.
      - `allowedUsers` LeanUserEntity[]: Users allowed to view this organization.
        - `accountId` integer: Account ID.
        - `id` integer: User ID.
        - `name` string: User name.
      - `customFields` object: Custom fields.
      - `_webUrl` string, url: Web platform URL.
    - `author` object: User that created this deal.
      - `accountId` integer: Account ID.
      - `id` integer: User ID.
      - `name` string: User name.
    - `dealStage` object: Stage that this deal is currently in.
      - `id` integer: Deal stage ID.
      - `name` string: Deal stage name.
      - `sequence` integer: Sequence number.
      - `funnel` object: Related funnel info.
        - `id` integer: Funnel ID.
        - `name` string: Funnel name.
    - `dealStatus` object: Status that this deal is in.
      - `id` 1 | 2 | 3: Deal status ID.
      - `name` 'Em andamento' | 'Ganho' | 'Perdido': Deal status name
    - `lossReason` object: Deal's loss reason information.
      - `id` integer: Loss reason ID.
      - `name` string: Loss reason name.
      - `description` string: Specific description of this deal's loss reason.
    - `owner` object: User that currently owns this deal.
      - `accountId` integer: Account ID.
      - `id` integer: User ID.
      - `name` string: User name.
    - `description` string: Deal description.
    - `createdAt` unknown
    - `updatedAt` unknown
    - `ranking` 0 | 1 | 2 | 3 | 4 | 5: Numeric ranking.
    - `value` number, float: Monetary value.
    - `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.
    - `products_entities` EntityProductEntity[]: Associated products.
      - `id` integer: Product ID.
      - `createdAt` unknown
      - `unitValue` number, double: Product creation date.
      - `quantity` number, double: Product creation date.
      - `discount` number, double: Product creation date.
      - `totalValue` number, double: Product creation date.
    - `products` string[]: Associated products ids.
    - `allowedUsers` LeanUserEntity[]: Users allowed to view this deal.
      - `accountId` integer: Account ID.
      - `id` integer: User ID.
      - `name` string: User name.
    - `_email` string: Email address to which you can send a copy of emails to register them as tasks in this deal. Visit [this article]( https://ajuda.agendor.com.br/pt-BR/funcionalidades/como-gravar-e-mails-nos-historicos-do-agendor ) for more information.
    - `customFields` object: Custom fields.
    - `frozen` boolean: Whether this deal is currently frozen.
    - `freezing` object: Freeze details, present only when the deal is frozen; null otherwise.
      - `frozenAt` unknown
      - `unfreezeAt` unknown
      - `description` string: Reason description provided when freezing the deal.
      - `reason` string: Name of the freeze reason.
    - `_webUrl` string: Web platform URL.

---

[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)
