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

# Link clients to a list

> Link a set of clients to a specific client list. Specify client IDs to add to the list.



## OpenAPI

````yaml /openapi-private.json post /lists/{id}/clients/_link
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /lists/{id}/clients/_link:
    post:
      tags:
        - Client Lists
      summary: Link clients to a list
      description: >-
        Link a set of clients to a specific client list. Specify client IDs to
        add to the list.
      operationId: linkClientsToList
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkClientsToListDto'
      responses:
        '204':
          description: Clients linked to list successfully
        '400':
          description: >-
            Bad request - invalid client IDs, list size limit exceeded, or bulk
            action count limit exceeded
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionBaseDto'
                  - $ref: '#/components/schemas/ListErrorDto'
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '404':
          description: Client list not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
      security:
        - x-api-key: []
components:
  schemas:
    LinkClientsToListDto:
      type: object
      properties:
        selection:
          $ref: '#/components/schemas/ClientIncludedSelectionDto'
      required:
        - selection
      id: PrivateLinkClientsToListDto
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
    ListErrorDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ListErrorItemDto'
      required:
        - error
      id: ListErrorDto
    ClientIncludedSelectionDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - included
        ids:
          $ref: '#/components/schemas/ClientIncludedIdsDto'
      required:
        - type
        - ids
      id: PrivateClientIncludedSelectionDto
    ListErrorItemDto:
      anyOf:
        - $ref: '#/components/schemas/ListSizeLimitExceededErrorDto'
        - $ref: '#/components/schemas/BulkRecordActionCountLimitExceededErrorDto'
      id: ListErrorItemDto
    ClientIncludedIdsDto:
      type: object
      properties:
        include:
          minItems: 1
          maxItems: 250
          type: array
          items:
            type: string
            minLength: 1
          uniqueItems: true
      required:
        - include
      id: PrivateClientIncludedIdsDto
    ListSizeLimitExceededErrorDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - LIST_SIZE_LIMIT_EXCEEDED
        message:
          type: string
        listId:
          type: string
      required:
        - type
        - message
      id: ListSizeLimitExceededErrorDto
    BulkRecordActionCountLimitExceededErrorDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - BULK_RECORD_ACTION_COUNT_LIMIT_EXCEEDED
        message:
          type: string
      required:
        - type
        - message
      id: BulkRecordActionCountLimitExceededErrorDto
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for authentication. Get your API key from Settings → API Keys in
        your Spott dashboard.

````