---
title: "Create Deal Link"
method: POST
path: "/api/prospecting/deals/{deal_id}/links"
tags: ["prospecting"]
---

# Create Deal Link

`POST /api/prospecting/deals/{deal_id}/links`

Attach a proposal / invoice / booking to a deal.

Promotes a fallback-matched ref to an explicit entity_links row, or
swaps in a different target. The kanban resolver picks the most-recent
linked entity, so creating a new link with the user's chosen target
automatically wins over older links of the same type. Removing stale
links is a separate DELETE endpoint.

## Query parameters

- `user_id` string, nullable
- `org_id` string, nullable

## Request body

- CreateDealLinkRequest — Attach a proposal / invoice / booking to a deal via entity_links. Used by the Linked section in DealDetailDialog to let operators confirm a fallback-matched ref or replace it with a different doc. `link_type` corresponds to the `entity_links.link_type` enum; `target_id` is the row id in proposals / invoices / bookings.
  - `link_type` string, required — proposal | invoice | booking
  - `target_id` string, required — Target entity id (proposal/invoice/booking row).
  - `title` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

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