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

> Creates a new Signal Agent (watch list).

# Create 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>
  A Signal Agent is created as a draft by default. Pass `segmentType`, `signalProcessingType` and `activate: true` to run the full setup and start monitoring immediately. `filters` are validated against the chosen `type` — use [List allowed filters](/api-reference/endpoints/watch-list/get-filters) to discover which filters a type accepts.
</Note>

<Note>
  Pass `campaignId` with `signalProcessingType: "push_to_campaign"` to link the new agent to that campaign as its signal trigger in the same call — same effect as [Add Signal Agent trigger](/api-reference/endpoints/campaigns/add-watch-list-trigger). It requires the `campaignSignalTrigger` beta. If the call is refused (`400`, `403`, `404` or `409`), no agent is created. `campaignId` is not accepted by [Update Signal Agent](/api-reference/endpoints/watch-list/update-watch-list): to link an existing agent, use Add Signal Agent trigger.
</Note>


## OpenAPI

````yaml post /watchlist
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:
    post:
      tags:
        - Signal Agents
      summary: Create Signal Agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - type
              properties:
                name:
                  type: string
                  description: Display name
                type:
                  type: string
                  description: Signal type to monitor
                  enum:
                    - companyIsHiring
                    - companyRaisedFunds
                    - recruitmentCampaign
                    - newHire
                    - companyEmployeeVisitedMyWebsite
                    - customSignals
                    - competitorConnections
                    - competitorReactions
                    - technologyChange
                    - linkedinPeopleProfile
                    - linkedinCompanyProfile
                    - mergersAcquisitions
                    - promotion
                    - linkedinKeywords
                    - republishedJobOffers
                    - buyingIntent
                    - newProductLaunch
                    - companyAward
                    - newPartnership
                    - newOffice
                    - closingOffice
                    - costCutting
                    - outagesAndSecurityBreaches
                    - lawsuitsAndLegalIssues
                    - githubStargazer
                filters:
                  type: array
                  description: Filters to apply (validated against the signal type)
                  items:
                    $ref: '#/components/schemas/WatchListFilter'
                emoji:
                  type: string
                  description: >-
                    Emoji shown next to the agent name (defaults to a random
                    emoji)
                segmentType:
                  type: string
                  description: >-
                    Entity sourcing. Only `all` is supported via the API.
                    Required together with signalProcessingType when activate is
                    true.
                  enum:
                    - all
                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
                personaId:
                  type: string
                  description: >-
                    Persona (pdp_xxx) used to source contacts from the People
                    Database. Only for a company Signal Agent with
                    signalProcessingType = push_to_campaign whose signal type
                    does not already ship its own contact (those company signals
                    carry no contact, so the persona is the only way to know who
                    to reach). Optional; rejected on any other configuration.
                campaignId:
                  type: string
                  description: >-
                    Campaign (cam_xxx) to link as this Signal Agent's signal
                    trigger, in the same call: every new signal pushes its
                    contact into that campaign as a lead. Only with
                    signalProcessingType = push_to_campaign. A campaign set up
                    as manual in the lemlist app is refused (409). Requires the
                    campaignSignalTrigger beta. Optional; on any refusal no
                    agent is created.
                  example: cam_ExAmPlE4k8Qz2Wn7R
                activate:
                  type: boolean
                  description: >-
                    Fully set up and activate the agent. Requires segmentType
                    and signalProcessingType.
            example:
              name: New hires at target accounts
              type: newHire
              filters:
                - filterId: companyIndustries
                  in:
                    - Software
                  out: []
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WatchListApiWatchListResponse'
        '400':
          description: >-
            Validation error - invalid body, filters, or activate prerequisites.
            `WATCH_LIST_API_INVALID_CAMPAIGN_ID` when `campaignId` is malformed
            or sent without signalProcessingType = push_to_campaign.
          content:
            text/plain:
              example: activate requires both segmentType and signalProcessingType
            application/json:
              example:
                error: >-
                  campaignId must be a campaign id (cam_xxx) and requires
                  signalProcessingType = "push_to_campaign"
                code: WATCH_LIST_API_INVALID_CAMPAIGN_ID
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            text/plain:
              example: Unauthorized
        '402':
          description: Insufficient credits to activate the agent
          content:
            text/plain:
              example: Insufficient credits
        '403':
          description: >-
            `BETA_NOT_ENABLED` - `campaignId` was sent but the
            `campaignSignalTrigger` beta is not enabled for this team. No agent
            is created.
          content:
            application/json:
              example:
                error: Beta is not enabled
                code: BETA_NOT_ENABLED
        '404':
          description: >-
            `WATCH_LIST_IMPORT_LEADS_CAMPAIGN_NOT_FOUND` - the `campaignId`
            campaign does not exist in this workspace. No agent is created.
          content:
            application/json:
              example:
                error: Campaign not found
                code: WATCH_LIST_IMPORT_LEADS_CAMPAIGN_NOT_FOUND
        '409':
          description: >-
            `WATCH_LIST_CAMPAIGN_IS_MANUAL` - the `campaignId` campaign was set
            up as a manual campaign and cannot take a signal trigger. No agent
            is created.
          content:
            application/json:
              example:
                error: >-
                  This campaign was set up as a manual campaign and cannot take
                  a signal trigger; create a signal-based campaign instead
                code: WATCH_LIST_CAMPAIGN_IS_MANUAL
        '429':
          description: Monitored-entity limit exceeded
          content:
            text/plain:
              example: Monitoring limit exceeded
        '500':
          description: Internal server error
          content:
            text/plain:
              example: Internal server error
components:
  schemas:
    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
    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
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

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