Alerts

Update an alert

PATCH
/v1/alerts/{id}
AuthorizationBearer <token>

API key minted via POST /v1/api-keys (format mk_live_...)

In: header

Path Parameters

idstring

Alert id (feed_...).

Length1 <= length
name?string
Length1 <= length <= 80
enabled?boolean
mode?string
Value in"instant" | "hourly" | "daily" | "weekly"
filter?

Replaces the whole filter.

schedule?|null

Daily and weekly alerts. Ignored on an hourly one, except a weekday, which is refused.

event?string|null
Match^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$
Lengthlength <= 60
channelIds?array<string>

Replaces the whole list.

Itemsitems <= 20

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.mentio.dev/v1/alerts/feed_abc123" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "name": "string",
  "enabled": true,
  "mode": "instant",
  "filter": {
    "keywordIds": [
      "string"
    ],
    "groupIds": [
      "string"
    ],
    "platforms": [
      "bluesky"
    ],
    "minRelevance": 100,
    "minConfidence": 1,
    "sentiments": [
      "positive"
    ],
    "intents": [
      "string"
    ],
    "excludeAuthors": [
      "string"
    ],
    "minFollowers": 0,
    "tags": [
      "string"
    ],
    "linkHosts": [
      "string"
    ],
    "languages": [
      "string"
    ],
    "countries": [
      "us"
    ],
    "notCountries": [
      "us"
    ],
    "automated": true,
    "organization": true,
    "ratings": [
      1
    ],
    "notRatings": [
      1
    ],
    "minLikes": 0,
    "minReposts": 0,
    "minReplies": 0,
    "minQuotes": 0,
    "minViews": 0,
    "minBookmarks": 0,
    "anyOf": [
      {
        "q": "string",
        "keywordIds": [
          "string"
        ],
        "notKeywordIds": [
          "string"
        ],
        "keywordKinds": [
          "brand"
        ],
        "groupIds": [
          "string"
        ],
        "notGroupIds": [
          "string"
        ],
        "platforms": [
          "bluesky"
        ],
        "notPlatforms": [
          "bluesky"
        ],
        "status": "open",
        "relevant": true,
        "minRelevance": 100,
        "minConfidence": 1,
        "sentiments": [
          "positive"
        ],
        "notSentiments": [
          "positive"
        ],
        "intents": [
          "string"
        ],
        "notIntents": [
          "string"
        ],
        "automated": true,
        "languages": [
          "string"
        ],
        "notLanguages": [
          "string"
        ],
        "countries": [
          "us"
        ],
        "notCountries": [
          "us"
        ],
        "organization": true,
        "tags": [
          "string"
        ],
        "notTags": [
          "string"
        ],
        "linkHosts": [
          "string"
        ],
        "notLinkHosts": [
          "string"
        ],
        "subreddits": [
          "string"
        ],
        "notSubreddits": [
          "string"
        ],
        "minFollowers": 0,
        "maxFollowers": 0,
        "isReply": true,
        "kind": "post",
        "excludeAuthors": [
          "string"
        ],
        "ratings": [
          1
        ],
        "notRatings": [
          1
        ],
        "minLikes": 0,
        "minReposts": 0,
        "minReplies": 0,
        "minQuotes": 0,
        "minViews": 0,
        "minBookmarks": 0
      }
    ]
  },
  "schedule": {
    "hour": 23,
    "minute": 0,
    "timezone": "string",
    "skipEmpty": true,
    "weekday": 6
  },
  "event": "string",
  "channels": [
    {
      "id": "string",
      "kind": "slack",
      "label": "string"
    }
  ],
  "stats": {
    "sentLast7d": 0,
    "lastSentAt": "string",
    "nextRunAt": "string"
  },
  "createdAt": "string"
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}