Skip to content
Navigation

List alerts

GET
https://whyviral.ai/api/v1/alerts

What the project’s alert rules called out, newest first: mentions worth seeing, spikes, campaign posts with a problem and runs that were cut short. Free; reading one here doesn’t mark it read.

Authorization

  • bearer
    optional
    HTTP Bearer

    Authorization: Bearer <token>

  • apiKeyHeader
    optional
    API key in header

    x-api-key: <token>

Query parameters

  • project
    optional
    string

    A project’s id or exact name; case is ignored. Leave it out for the project active in the app.

  • unread
    optional
    boolean

    true for unread alerts only.

    default: false
  • kind
    optional
    string
    ·
    one of 7 values

    Only this kind.

    Allowed values: new_mention, negative, competitor, campaign, spike, run, balance
  • before
    optional
    string

    Only alerts older than this: the last answer’s next_before.

    format: date-time
  • limit
    optional
    integer

    How many rows, 1 to 50.

    maximum: 50 · minimum: 1 · default: 20

Returns

200

The alerts.

JSON
  • object
    string
    required
  • project
    object
    required
    • id
      string
      required

      The project’s id.

    • name
      string
      required

      Its name.

  • next_before
    required

    Send it as before for the next page; null on the last.

    Any of the following:

    • string
    • null
  • data
    array of
    object
    required
    • id
      string
      required

      The alert’s id.

    • object
      string
      required

      "alert".

    • kind
      string
      ·
      one of 7 values
      required

      What it is about; see the table below.

      Allowed values: new_mention, negative, competitor, campaign, spike, run, balance
    • source
      search
      or
      watch
      or
      campaign
      required

      The run that raised it: search, watch or campaign.

    • created_at
      required

      When it was raised.

      Any of the following:

      • string
      • null
    • read
      boolean
      required

      Whether it was marked read in the app.

    • tracker
      required

      {id, kind, name, own}: the tracker it is about; null for campaign, run and balance.

      Any of the following:

      • TrackerRef
        • id
          string
          required

          The tracker’s id.

        • kind
          brand
          or
          competitor
          or
          topic
          or
          hashtag
          or
          campaign_tag
          required

          brand (the project’s own), competitor, topic, hashtag or campaign_tag.

        • name
          string
          required

          Its name; a hashtag’s is the tag with its #.

        • own
          boolean
          required

          True for the project’s own brand.

      • null
    • mention
      required

      The mention of new_mention, negative and competitor: {id, where, quote, at_sec, sentiment, views, posted_at, post_url, creator}.

      Any of the following:

      • object
        • id
          string
          required

          The mention’s id.

        • where
          said
          or
          shown
          or
          written
          required
        • quote
          string
          required

          The post’s own words, verbatim.

        • at_sec
          required

          Any of the following:

          • number
          • null
        • sentiment
          required

          Any of the following:

          • string
            positive
            or
            neutral
            or
            negative
          • null
        • views
          required

          Any of the following:

          • integer
          • null
        • posted_at
          required

          Any of the following:

          • string
          • null
        • post_url
          required

          Any of the following:

          • string
          • null
        • creator
          required

          Any of the following:

          • object
            • id
              string
              required
            • platform
              tiktok
              or
              instagram
              or
              youtube
              or
              x
              required
            • handle
              string
              required

              Without @.

          • null
      • null
    • campaign_post
      required

      The post of campaign: {campaign, post_url, posted_at, views, problems, missing_terms, competitor}.

      Any of the following:

      • object
        • campaign
          object
          required
          • id
            string
            required
          • name
            string
            required
        • post_url
          string
          required
          format: uri
        • posted_at
          required

          Any of the following:

          • string
          • null
        • views
          required

          Any of the following:

          • integer
          • null
        • problems
          array of
          undisclosed
          or
          missing_terms
          or
          competitor
          required
        • missing_terms
          array of
          string
          required
        • competitor
          required

          Any of the following:

          • string
            The competitor it names.
          • null
      • null
    • spike
      required

      {day, mentions, mean}: a UTC day, its count and the mean of the seven days before.

      Any of the following:

      • object
        • day
          string
          required
          format: date
        • mentions
          integer
          required
          minimum: 0
        • mean
          number
          required
      • null
    • code
      required

      Why a run was limited, skipped or failed.

      Any of the following:

      • string
      • null
    • credits_left
      required

      The balance when a balance alert was raised.

      Any of the following:

      • integer
      • null

400

INVALID_REQUEST: The body isn’t JSON, its url is missing or too long, or a parameter has a value it doesn’t take. AMBIGUOUS_PROJECT: Several of your projects share the name you sent; pass the project’s id.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

401

INVALID_API_KEY: The key is missing, mistyped or revoked.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

403

ACCOUNT_DISABLED: The key’s account is disabled.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

404

NOT_FOUND: No read, project, creator, campaign or report like this on your account.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

429

RATE_LIMITED: Too many new reads, data requests, searches or report links; wait the Retry-After header’s seconds.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

500

INTERNAL: Something broke on our side; try again.
JSON
  • error
    object
    required

    Some codes add details, such as cap, required or balance.

    • code
      string
      ·
      one of 16 values
      required
      Allowed values: INVALID_REQUEST, UNSUPPORTED_LINK, INVALID_PERIOD, AMBIGUOUS_PROJECT, INVALID_REPORT, CREATOR_NOT_SAVED, TOO_MANY_REPORTS, INVALID_API_KEY, INSUFFICIENT_CREDITS, ACCOUNT_DISABLED, NOT_FOUND, TRACKER_NOT_FOUND, MONTHLY_LIMIT, RATE_LIMITED, INTERNAL, SEARCH_UNAVAILABLE
    • message
      string
      required

      What went wrong, in words.

Type to search…

↑↓ navigate↵ selectEsc close