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

# Add an item to a list

> Add an item to a list.

**Validation rules by entity type:**

- **COMPANY**: must include `domain` OR both `name` and `location`.
- **PEOPLE**: must include at least 2 of: `linkedin_url`, `name`, `location`, `first_name`, `last_name`, `full_name`, `company_name`, `current_position`.



## OpenAPI

````yaml POST /lists/{listId}/item
openapi: 3.1.0
info:
  title: OpenAPI Lonescale
  description: A sample API for Lonescale
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://public-api.lonescale.com
security:
  - ApiKeyAuth: []
paths:
  /lists/{listId}/item:
    post:
      description: >-
        Add an item to a list.


        **Validation rules by entity type:**


        - **COMPANY**: must include `domain` OR both `name` and `location`.

        - **PEOPLE**: must include at least 2 of: `linkedin_url`, `name`,
        `location`, `first_name`, `last_name`, `full_name`, `company_name`,
        `current_position`.
      parameters:
        - name: listId
          in: path
          required: true
          description: The ID of the list.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddItemRequest'
      responses:
        '200':
          description: The created list item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListItem'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Bad request
                error: Bad request
                statusCode: 400
        '401':
          description: Invalid or missing authentication credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              example:
                message: Invalid API Key
                error: Unauthorized
                statusCode: 401
        '403':
          description: Validation failed — missing required fields for the list entity type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Missing required fields for PEOPLE list
                error: Forbidden
                statusCode: 403
        '404':
          description: List not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: List not found
                error: Not Found
                statusCode: 404
components:
  schemas:
    AddItemRequest:
      type: object
      additionalProperties: true
      properties:
        first_name:
          type: string
        last_name:
          type: string
        full_name:
          type: string
        linkedin_url:
          type: string
          format: uri
        company_name:
          type: string
        current_position:
          type: string
        domain:
          type: string
          description: >-
            Company domain (e.g., acme.com). Required for COMPANY lists (unless
            `name` + `location` are provided).
        location:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        contact_id:
          type: string
          description: Optional CRM record ID for this contact.
    ListItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the item.
        first_name:
          type: string
        last_name:
          type: string
        full_name:
          type: string
        linkedin_url:
          type: string
          format: uri
        company_name:
          type: string
        current_position:
          type: string
        domain:
          type: string
          description: Company domain (e.g., acme.com).
        location:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        contact_id:
          type: string
          description: Optional CRM record ID for this contact.
        createdAt:
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    AuthError:
      required:
        - message
        - error
        - statusCode
      type: object
      properties:
        message:
          type: string
          example: Invalid API Key
        error:
          type: string
          example: Unauthorized
        statusCode:
          type: integer
          example: 401
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Provide your API key in the x-api-key header.

````