---
title: "Создать сделку из диалога"
method: POST
path: "/api/v1/crm/inbox/conversations/{id}/deals"
tags: ["CRM inbox"]
---

# Создать сделку из диалога

`POST /api/v1/crm/inbox/conversations/{id}/deals`

## Request

- Base URL: `https://erp.akeda.ru`
- URL: `https://erp.akeda.ru/api/v1/crm/inbox/conversations/{id}/deals`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://erp.akeda.ru/oauth2/authorize`, token URL `https://erp.akeda.ru/oauth2/token`, scopes: `akeda:delegate`)

Создаёт сделку на основе указанного диалога.

## Request body

- CRMInboxDealInput
  - `title` string, required
  - `pipeline_id` string, uuid, required
  - `stage_id` string, uuid, required
  - `amount` string: Сумма десятичной строкой: «19990.50». Разрядность берёт валюта (MONEY-ROUNDING.md)
  - `currency` string

## Response `201`

Связь диалога с созданной сделкой

- CRMInboxConversationLink
  - `id` string, uuid, required
  - `conversation_id` string, uuid, required
  - `entity_type` 'lead' | 'deal' | 'customer', required
  - `entity_id` string, uuid, required
  - `created_at` string, date-time, required

## Other responses

- `400`: Некорректный запрос или нарушение бизнес-правила
- `401`: Сессия, ключ или кабинет не подтверждены
- `403`: Текущая роль не имеет требуемого права
- `404`: Запись не найдена или не видима текущему пользователю

---

[API](https://skmtc.dev/akeda/apis/akeda-erp-client-api.md) · [All operations](https://skmtc.dev/akeda/apis/akeda-erp-client-api/llms.txt) · [OpenAPI document](https://skmtc.dev/akeda/apis/akeda-erp-client-api/revisions/a99574d597cc?raw)
