> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clustr-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set An Opportunity's Tags

> Add, remove, or replace the tags on one warm intro

The write that replaces setting a status. Add the tag you want from the `path`
group named Status: the group is `single`, so the tag already there is swapped
out.

The response is the path's tags read back after the write.

## Query Parameters

<ParamField query="client_linkedin_id" type="string" required>
  The connector's LinkedIn public identifier.
</ParamField>

<ParamField query="prospect_linkedin_id" type="string" required>
  The prospect's LinkedIn public identifier.
</ParamField>

## Body

<ParamField body="tag_ids" type="string[]" required>
  Tag ids from a group whose `subject_type` is `path`, from
  [List Tag Groups](/api-reference/list-tag-groups).
</ParamField>

<ParamField body="mode" type="string" default="replace">
  `replace`, `add` or `remove`. A bare `replace` is the path's whole set, so
  send `group_id` when you mean one group.
</ParamField>

<ParamField body="group_id" type="string">
  Narrows a `replace` to one group.
</ParamField>

<Info>
  **The old way still works, for now.** `status_id` on
  [Update Opportunity](/api-reference/update-opportunity) takes a path tag id
  and writes the same assignment. It is deprecated; this endpoint is the one to
  build against.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT "https://api.clustr-ai.com/api/public/record-tags/path?client_linkedin_id=nicdelaye&prospect_linkedin_id=jane-smith" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"tag_ids": ["8f652e61-edfa-4a8c-8763-cc4902dd386b"], "mode": "add"}'
  ```

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

  requests.put(
      "https://api.clustr-ai.com/api/public/record-tags/path",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      params={"client_linkedin_id": "nicdelaye", "prospect_linkedin_id": "jane-smith"},
      json={"tag_ids": [contacted_tag_id], "mode": "add"},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "tags": [
        {
          "id": "8f652e61-edfa-4a8c-8763-cc4902dd386b",
          "group_id": "2b7c9d10-4e5f-4a61-9c22-8d3f1a7b0e44",
          "name": "Contacted",
          "color": "#3B82F6"
        }
      ]
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": { "message": "client_linkedin_id and prospect_linkedin_id are required", "code": "BAD_REQUEST" }
  }
  ```
</ResponseExample>
