---
title: "Vinculando entidades"
method: POST
path: "/api/v4/{entity}/{entity_id}/link"
---

# Vinculando entidades

`POST /api/v4/{entity}/{entity_id}/link`

## Request

- Base URL: `https://subdomain.kommo.com`
- URL: `https://subdomain.kommo.com/api/v4/{entity}/{entity_id}/link`
- Auth: OAuth 2

Este método permite vincular entidades a um negócio, contato ou empresa.

## Path parameters

- `entity` 'leads' | 'contacts' | 'companies', required
- `entity_id` integer, required

## Headers

- `Content-Type` string

## Request body

- object
  - `RAW_BODY` object[]
    - `to_entity_id` integer, required: ID da entidade vinculada
    - `to_entity_type` 'leads' | 'contacts' | 'companies' | 'catalog_elements', required: Tipo de entidade vinculada (leads, contacts, companies, catalog_elements)
    - `metadata` object: Metadados da entidade vinculada
      - `catalog_id` integer: ID da lista
      - `quantity` integer: Quantidade de elementos da lista vinculados
      - `is_main` boolean: Define se o contato é principal para a entidade
      - `updated_by` integer: ID do usuário que está realizando o vínculo

## Response `200`

200

## Other responses

- `400`: 400
- `401`: 401
- `403`: 403

---

[API](https://skmtc.dev/kommo/apis/referencias-de-api-da-kommo.md) - [All operations](https://skmtc.dev/kommo/apis/referencias-de-api-da-kommo/llms.txt) - [OpenAPI document](https://skmtc.dev/kommo/apis/referencias-de-api-da-kommo/revisions/55101699dddb?raw)
