> ## 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.

# Bulk Set Record Tags

> The same tags across up to 100 records

One call for a selection, whatever the table: accounts, people or opportunities.
Every subject in one request must be the same `subject_type`, and the tags must
come from the field for that subject.

The response reports how many records were written.

> [!WARNING]
>
> **Prefer `add` over `replace` across a mixed selection.** A bulk `replace`
> discards whatever each record already carried, and those records rarely
> carried the same thing. The app's bulk action sends `add` for exactly this reason.

> [!NOTE]
>
> **A request with more than 100 records is an error, and the whole request is
> rejected.** Split the selection and send several calls of up to 100 records.

```bash cURL theme={null}
curl -X PUT "https://api.clustr-ai.com/api/public/record-tags/bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subjects": [
      { "subject_type": "account", "company_id": "acc_rvvwwmsy2037szdrzy7gjt390z" },
      { "subject_type": "account", "company_id": "acc_sh25p7wy33yek2q7xhs0fm0hdg" }
    ],
    "tag_ids": ["tag_vperrjgm402jznxjqd0m77gkkz"],
    "mode": "add"
  }'
```

```bash cURL (opportunities) theme={null}
curl -X PUT "https://api.clustr-ai.com/api/public/record-tags/bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subjects": [
      {
        "subject_type": "path",
        "client_linkedin_id": "nicdelaye",
        "prospect_linkedin_id": "jane-smith"
      }
    ],
    "tag_ids": ["tag_0k57sn6zset8ps77pmx8d30xfc"],
    "mode": "add"
  }'
```

```json 200 theme={null}
{
  "success": true,
  "data": { "updated": 2 }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": { "message": "too many records in one request", "code": "BAD_REQUEST" }
}
```


## OpenAPI

````yaml PUT /record-tags/bulk
openapi: 3.1.0
info:
  title: Clustr Public API
  description: >
    Programmatic access to your Clustr network: import connectors, search warm
    intros (opportunities), and manage target accounts.


    ## Authentication

    All endpoints require a Bearer token (API key) in the `Authorization`
    header.


    ```

    Authorization: Bearer <your_api_key>

    ```


    API keys can be created and managed from the [API settings
    page](https://app.clustr-ai.com/api).
  version: '1.0'
  contact:
    name: Clustr Support
    url: https://clustr-ai.com
servers:
  - url: https://api.clustr-ai.com/api/public
    description: Production
security:
  - BearerAuth: []
paths:
  /record-tags/bulk:
    put:
      tags:
        - Tags
      summary: Bulk Set Record Tags
      description: >-
        Sets the same tags on up to 100 records of one subject type. Across a
        mixed selection,

        prefer `mode` `add`: a bulk replace removes every tag each record
        carried before.


        The response reports how many records were updated.
      operationId: bulkSetRecordTags
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkSetRecordTagsRequest'
      responses:
        '200':
          description: How many records were updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      updated:
                        type: integer
        '400':
          description: More than 100 records, an unknown tag id, or a malformed subject
        '401':
          description: Invalid or missing API key
components:
  schemas:
    BulkSetRecordTagsRequest:
      type: object
      required:
        - subjects
        - tag_ids
      properties:
        filters:
          type: object
          additionalProperties: true
          description: >-
            In place of `subjects`: the list body of the table (its filters).
            The tags go on every record it matches, of `subject_type`. Send
            exactly one of `subjects` and `filters`.
        subject_type:
          type: string
          enum:
            - account
            - person
            - path
          description: >-
            The type of the records `filters` matches: `account`, `person` or
            `path`.
        subjects:
          type: array
          maxItems: 100
          description: >-
            1 to 100 records. Each carries `subject_type` and the key its type
            uses:


            | `subject_type` | Key |

            |---|---|

            | `account` | `company_id` |

            | `person` | `linkedin_id` |

            | `path` | `client_linkedin_id` and `prospect_linkedin_id` |
          items:
            type: object
            required:
              - subject_type
            properties:
              subject_type:
                type: string
                enum:
                  - account
                  - person
                  - path
              company_id:
                type: string
                description: >-
                  The account's Clustr ID (`acc_…`), for `subject_type`
                  `account`. The `company_id` from earlier

                  responses also works.
              linkedin_id:
                type: string
                description: The person's LinkedIn id, for `subject_type` `person`.
              client_linkedin_id:
                type: string
                description: The connector's LinkedIn id, for `subject_type` `path`.
              prospect_linkedin_id:
                type: string
                description: The prospect's LinkedIn id, for `subject_type` `path`.
        tag_ids:
          type: array
          description: >-
            Tag Clustr IDs (`tag_…`), from [List Tag
            Groups](/api-reference/list-tag-groups). The ids from

            earlier responses also work.
          items:
            type: string
        mode:
          type: string
          description: >-
            What the write does to the tags already on each record: `add`,
            `remove` or

            `replace`.
          enum:
            - replace
            - add
            - remove
          default: replace
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: The API key you created on the API settings page of the Clustr app.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.