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

# Get Alert

> Retrieve an alert and the searches it produced

Each run of an alert produces a search. Fetch its leads with [Retrieve a Search](/api-reference/endpoints/searches/show) using the search `uuid`.


## OpenAPI

````yaml GET /alerts/{id}
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/{id}:
    get:
      summary: Retrieve an alert
      description: >-
        Returns an alert and the searches it produced, newest first. With a
        workspace key, any member's alert can be fetched.
      parameters:
        - name: id
          in: path
          required: true
          description: UUID of the alert
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The alert and its searches
          content:
            application/json:
              schema:
                type: object
                required:
                  - alert
                  - searches
                properties:
                  alert:
                    $ref: '#/components/schemas/Alert'
                  searches:
                    type: array
                    items:
                      $ref: '#/components/schemas/AlertSearch'
              example:
                alert:
                  uuid: 3f6c2a1e-9b8d-4c1f-a2e3-5d6f7a8b9c0d
                  name: Signal NEW_HIRES - 2025-01-03 17:35:33
                  alert_type: NEW_HIRES
                  frequency: DAILY
                  active: true
                  created_at: '2025-01-03T17:35:33.073Z'
                  latest_search_at: '2025-01-04T17:35:33.073Z'
                searches:
                  - uuid: 598267ec-ac11-41b3-849f-bd360b185b76
                    name: Signal NEW_HIRES - 2025-01-04
                    status: finished
                    created_at: '2025-01-04T17:35:33.073Z'
                    leads_count: 12
        '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 alert with this UUID belongs to your account (or, with a
            workspace key, to your workspace)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Alert not found
        '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
        frequency:
          type: string
          nullable: true
          enum:
            - DAILY
            - WEEKLY
            - MONTHLY
          example: DAILY
        active:
          type: boolean
          example: true
        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'
    AlertSearch:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          description: Search UUID, usable with `GET /searches/{id}`
          example: 598267ec-ac11-41b3-849f-bd360b185b76
        name:
          type: string
          example: Signal NEW_HIRES - 2025-01-04
        status:
          type: string
          nullable: true
          description: >-
            Lowercased search status, e.g. `finished`, `ongoing`, `not_started`,
            `error`
          example: finished
        created_at:
          type: string
          format: date-time
          example: '2025-01-04T17:35:33.073Z'
        leads_count:
          type: integer
          description: Number of leads in the search
          example: 12
    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.