---
title: "Create Deal Endpoint"
method: POST
path: "/api/hubspot/deals"
tags: ["hubspot", "hubspot"]
---

# Create Deal Endpoint

`POST /api/hubspot/deals`

Crea un nuevo deal (negocio) en HubSpot y lo asocia al contacto especificado.

Implementa debounce de 30 segundos para prevenir creación de deals duplicados.

**🔒 Endpoint Protegido:** Requiere autenticación JWT y rol 'ui_hubspot', 'admin' o 'ui_citas'

## Request body

- CreateDealRequest — Modelo para crear un nuevo deal en HubSpot
  - `deal_name` string, required
  - `owner_id` string, required
  - `contact_id` string, required
  - `product_type` string
  - `phone` string, nullable
  - `city` string, nullable
  - `address` string, nullable
  - `zip_code` string, nullable
  - `visit_date` string, nullable
  - `close_date` string, nullable
  - `teleoperadora` string, nullable
  - `comercial_nombre` string, nullable
  - `hora_visita` string, nullable
  - `provincia_negocio` string, nullable

## Response `201`

Successful Response

- DealCreateResponse — Respuesta al crear un deal
  - `status` string, required
  - `deal_id` string, nullable
  - `message` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/hogarsolar/apis/hogarsolar-backend-api.md) · [All operations](https://skmtc.dev/hogarsolar/apis/hogarsolar-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hogarsolar/hogarsolar-backend-api/revisions/d9861e46bef8/schema)
