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

# Create an Alert

> Track a search or a signal and get its new results on every run

An alert re-runs a search `daily`, `weekly` or `monthly` (default `daily`, and always `monthly` for `job_changes`) and only brings what is new since its previous run. Pick what it tracks with `type`. Every type takes `name` (required), `frequency` and `webhook_url`:

| `type` | Tracks | Same filters as | Each run is |
| - | - | - | - |
| `custom` (default) | A Sales Navigator people or company search | the app's **Custom** signal | a lead search or a company list |
| `social_listening` | One person's new LinkedIn posts, and who engages with them | [Post engagers](https://docs.pipecorn.com/api-reference/endpoints/signals/post_engagers.md) | a lead search |
| `job_posting` | Companies that start hiring for given roles | [Companies hiring](https://docs.pipecorn.com/api-reference/endpoints/signals/hiring.md) | a company list |
| `stack` | Companies that start using given technologies | [Tech stack](https://docs.pipecorn.com/api-reference/endpoints/signals/tech_stack.md) | a company list |
| `company_signal` | Companies that newly match funding, headcount growth or website traffic filters | [Account search](https://docs.pipecorn.com/api-reference/endpoints/accounts/search.md) with `live: false` | a company list |
| `new_hires` | People who just started a job matching given titles | [Advanced search](https://docs.pipecorn.com/api-reference/endpoints/leads/advanced_search.md) with `live: false`, or with `live: true` | a lead search |
| `job_changes` | Up to 10,000 contacts, reporting when they change company or get promoted | [Track job changes](https://docs.pipecorn.com/api-reference/endpoints/signals/track_job_changes.md) | a lead search |

`POST /alerts` creates every kind of alert. [Find new hires](https://docs.pipecorn.com/api-reference/endpoints/signals/find_new_hires.md) and [Track job changes](https://docs.pipecorn.com/api-reference/endpoints/signals/track_job_changes.md) still work but are deprecated in favour of `type: new_hires` and `type: job_changes`.

A key that the chosen type doesn't take is rejected with `422`, except for `custom`, which ignores unknown keys as it always has. Each alert counts against your plan's alert limit.

## Custom

Paste the URL of a LinkedIn Sales Navigator search, the same one you would paste in the app's **Custom** signal:

* A people search (`https://www.linkedin.com/sales/search/people...`) creates a `CUSTOM_LEAD` alert. Each run is a lead search.
* A company search (`https://www.linkedin.com/sales/search/company...`) creates a `CUSTOM_ACCOUNT` alert. Each run is a company list.

Pipecorn saves the search in your Sales Navigator account and runs it right away, then `daily`, `weekly` or `monthly` (default `daily`). After the first run, each run only picks up the results Sales Navigator reports as new since the previous one. `max_results` (1 to 2500, default 2500) caps the first run only.

Send `skip_first_run: true` to start from now instead. The alert doesn't run right away, so you don't receive, or pay for, the results that already match the search. Its first run happens at the next `daily`, `weekly` or `monthly` tick and only picks up the results that are new since the alert was created. Alerts say whether they skip their first run in `skip_first_run`.

## Social listening

Follows one person on LinkedIn, such as a competitor's founder, an influencer or a prospect. Each run picks up their new posts and extracts the people who reacted or commented into a lead search.

* `author_url` **(required)**: the person's LinkedIn profile (`https://www.linkedin.com/in/<name>`)
* `engagement_type`: `reactions`, `comments` or `all` (default)
* `exclude_people_from_same_company`: `true` drops the engagers who work at the author's company

The first run takes the author's 3 latest posts. With `skip_first_run: true`, it only takes posts published after the alert was created. Requires a connected LinkedIn account and the Growth plan. Below it, the request answers `403`. An `author_url` LinkedIn doesn't return answers `404`.

## Job posting

Each run adds the companies with new job postings matching your filters to a company list. It takes the filters of [Companies hiring](https://docs.pipecorn.com/api-reference/endpoints/signals/hiring.md), at the top level of the body: `selected_titles`, `excluded_titles`, `selected_keywords`, `excluded_keywords`, `included_locations`, `excluded_locations`, `company_size`, `included_industries`, `exclude_consulting_recruiting`, `exclude_internships` and `published_date`. `selected_titles` or `selected_keywords` is required. Job posting alerts always start from now. Part of the Growth plan; no LinkedIn connection needed.

## Tech stack

Each run adds the companies newly detected using your technologies to a company list. It takes the filters of [Tech stack](https://docs.pipecorn.com/api-reference/endpoints/signals/tech_stack.md): `stacks` (required), `stack_match`, `excluded_stacks`, `countries`, `included_industries`, `excluded_industries` and `company_size`. Resolve technology names with [Technology slug lookup](https://docs.pipecorn.com/api-reference/endpoints/miscellaneous/technologies.md). Tech stack alerts always start from now. Part of the Growth plan; no LinkedIn connection needed.

## Company signal

Runs a search on the Pipecorn company database and adds the companies that newly match to a company list. It takes the [database filters of the account search](https://docs.pipecorn.com/api-reference/endpoints/accounts/search.md#pipecorn-database-filters), and at least one of them must be a company signal:

* funding: `last_funding_within_days`, `min_last_funding_amount`, `max_last_funding_amount`
* headcount growth: `min_headcount_growth`, `max_headcount_growth`, `department_growths`
* website traffic: `min_monthly_visitors`, `max_monthly_visitors`, `min_monthly_visitor_growth`, `max_monthly_visitor_growth`

Firmographic filters (`included_industries`, `included_locations`, `company_size`, `min_revenue`…) narrow it. Company lists and `competitors_of` aren't supported in alerts. Each signal is part of a plan; a signal your plan doesn't include answers `403`. No LinkedIn connection needed.

## New hires

Each run brings the people who just started a job matching your titles, as a lead search. It takes `included_job_titles` (required), `excluded_job_titles`, `company_size`, `included_locations`, `excluded_locations`, `included_industries` and `excluded_industries`.

`live` picks where it runs:

* **`live: false` (default), the Pipecorn database.** No LinkedIn connection needed. Locations are Pipecorn database location IDs, from [Location IDs](https://docs.pipecorn.com/api-reference/endpoints/miscellaneous/location-ids.md) with `"source": "database"` (e.g. `country:fr`). It also takes `functions`, `seniority_levels`, `excluded_seniority_levels`, `years_in_current_position`, `years_at_current_company` and `keyword`, with the values of the [advanced search](https://docs.pipecorn.com/api-reference/endpoints/leads/advanced_search.md), and `hire_type`: `new_hire` for people who joined a new company, `promoted` for people who moved to a new role in the same company, or leave it out for both.
* **`live: true`, a Sales Navigator saved search.** Locations are Sales Navigator location IDs (`"source": "live"`). Pipecorn saves the search in your Sales Navigator account, so it needs a connected LinkedIn account with Sales Navigator and counts against its 50 saved searches. If LinkedIn refuses to save the search, no alert is created and the request answers `422`. The database-only filters above answer `422`.

A location ID from the other source answers `422`. The alert's `source` says which one it runs on: `database` or `sales_navigator`.

The two sources find new hires differently:

* On the database, a new hire is someone whose current role started in the last 90 days and who matches your filters. Each run leaves out the people earlier runs already delivered. Start dates come from the profiles in the Pipecorn database, so someone can show up a few weeks after they started. Each run brings at most 2,500 people.
* On Sales Navigator, each run brings what Sales Navigator reports as new results of the saved search since the previous run.

A database alert runs right away, on everyone matching who started their role in the last 90 days. Send `skip_first_run: true` to start from now instead: its first run then only brings the people who are new since the alert was created.

## Job changes

Tracks up to 10,000 `contacts` and reports when one of them changes company or gets promoted. Each contact needs `linkedin_url`, or all of `first_name`, `last_name` and `company_name`. Contacts are matched in the background, then a first check reports the moves of the last 90 days; later checks run every 30 days. Its `frequency` is `monthly`, the default: `daily` or `weekly` answers `400`. No LinkedIn connection needed.

## Get the new results

There are two ways to receive the results of each run:

* **Webhook.** Pass `webhook_url` and each run posts its results there when it finishes: lead runs post the same payload as [People search](https://docs.pipecorn.com/api-reference/endpoints/extract/leads.md), company runs the same payload as [Create a List](https://docs.pipecorn.com/api-reference/endpoints/lists/create.md). For custom lead alerts, `webhook_streaming: true` posts the leads one by one as they are found.
* **Polling.** Call [Retrieve an Alert](https://docs.pipecorn.com/api-reference/endpoints/alerts/show.md) with `since` set to the `checked_at` of your previous call. It returns only the runs created since then, each with a `results_url` to fetch its leads or companies. A run whose `status` is not `finished` yet is still running: fetch its `results_url` again later.

Delete the alert with [Delete an Alert](https://docs.pipecorn.com/api-reference/endpoints/alerts/destroy.md).

## Requirements and limits

* Custom alerts, and new hires alerts with `live: true`, need your LinkedIn account connected with Sales Navigator: the search is saved in it, and a Sales Navigator account holds at most 50 saved searches. Social listening alerts need a connected LinkedIn account. The other types need neither.
* Each alert counts against your plan's alert limit.
* Lead runs enrich the leads they find and spend credits like [People search](https://docs.pipecorn.com/api-reference/endpoints/extract/leads.md).


## OpenAPI

````yaml POST /alerts
openapi: 3.0.1
info:
  title: Pipecorn Alerts API
  description: Pipecorn Alerts API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.pipecorn.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /alerts:
    post:
      summary: Create an alert
      description: >-
        Create a recurring alert. `type` picks what it tracks: `custom`
        (default, a Sales Navigator search URL), `social_listening` (one
        person's new posts and their engagers), `job_posting` (companies
        hiring), `stack` (companies using technologies) `company_signal`
        (companies newly matching funding, headcount growth or website traffic
        filters on the Pipecorn database), `new_hires` (people starting a job
        matching given titles, on the Pipecorn database by default or on a Sales
        Navigator saved search with `live: true`) or `job_changes` (contacts
        changing jobs). Each type takes the filters of its one-off endpoint; a
        key the type doesn't take answers 422 (`custom` ignores unknown keys).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                type:
                  type: string
                  enum:
                    - custom
                    - social_listening
                    - job_posting
                    - stack
                    - company_signal
                    - new_hires
                    - job_changes
                  default: custom
                  description: What the alert tracks.
                name:
                  type: string
                  description: Name of the alert
                  example: VP Sales in France
                search_url:
                  type: string
                  format: uri
                  description: >-
                    `custom` only. Required for it. Sales Navigator search URL,
                    starting with `https://www.linkedin.com/sales/search/people`
                    (leads) or `https://www.linkedin.com/sales/search/company`
                    (accounts)
                  example: >-
                    https://www.linkedin.com/sales/search/people?query=(filters:List((type:CURRENT_TITLE,values:List((text:VP%20Sales,selectionType:INCLUDED)))))
                frequency:
                  type: string
                  enum:
                    - daily
                    - weekly
                    - monthly
                  default: daily
                  description: >-
                    How often the alert runs. Case-insensitive. A `job_changes`
                    alert only takes `monthly`, its default
                max_results:
                  type: integer
                  minimum: 1
                  maximum: 2500
                  default: 2500
                  description: >-
                    `custom` only. Maximum number of results the first run
                    extracts. Later runs pick up every new result
                webhook_url:
                  type: string
                  format: uri
                  description: >-
                    URL each run posts its results to when it finishes. Lead
                    runs post the same payload as `POST /leads`; company runs
                    post the same payload as `POST /lists`
                  example: https://hooks.example.com/pipecorn
                webhook_streaming:
                  type: boolean
                  default: false
                  description: >-
                    `custom` only. Lead alerts only. When `true`, leads are
                    posted to `webhook_url` one by one as they are found instead
                    of once the run finishes
                skip_first_run:
                  type: boolean
                  default: false
                  description: >-
                    When `true`, the alert starts from now: it does not run
                    right away, and its first run, at the next `frequency` tick,
                    only picks up the results that are new since the alert was
                    created
                live:
                  type: boolean
                  default: false
                  description: >-
                    `new_hires` only. `false` (default) runs the alert on the
                    Pipecorn people database: no LinkedIn connection needed, and
                    locations are Pipecorn database location IDs (`POST
                    /locations` with `"source": "database"`). `true` runs it on
                    a Sales Navigator saved search instead: it needs a connected
                    LinkedIn account with Sales Navigator, counts against its 50
                    saved searches, and locations are Sales Navigator location
                    IDs (`"source": "live"`). `functions`, `seniority_levels`,
                    `excluded_seniority_levels`, `years_in_current_position`,
                    `years_at_current_company`, `keyword` and `hire_type` only
                    work with `live: false`: with `live: true` they return
                    `422`. A non-boolean value returns `422`.
                  example: false
                author_url:
                  type: string
                  format: uri
                  description: >-
                    `social_listening` only. Required for it. LinkedIn profile
                    whose new posts the alert watches.
                  example: https://www.linkedin.com/in/jane-doe
                engagement_type:
                  type: string
                  enum:
                    - reactions
                    - comments
                    - all
                  default: all
                  description: '`social_listening` only. Which engagers each run extracts.'
                exclude_people_from_same_company:
                  type: boolean
                  description: >-
                    `social_listening` only. Drop the engagers who work at the
                    author's company.
                selected_titles:
                  type: array
                  items:
                    type: string
                  description: >-
                    `job_posting` only. Job titles of the openings to watch.
                    `selected_titles` or `selected_keywords` is required.
                excluded_titles:
                  type: array
                  items:
                    type: string
                  description: '`job_posting` only. Job titles of openings to ignore.'
                selected_keywords:
                  type: array
                  items:
                    type: string
                  description: '`job_posting` only. Keywords the job postings must mention.'
                excluded_keywords:
                  type: array
                  items:
                    type: string
                  description: '`job_posting` only. Keywords whose job postings are ignored.'
                exclude_consulting_recruiting:
                  type: boolean
                  description: >-
                    `job_posting` only. Ignore consulting and recruiting
                    companies.
                exclude_internships:
                  type: boolean
                  description: '`job_posting` only. Ignore internship postings.'
                published_date:
                  type: string
                  enum:
                    - last_24_hours
                    - last_7_days
                    - last_15_days
                    - last_30_days
                    - last_90_days
                    - last_180_days
                    - last_360_days
                  description: >-
                    `job_posting` only. Only count job postings published in
                    this window.
                stacks:
                  type: array
                  items:
                    type: string
                  description: >-
                    `stack` only. Required for it. Technology slugs, from `GET
                    /accounts/technologies`.
                stack_match:
                  type: string
                  enum:
                    - or
                    - and
                  default: or
                  description: '`stack` only. Whether companies use any or all of `stacks`.'
                excluded_stacks:
                  type: array
                  items:
                    type: string
                  description: '`stack` only. Technology slugs to exclude.'
                countries:
                  type: array
                  items:
                    type: string
                  description: '`stack` only. ISO country codes.'
                included_industries:
                  type: array
                  items:
                    type: string
                  description: >-
                    `job_posting`, `stack`, `company_signal` and `new_hires`.
                    LinkedIn industry IDs to include.
                excluded_industries:
                  type: array
                  items:
                    type: string
                  description: >-
                    `stack`, `company_signal` and `new_hires`. LinkedIn industry
                    IDs to exclude.
                company_size:
                  type: array
                  items:
                    type: string
                  description: >-
                    `job_posting`, `stack`, `company_signal` and `new_hires`.
                    Company size buckets.
                included_locations:
                  type: array
                  items:
                    oneOf:
                      - type: string
                      - type: integer
                  description: >-
                    `job_posting`: hiring location IDs. `company_signal`:
                    Pipecorn database location IDs (e.g. `country:fr`).
                    `new_hires`: Pipecorn database location IDs, or Sales
                    Navigator location IDs with `live: true`. An ID from another
                    source returns `422`.
                excluded_locations:
                  type: array
                  items:
                    oneOf:
                      - type: string
                      - type: integer
                  description: Same IDs as `included_locations`, to exclude.
                last_funding_within_days:
                  type: integer
                  description: >-
                    `company_signal` only. Companies that raised within this
                    many days. A company signal.
                min_headcount_growth:
                  type: number
                  description: >-
                    `company_signal` only. Minimum company headcount growth, in
                    percent. A company signal. See the account search for the
                    other headcount, funding and traffic filters, which
                    `company_signal` takes too.
                min_monthly_visitors:
                  type: integer
                  description: >-
                    `company_signal` only. Minimum monthly website visitors. A
                    company signal.
                included_job_titles:
                  type: array
                  items:
                    type: string
                  description: >-
                    `new_hires` only. Required for it. Job titles the new hires
                    must hold.
                excluded_job_titles:
                  type: array
                  items:
                    type: string
                  description: '`new_hires` only. Job titles to exclude.'
                functions:
                  type: array
                  items:
                    type: string
                    enum:
                      - '1'
                      - '2'
                      - '3'
                      - '4'
                      - '5'
                      - '6'
                      - '7'
                      - '8'
                      - '9'
                      - '10'
                      - '11'
                      - '12'
                      - '13'
                      - '14'
                      - '15'
                      - '16'
                      - '17'
                      - '18'
                      - '19'
                      - '20'
                      - '21'
                      - '22'
                      - '23'
                      - '24'
                      - '25'
                      - '26'
                  description: >-
                    `new_hires` with `live: false` only. LinkedIn function
                    (department) IDs (`FUNCTION`). Multiple IDs are combined
                    with OR logic.


                    ID → value: 1 Accounting; 2 Administrative; 3 Arts and
                    Design; 4 Business Development; 5 Community and Social
                    Services; 6 Consulting; 7 Education; 8 Engineering; 9
                    Entrepreneurship; 10 Finance; 11 Healthcare Services; 12
                    Human Resources; 13 Information Technology; 14 Legal; 15
                    Marketing; 16 Media and Communication; 17 Military and
                    Protective Services; 18 Operations; 19 Product Management;
                    20 Program and Project Management; 21 Purchasing; 22 Quality
                    Assurance; 23 Real Estate; 24 Research; 25 Sales; 26
                    Customer Success and Support.
                  example:
                    - '25'
                seniority_levels:
                  type: array
                  items:
                    type: string
                    enum:
                      - '100'
                      - '110'
                      - '120'
                      - '130'
                      - '200'
                      - '210'
                      - '220'
                      - '300'
                      - '310'
                      - '320'
                  description: >-
                    `new_hires` with `live: false` only. LinkedIn seniority
                    level IDs (`SENIORITY_LEVEL`).


                    ID → value: 100 In Training; 110 Entry Level; 120 Senior;
                    130 Strategic; 200 Entry Level Manager; 210 Experienced
                    Manager; 220 Director; 300 Vice President; 310 CXO; 320
                    Owner / Partner.
                  example:
                    - '300'
                    - '310'
                excluded_seniority_levels:
                  type: array
                  items:
                    type: string
                    enum:
                      - '100'
                      - '110'
                      - '120'
                      - '130'
                      - '200'
                      - '210'
                      - '220'
                      - '300'
                      - '310'
                      - '320'
                  description: >-
                    `new_hires` with `live: false` only. LinkedIn seniority
                    level IDs to exclude, on the same scale as
                    `seniority_levels`.
                  example:
                    - '100'
                    - '110'
                years_in_current_position:
                  type: array
                  items:
                    type: string
                    enum:
                      - '1'
                      - '2'
                      - '3'
                      - '4'
                      - '5'
                      - '6'
                      - '7'
                      - '8'
                  description: >-
                    `new_hires` with `live: false` only. Bucketed years in the
                    current position: `"1"` less than 1 year, `"2"` 1 to 2
                    years, `"3"` 3 to 5 years, `"4"` 6 to 10 years, `"5"` more
                    than 10 years.
                  example:
                    - '3'
                years_at_current_company:
                  type: array
                  items:
                    type: string
                    enum:
                      - '1'
                      - '2'
                      - '3'
                      - '4'
                      - '5'
                      - '6'
                      - '7'
                      - '8'
                  description: >-
                    `new_hires` with `live: false` only. Bucketed years at the
                    current company: `"1"` less than 1 year, `"2"` 1 to 2 years,
                    `"3"` 3 to 5 years, `"4"` 6 to 10 years, `"5"` more than 10
                    years.
                  example:
                    - '2'
                    - '3'
                keyword:
                  type: string
                  description: >-
                    `new_hires` with `live: false` only. Free-text keyword
                    matched against the people database profiles.
                  example: saas
                hire_type:
                  type: string
                  enum:
                    - new_hire
                    - promoted
                  description: >-
                    `new_hires` with `live: false` only. `new_hire` keeps only
                    people who joined a new company; `promoted` only people who
                    moved to a new role in the same company. Leave it out to get
                    both.
                  example: new_hire
                contacts:
                  type: array
                  maxItems: 10000
                  description: >-
                    `job_changes` only. Required for it. Each contact needs
                    `linkedin_url`, or all of `first_name`, `last_name` and
                    `company_name`.
                  items:
                    type: object
                    properties:
                      linkedin_url:
                        type: string
                        format: uri
                      first_name:
                        type: string
                      last_name:
                        type: string
                      company_name:
                        type: string
            examples:
              custom:
                summary: Custom (Sales Navigator search)
                value:
                  name: VP Sales in France
                  search_url: >-
                    https://www.linkedin.com/sales/search/people?query=(filters:List((type:CURRENT_TITLE,values:List((text:VP%20Sales,selectionType:INCLUDED)))))
                  frequency: daily
                  webhook_url: https://hooks.example.com/pipecorn
              social_listening:
                summary: Social listening
                value:
                  type: social_listening
                  name: Jane's posts
                  author_url: https://www.linkedin.com/in/jane-doe
                  engagement_type: all
              job_posting:
                summary: Job posting
                value:
                  type: job_posting
                  name: AE hiring in France
                  selected_titles:
                    - Account Executive
                  included_locations:
                    - 2988507
                  frequency: weekly
              stack:
                summary: Tech stack
                value:
                  type: stack
                  name: Shopify stores
                  stacks:
                    - shopify
                  countries:
                    - FR
              company_signal:
                summary: Company signal
                value:
                  type: company_signal
                  name: Freshly funded SaaS
                  last_funding_within_days: 90
                  included_industries:
                    - '4'
                  skip_first_run: true
              new_hires:
                summary: New hires
                value:
                  type: new_hires
                  name: New sales leaders
                  included_job_titles:
                    - VP Sales
                    - Head of Sales
                  included_locations:
                    - country:fr
                  hire_type: new_hire
                  frequency: weekly
              new_hires_sales_navigator:
                summary: New hires on Sales Navigator
                value:
                  type: new_hires
                  name: New sales leaders
                  included_job_titles:
                    - VP Sales
                    - Head of Sales
                  included_locations:
                    - '105015875'
                  frequency: weekly
                  live: true
              job_changes:
                summary: Job changes
                value:
                  type: job_changes
                  name: Champions
                  contacts:
                    - linkedin_url: https://www.linkedin.com/in/jane-doe
                    - first_name: John
                      last_name: Roe
                      company_name: Acme
      responses:
        '201':
          description: The alert was created and its first run started
          content:
            application/json:
              schema:
                type: object
                required:
                  - alert
                properties:
                  alert:
                    $ref: '#/components/schemas/Alert'
              example:
                alert:
                  uuid: 3f6c2a1e-9b8d-4c1f-a2e3-5d6f7a8b9c0d
                  name: VP Sales in France
                  alert_type: CUSTOM_LEAD
                  frequency: DAILY
                  active: true
                  webhook_url: https://hooks.example.com/pipecorn
                  skip_first_run: false
                  created_at: '2026-11-03T09:00:00.000Z'
                  latest_search_at: '2026-11-03T09:00:01.000Z'
        '400':
          description: Invalid parameters, or a plan or Sales Navigator limit is reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_name:
                  summary: Missing name
                  value:
                    error: name is required
                invalid_url:
                  summary: Not a Sales Navigator search URL
                  value:
                    error: >-
                      search_url must be a Sales Navigator people or company
                      search URL
                invalid_frequency:
                  summary: Unknown frequency
                  value:
                    error: 'frequency must be one of: daily, weekly, monthly'
                invalid_max_results:
                  summary: max_results out of range
                  value:
                    error: max_results must be an integer between 1 and 2500
                alert_limit:
                  summary: Alert limit reached
                  value:
                    error: >-
                      You have reached the maximum number of alerts in your
                      plan. Reach out to support if you need more alerts.
                saved_search_limit:
                  summary: 50 Sales Navigator saved searches reached
                  value:
                    error: You have reached the maximum number of saved searches
        '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
        '403':
          description: >-
            The plan doesn't include this signal (social listening, job posting
            and tech stack need the Growth plan; company signals depend on the
            signal).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: >-
                  This signal is part of a higher plan. Upgrade to save these
                  companies to a list.
        '404':
          description: '`social_listening`: LinkedIn doesn''t return `author_url`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: author_url was not found on LinkedIn
        '422':
          description: >-
            Invalid `webhook_url`, LinkedIn not connected, or the alert could
            not be created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_webhook:
                  summary: Invalid webhook_url
                  value:
                    error: Invalid webhook_url format
                linkedin_missing:
                  summary: LinkedIn not connected
                  value:
                    error: >-
                      LinkedIn credentials not found. Please connect your
                      LinkedIn account.
                creation_failed:
                  summary: Sales Navigator refused the saved search
                  value:
                    error: >-
                      Failed to create alert - Sales Navigator did not create
                      the saved search for this alert
        '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.
components:
  schemas:
    Alert:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          example: 3f6c2a1e-9b8d-4c1f-a2e3-5d6f7a8b9c0d
        name:
          type: string
          example: Signal NEW_HIRES - 2025-01-03 17:35:33
        alert_type:
          type: string
          enum:
            - NEW_HIRES
            - JOB_CHANGES
            - JOB_POSTING
            - SOCIAL_LISTENING
            - STACK
            - CUSTOM_LEAD
            - CUSTOM_ACCOUNT
            - COMPANY_SIGNAL
          example: NEW_HIRES
        source:
          type: string
          enum:
            - database
            - sales_navigator
            - linkedin
            - job_postings
          description: >-
            Where the alert runs. `database`: the Pipecorn database
            (`company_signal`, `job_changes`, and `new_hires` created with
            `live: false`). `sales_navigator`: a saved search in your Sales
            Navigator account (`custom`, and `new_hires` created with `live:
            true`). `linkedin`: LinkedIn posts (`social_listening`).
            `job_postings`: job postings data (`job_posting` and `stack`).
          example: database
        frequency:
          type: string
          nullable: true
          enum:
            - DAILY
            - WEEKLY
            - MONTHLY
          example: DAILY
        active:
          type: boolean
          example: true
        webhook_url:
          type: string
          format: uri
          nullable: true
          description: >-
            URL each run posts its results to. `null` if the alert has no
            webhook
          example: https://hooks.example.com/pipecorn
        skip_first_run:
          type: boolean
          description: '`true` if the alert was created with its first run disabled'
          example: false
        created_at:
          type: string
          format: date-time
          example: '2025-01-03T17:35:33.073Z'
        latest_search_at:
          type: string
          format: date-time
          nullable: true
          description: When the alert last produced a search. `null` if it has not run yet
          example: '2025-01-04T17:35:33.073Z'
    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.
  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.