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

> Monitors the companies or contacts of one or several CRM lists with a Signal Agent.

# Monitor CRM Lists with a Signal Agent

export const SnippetObjectReference = ({objectName, objectPath = null}) => {
  const lowerCaseObjectName = objectName.toLowerCase();
  if (lowerCaseObjectName === 'lead' || lowerCaseObjectName === 'leads') {
    return <Note>
        This endpoint uses the <a href={`/api-reference/objects-definitions/${objectPath}`}>{objectName} object</a>. Make sure to also check the <a href={`/api-reference/objects-definitions/${lowerCaseObjectName === 'lead' ? 'contact' : 'lead'}`}>{lowerCaseObjectName === 'lead' ? 'Contact' : 'Lead'} object</a> to understand the distinction between the two.
      </Note>;
  }
  return <Note>
      This endpoint uses the <a href={`/api-reference/objects-definitions/${objectPath}`}>{objectName} object</a>.
    </Note>;
};

<SnippetObjectReference objectName="Watch List" objectPath="watch-list" />

<Note>
  The lists you send replace the ones the agent monitored: send the full set every time. Only companies with a domain and contacts with a LinkedIn URL are monitored, and every list must hold the entity the signal monitors (company lists for a company signal, contact lists for a contact signal).

  To start from a CSV: import it into a company or contact list, create a draft with [Create Signal Agent](/api-reference/endpoints/watch-list/create-watch-list) (`activate: false`), call this endpoint, then activate the draft with [Update Signal Agent](/api-reference/endpoints/watch-list/update-watch-list) (`activate: true`).

  An active agent monitors the new entities right away; a paused one stays paused until you reactivate it. Sending exactly the lists it already monitors returns `409`: companies or contacts added to or removed from those lists are picked up automatically.
</Note>


## OpenAPI

````yaml post /watchlist/crm-lists
openapi: 3.0.0
info:
  title: lemlist API
  version: 1.0.0
  description: >-
    Welcome to the lemlist Developer Documentation.


    lemlist is very customizable and open. You'll find on this page all the API
    and integration you can do with lemlist.


    # Rate Limit


    lemlist's API rate limits requests in order to prevent abuse and overload of
    our services.  

    Rate limits are applied on all routes and per API key performing the
    request.  

    The rate limits are **20** requests per **2** seconds.  

    The response provides any information you may need about it:


    | Header | Description |

    | --- | --- |

    | Retry-After | The number of seconds in which you can retry |

    | X-RateLimit-Limit | The maximum requests in that time |

    | X-RateLimit-Remaining | The number of remaining requests you can make |

    | X-RateLimit-Reset | The date when the rate limit will reset |


    _Example of values for the rate limit headers_


    ``` json

    {
        "Retry-After": 2,
        "X-RateLimit-Limit": 20,
        "X-RateLimit-Remaining": 7,
        "X-RateLimit-Reset" : "Tue Feb 16 2021 09:02:42 GMT+0100 (Central European Standard Time)"
    }

     ```

    # Definitions


    ## Team


    A team is the entity of lemlist that can handle users and billing.


    ## Credits


    Credits are the coins a team uses to enrich emails, LinkedIn URLs, etc. via
    the enrich route. Each enrichment feature needs a certain amount of credits
    to run.


    ## User


    You use a user account to connect to lemlist and send messages via the
    connected emails or LinkedIn account.


    ## Campaign


    A campaign is the entity to automate outreach. A campaign has multiple
    sequences composed of steps.


    ## Lead


    A lead is a person that you try to contact via a campaign.


    ## Activity


    An activity is the history of all the steps.


    ## Unsubscribe


    An unsubscribe occurs when a person decides they don't want to receive
    emails from you anymore.


    # Authentication


    All API routes use the dedicated subdomain `api.lemlist.com`.


    lemlist uses API keys to allow access to the API. You can get your lemlist
    API key at our [integration
    page](https://app.lemlist.com/settings/integrations).


    You need to add the `Authorization` header using the `Basic` authentication
    type. `login:password` **where the login is always empty and the password is
    the API key**.


    ⚠️ **Don't forget to add the semicolon (**`:`**) before your API key in curl
    command.**


    > To authorize, use this code: 
      

    ``` shell

    curl https://api.lemlist.com/api/team \
      --user ":YourApiKey"

     ```

    **Make sure to replace** **`YourApiKey`** **with your API key.**


    # Give feedback


    If you want to report a bug, ask for data, or share with us a use case,
    please fill this [form](https://lemlist.typeform.com/to/mfVlkyGf). It will
    help us centralize your needs!
servers:
  - url: https://api.lemlist.com/api
security:
  - basicAuth: []
tags:
  - name: Enrichment Providers
    description: >-
      The data providers lemlist can call to find an email or a phone.


      Internal providers are paid with lemlist credits and always available.
      External providers run on your own account: connect one by saving its API
      key, and it becomes available to your waterfalls. `GET
      /enrichments/providers` is the catalog of provider ids accepted by the
      waterfall endpoints.
  - name: Enrichment Waterfalls
    description: >-
      Control which data providers lemlist calls when enriching a contact, and
      in which order.


      A waterfall is an ordered list of providers for one enrichment `type`
      (`email` or `phone`). Providers are tried one after the other until one
      returns a result.


      Every team has exactly one default waterfall per type (`isDefault: true`).
      While its `editor` is `lemlist` it follows the lemlist behaviour:
      providers you connected with your own API key are tried first, then
      internal providers in a random order. Once a team member edits its
      provider list, `editor` becomes that user's id and the list is followed as
      is; resetting it hands it back to `lemlist`.


      Custom waterfalls (`isDefault: false`) carry `conditions` on the contact
      being enriched, keyed by contact property; every key present must match.
      When a contact is enriched, lemlist runs a single waterfall: the custom
      waterfall of the requested type whose conditions match the contact, or the
      default waterfall when none does. If several match, the one with the most
      condition keys wins, then the most recently updated. Only that waterfall
      runs; when it finds nothing, the enrichment ends without falling back to
      another one.
paths:
  /watchlist/crm-lists:
    post:
      tags:
        - Signal Agents
      summary: Monitor CRM Lists with a Signal Agent
      description: >-
        Switches a Signal Agent to the CRM list source and monitors every
        company (or contact) of the given CRM lists. The lists replace the ones
        it monitored: entities left out stop being monitored. Only companies
        with a domain and contacts with a LinkedIn URL are monitored.


        To monitor a CSV: import it into a company or contact list, create a
        draft with `POST /watchlist` (`activate: false`), call this endpoint,
        then activate the draft with `PATCH /watchlist` (`activate: true`). An
        active agent monitors the new entities right away; a paused one stays
        paused.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - watchListId
                - crmListIds
              properties:
                watchListId:
                  type: string
                  description: >-
                    Signal Agent id (a draft, or an existing agent whose
                    monitored lists are replaced)
                crmListIds:
                  type: array
                  minItems: 1
                  maxItems: 500
                  description: >-
                    CRM list ids (clt_xxx). Company lists for a company signal,
                    contact lists for a contact signal.
                  items:
                    type: string
            example:
              watchListId: wl_Example000000001
              crmListIds:
                - clt_Example000000001
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatchListApiWatchListResponse'
        '400':
          description: >-
            Validation error. `WATCH_INTENT_INVALID_SEGMENT_TYPE` when the
            signal type only monitors the whole market (`details.allowedTypes`
            lists the types that accept CRM lists);
            `WATCH_LIST_API_NO_MONITORABLE_ENTITIES` when no entity of the lists
            can be monitored.
          content:
            application/json:
              example:
                error: >-
                  No entity of these CRM lists can be monitored: the lists must
                  be your team's and hold the signal's entity, with a domain on
                  each company or a LinkedIn URL on each contact
                code: WATCH_LIST_API_NO_MONITORABLE_ENTITIES
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            text/plain:
              example: Unauthorized
        '404':
          description: Signal Agent not found
          content:
            application/json:
              example:
                error: Watch list not found
                code: WATCH_LIST_NOT_FOUND
        '409':
          description: >-
            The Signal Agent already monitors exactly these CRM lists: changes
            to their content are picked up automatically
          content:
            application/json:
              example:
                error: >-
                  This watch list already monitors exactly these CRM lists;
                  changes to their content are picked up automatically
                code: WATCH_LIST_API_CRM_LISTS_ALREADY_MONITORED
        '429':
          description: >-
            The lists hold more entities than the team can monitor;
            `details.monitorMax` is the cap
          content:
            application/json:
              example:
                error: >-
                  This agent has reached its monitoring limit. Stop monitoring
                  some entities before adding more.
                code: WATCH_LIST_MONITOR_MAX_EXCEEDED
                details:
                  monitorMax: 10000
        '500':
          description: Internal server error
          content:
            text/plain:
              example: Internal server error
components:
  schemas:
    WatchListApiWatchListResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/WatchListSchema'
    WatchListSchema:
      type: object
      description: A Signal Agent (watch list) configuration.
      properties:
        _id:
          type: string
          description: Unique Signal Agent identifier
        name:
          type: string
          description: Display name
        type:
          type: string
          description: Signal type monitored by this Signal Agent
          enum:
            - companyIsHiring
            - companyRaisedFunds
            - recruitmentCampaign
            - jobChange
            - newHire
            - companyEmployeeVisitedMyWebsite
            - customSignals
            - competitorConnections
            - competitorReactions
            - technologyChange
            - linkedinPeopleProfile
            - linkedinCompanyProfile
            - mergersAcquisitions
            - promotion
            - linkedinKeywords
            - republishedJobOffers
            - externalSignalContact
            - externalSignalCompany
            - buyingIntent
            - newProductLaunch
            - companyAward
            - newPartnership
            - newOffice
            - closingOffice
            - costCutting
            - outagesAndSecurityBreaches
            - lawsuitsAndLegalIssues
            - githubStargazer
        status:
          type: string
          description: Lifecycle status
          enum:
            - active
            - inactive
            - draft
            - insufficient_credits
            - empty_crm_lists
            - error
            - delete
        entity:
          type: string
          description: Entity kind the agent tracks
          enum:
            - contact
            - company
        segmentType:
          type: string
          description: How the monitored entities are sourced
          enum:
            - all
            - list
            - csv
        signalProcessingType:
          type: string
          description: How detected signals are processed
          enum:
            - manual
            - create_opportunity
            - push_to_campaign
        signalOpportunityTemplate:
          type: object
          description: >-
            Task/opportunity template applied to each signal when
            signalProcessingType is create_opportunity.
          properties:
            ownerType:
              type: string
              description: Who the created opportunity is assigned to
              enum:
                - contact_owner
                - specific_owner
            ownerId:
              type: string
              description: Owner user id, when ownerType is specific_owner
            type:
              type: string
              description: Opportunity channel
              enum:
                - email
                - phone
                - linkedinSend
                - whatsappMessage
                - manual
            priority:
              type: integer
              description: Opportunity priority
              enum:
                - 0
                - 1
                - 2
            data:
              type: object
              properties:
                title:
                  type: string
                  description: Opportunity title
                subject:
                  type: string
                  description: Email subject (email channel)
                emailTemplateId:
                  type: string
                  description: Email template id
                message:
                  type: string
                  description: Message body
        filters:
          type: array
          description: Filters narrowing which entities/events are tracked
          items:
            $ref: '#/components/schemas/WatchListFilter'
        emoji:
          type: string
          description: Emoji shown next to the agent name
    WatchListFilter:
      type: object
      description: >-
        A filter narrowing which entities or events a Signal Agent tracks. `in`
        includes matching values, `out` excludes them.
      required:
        - filterId
      properties:
        filterId:
          type: string
          description: Filter identifier
          enum:
            - title
            - description
            - location
            - visitLocation
            - website
            - pagesTracked
            - minVisitDuration
            - minPageViewed
            - internalTraffic
            - linkedinUrls
            - companyLinkedinUrls
            - companyNames
            - companyLocation
            - companyIndustries
            - companySizes
            - maxIdentificationsPerDay
            - excludedVisitorIps
            - reactionTypes
            - linkedinTopics
            - bomboraTopics
            - watcherWatchKey
            - questions
            - fundraisingMinAmount
            - fundraisingMaxAmount
            - fundraisingInvestmentTypes
            - fundraisingInvestors
            - technologies
            - detectionMode
            - maDealTypes
            - maMinAmount
            - persona
            - customPersonaTitles
            - externalSignalFieldMapping
            - externalSignalCustomFieldMapping
            - seniority
            - crmListIds
            - minJobCount
            - timeframe
            - githubRepoUrls
        in:
          type: array
          description: Values to include
          items:
            type: string
        out:
          type: array
          description: Values to exclude
          items:
            type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

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