> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Link Items

> Link chats, reviews, reports or other tasks to a task.

`type` is one of `chat`, `review`, `report` or `task`. Ids are prefixless, as everywhere in this API.

## Body parameters

<ParamField body="linked_items" type="array" required>
  The items to link. At least one.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://api.wordsmith.ai/api/v1/tasks/9f8e7d6c-5b4a-3210-9876-543210fedcba/links' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "linked_items": [
      {
        "type": "chat",
        "id": "5f6a7b8c-9d0e-1f20-3a4b-5c6d7e8f9012"
      }
    ]
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.wordsmith.ai/api/v1/tasks/9f8e7d6c-5b4a-3210-9876-543210fedcba/links", {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "linked_items": [
        {
          "type": "chat",
          "id": "5f6a7b8c-9d0e-1f20-3a4b-5c6d7e8f9012"
        }
      ]
    }),
  });
  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.wordsmith.ai/api/v1/tasks/9f8e7d6c-5b4a-3210-9876-543210fedcba/links"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
  }
  payload = {
      "linked_items": [
          {
              "type": "chat",
              "id": "5f6a7b8c-9d0e-1f20-3a4b-5c6d7e8f9012"
          }
      ]
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "9f8e7d6c-5b4a-3210-9876-543210fedcba",
    "display_id": "#12",
    "task_number": 12,
    "title": "Review the Acme NDA",
    "description": "Check the indemnity and termination clauses.",
    "additional_context": "Counterparty has pushed back twice on liability caps.",
    "status": "in_progress",
    "priority": "high",
    "team": {
      "id": "1a2b3c4d-5e6f-7081-9200-aabbccddeeff",
      "name": "Legal"
    },
    "creator": {
      "id": "11111111-2222-3333-4444-555555555555",
      "name": "Jane Doe",
      "email": "jane@example.com"
    },
    "assigned_to": {
      "id": "11111111-2222-3333-4444-555555555555",
      "name": "Jane Doe",
      "email": "jane@example.com"
    },
    "assigned_agent": null,
    "assigned_team": null,
    "matter": null,
    "complete_by": "2026-01-01T00:00:00Z",
    "tags": [
      "nda",
      "urgent"
    ],
    "visibility": "customer",
    "archived": false,
    "draft": false,
    "involved_people": [
      {
        "id": "11111111-2222-3333-4444-555555555555",
        "name": "Jane Doe",
        "email": "jane@example.com",
        "role": "assignee",
        "access_level": "write"
      }
    ],
    "shared_teams": [],
    "linked_items": [],
    "input_files": [],
    "output_files": [],
    "created_at": "2025-12-31T00:00:00Z",
    "updated_at": "2025-12-31T01:00:00Z"
  }
  ```
</ResponseExample>
