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

# Update a list

> Appends companies to a list and restarts its import.



## OpenAPI

````yaml /api-reference/specs/list.json put /lists/{id}
openapi: 3.0.1
info:
  title: Pipecorn List API
  description: Pipecorn List API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.pipecorn.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /lists/{id}:
    put:
      summary: Update a list
      description: Appends companies to a list and restarts its import.
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            UUID of the list to update. A numeric LinkedIn (Sales Navigator)
            list ID is accepted too
          schema:
            type: string
          example: 8e1dcba0-f0bb-4071-99fc-f18ba6559ccc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListUpdate'
      responses:
        '200':
          description: List updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List'
              example:
                name: Tech Companies 2024
                id: 8e1dcba0-f0bb-4071-99fc-f18ba6559ccc
                linkedin_id: '7123456789012345678'
                type: companies
                status: ONGOING
                companies_requested_count: 2
                companies_found_count: 1
                companies_not_found: []
                created_at: '2024-01-01T00:00:00Z'
                updated_at: '2024-01-02T00:00:00Z'
                companies:
                  - linkedin_url: https://www.linkedin.com/company/pipecorn
                    linkedin_id: '12345678'
                    company_name: Pipecorn
                    company_website: https://pipecorn.com
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_json:
                  summary: Invalid JSON
                  value:
                    error: Invalid JSON
                invalid_company:
                  summary: each company must be an object with a name
                  value:
                    error: each company must be an object with a name
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_key:
                  summary: No API key present
                  value:
                    error: No API key present
                invalid_key:
                  summary: Invalid API key
                  value:
                    error: Invalid API key
        '404':
          description: No list with this ID is accessible to you
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: List not found
        '422':
          description: >-
            Invalid `live` or `webhook_url`, missing or expired LinkedIn
            credentials in live mode, plan limit reached, or the list could not
            be saved (returns the list of validation messages)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_live:
                  summary: Invalid live value. Must be a boolean (true/false)
                  value:
                    error: Invalid live value. Must be a boolean (true/false)
                no_credentials:
                  summary: >-
                    LinkedIn credentials not found. Please connect your LinkedIn
                    account.
                  value:
                    error: >-
                      LinkedIn credentials not found. Please connect your
                      LinkedIn account.
                expired_credentials:
                  summary: >-
                    LinkedIn credentials expired. Update your connection on
                    Pipecorn interface, or set parameter 'live' to false in your
                    request body
                  value:
                    error: >-
                      LinkedIn credentials expired. Update your connection on
                      Pipecorn interface, or set parameter 'live' to false in
                      your request body
                plan_limit:
                  summary: Can't proceed with the request. Plan limit reached.
                  value:
                    error: Can't proceed with the request. Plan limit reached.
                invalid_webhook:
                  summary: Invalid webhook_url format
                  value:
                    error: Invalid webhook_url format
        '429':
          description: Rate limit exceeded (your plan's per-minute limit)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Rate limit exceeded. Please wait before retrying.
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            Retry-After:
              $ref: '#/components/headers/Retry-After'
components:
  schemas:
    ListUpdate:
      type: object
      properties:
        companies:
          type: array
          items:
            type: object
            required:
              - name
            properties:
              name:
                description: The name of the company
                type: string
                example: Pipecorn
              country_code:
                description: >-
                  The country code where the company is located. Optional but
                  increases the chance of a match.
                type: string
                example: FR
              domain:
                description: >-
                  The company's domain address. Website URL can work as well.
                  Optional but increases the chance of a match.
                type: string
                example: pipecorn.com
              linkedin_url:
                description: >-
                  The company's LinkedIn profile URL (regular or Sales
                  Navigator). Adding it provides a 100% match.
                type: string
                format: uri
                example: https://www.linkedin.com/company/pipecorn
          example:
            - name: Pipecorn
              country_code: FR
              domain: pipecorn.com
              linkedin_url: https://www.linkedin.com/company/pipecorn
            - name: Google
              country_code: US
              domain: google.com
              linkedin_url: https://www.linkedin.com/company/google
          description: >-
            Companies to append to the list. Companies already in the list are
            not duplicated
        webhook_url:
          type: string
          format: uri
          description: Replaces the list's webhook URL when present
        live:
          type: boolean
          default: true
          description: >-
            `true` (default) also updates the LinkedIn Sales Navigator list,
            which requires valid LinkedIn credentials. `false` matches against
            the Pipecorn database only
    List:
      type: object
      properties:
        name:
          type: string
          description: Name of the list
          example: Tech Companies 2024
        id:
          type: string
          format: uuid
          description: UUID of the list
          example: 8e1dcba0-f0bb-4071-99fc-f18ba6559ccc
        linkedin_id:
          type: string
          description: >-
            ID of the LinkedIn Sales Navigator list, as a string. Empty when the
            list was created with `live: false`
          example: '7123456789012345678'
        type:
          type: string
          enum:
            - companies
            - leads
          description: What the list contains
          example: companies
        status:
          type: string
          enum:
            - NOT_STARTED
            - ONGOING
            - FINISHED
            - ERROR
            - NOT_ENOUGH_CREDITS
            - FORBIDDEN
            - LIMIT_REACHED
            - UNAUTHORIZED
            - SCHEDULED
          description: Status of the list import
          example: FINISHED
        companies_requested_count:
          type: integer
          description: >-
            Number of companies submitted, or for a list built by `POST
            /accounts/search`, the number of companies the search imports
            (company lists only)
          example: 2
        companies_found_count:
          type: integer
          description: Number of companies matched so far (company lists only)
          example: 1
        companies_not_found:
          type: array
          items:
            type: string
          description: >-
            Names of the submitted companies that could not be matched,
            lowercased and trimmed (not the objects you submitted). Empty until
            the list is `FINISHED` (company lists only)
          example:
            - google
        created_at:
          type: string
          format: date-time
          example: '2024-01-01T00:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2024-01-02T00:00:00Z'
        companies:
          type: array
          nullable: true
          description: >-
            Matched companies. `null` for lead lists. Fields the source has no
            value for are `null`
          items:
            type: object
            properties:
              linkedin_url:
                type: string
                example: https://www.linkedin.com/company/pipecorn
              linkedin_id:
                type: string
                example: '12345678'
              company_name:
                type: string
                example: Pipecorn
              company_website:
                type: string
                example: https://pipecorn.com
              domain:
                type: string
                nullable: true
                example: pipecorn.com
              description:
                type: string
                nullable: true
              industry:
                type: string
                nullable: true
                example: Technology, Information and Internet
              location:
                type: string
                nullable: true
                example: Paris, France
              employee_count:
                type: integer
                nullable: true
                example: 12
              employee_range:
                type: string
                nullable: true
                example: 11-50
              company_type:
                type: string
                nullable: true
                example: Privately Held
              year_founded:
                type: integer
                nullable: true
                example: 2024
    Error:
      required:
        - error
      type: object
      properties:
        error:
          description: >-
            Human-readable error message. A few validation errors return a list
            of messages instead of a single string.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        message:
          type: string
          description: >-
            Longer explanation, sent by validators that add context. Such errors
            may also carry extra top-level keys like `valid_values` or
            `example`.
        details:
          type: string
          description: >-
            Parser message, sent with `"Invalid JSON format in request body"`
            when the request body is not valid JSON.
  headers:
    RateLimit-Limit:
      description: >-
        Requests allowed per minute on your plan for this group of endpoints.
        Absent for unlimited accounts and on endpoints exempt from the plan
        limit.
      schema:
        type: integer
        example: 100
    RateLimit-Remaining:
      description: Requests left in the current one-minute window.
      schema:
        type: integer
        example: 97
    RateLimit-Reset:
      description: >-
        Seconds until the current window resets and `RateLimit-Remaining` is
        back to `RateLimit-Limit`.
      schema:
        type: integer
        example: 42
    Retry-After:
      description: >-
        Seconds to wait before retrying. Sent when the plan limit or a request
        still in progress caused the error.
      schema:
        type: integer
        example: 42
  securitySchemes:
    defaultApiKey:
      type: apiKey
      in: header
      description: Your API key
      name: X-API-KEY

````

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