Skip to main content

Update Keyword Alert

Updates an existing keyword alert.

Endpoint

PUT /api/keyword-alerts/{platform}/{id}

Path Parameters

ParameterTypeDescription
platformstringThe platform of the alert
idstringThe unique identifier of the alert

Request Body

Required Parameters

Column nameTypeDescription
keywordsstringThe keywords you want to monitor. Each keyword can be made of one or several words. You can specify up to 3 independent keywords that should ALL appear in the result. Separate multiple keywords with commas. Example: chatgpt, blog article, seo

Optional Parameters

Column nameTypeDescription
excluded_keywordsstringKeywords that should not appear in the results. You can specify up to 10 excluded keywords (5 for LinkedIn). Separate multiple keywords with commas. Example: spam, promotion, advertisement
included_usersstring(Reddit, Hacker News, X (Twitter), and Youtube only) Only monitor content from these specific users. Up to 3 users maximum. Not case sensitive. Example: maxai834, thebloke, badenergy12x
excluded_usersstring(Reddit, Hacker News, X (Twitter), and Youtube only) Do not monitor content from these users. Up to 3 users maximum. Not case sensitive. Example: maxai834, thebloke, badenergy12x
included_subredditsstring(Reddit only) Only monitor these specific subreddits. Up to 10 subreddits maximum. Not case sensitive, no 'r/' prefix. Example: marketing, saas, startups
excluded_subredditsstring(Reddit only) Do not monitor these subreddits. Up to 10 subreddits maximum. Not case sensitive, no 'r/' prefix. Example: marketing, saas, startups
public_facebook_group_urlstring(Facebook only) The URL of the public Facebook group to monitor. Example: https://www.facebook.com/groups/1234567890/
included_languagesstringOnly monitor content in these languages. Use ISO language codes. Up to 3 languages maximum. Example: en, fr, es
excluded_languagesstringDo not monitor content in these languages. Use ISO language codes. Up to 3 languages maximum. Example: en, fr, es
whole_words_onlyboolean(Reddit, Hacker News, and X (Twitter) only) Only match complete words. For example, if you monitor "kwatch", it won't match "kwatch.io". Use "true" or "false".
case_sensitiveboolean(Reddit and Hacker News only) Match exact case. For example, if you monitor "kwatch", it won't match "KWatch". Use "true" or "false".
search_postsboolean(Reddit, Hacker News, and X (Twitter) only) Monitor keywords in posts. Use "true" or "false".
search_commentsboolean(Reddit, Hacker News, and X (Twitter) only) Monitor keywords in comments. Use "true" or "false".
include_nsfwboolean(Reddit only) Include NSFW content. Use "true" or "false".
api_webhook_urlstringURL to send webhook notifications to.
slack_webhook_urlstringSlack webhook URL for notifications.
enabledbooleanWhether the alert should be active. Use "true" or "false".

Example Request

curl -X PUT "https://api.kwatch.io/api/keyword-alerts/twitter/123" \
-H "Authorization: Bearer your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"keywords": "updated keyword",
"excluded_keywords": "exclude this",
"search_posts": true,
"search_comments": false,
"included_users": "user1,user2",
"excluded_users": "user3",
"included_languages": "en,fr",
"excluded_languages": "es",
"api_webhook_url": "https://example.com/webhook",
"slack_webhook_url": "https://hooks.slack.com/...",
"enabled": true
}'

Example Response

{
"id": 123,
"keywords": "updated keyword",
"excluded_keywords": "exclude this",
"search_posts": true,
"search_comments": false,
"included_users": "user1,user2",
"excluded_users": "user3",
"included_languages": "en,fr",
"excluded_languages": "es",
"api_webhook_url": "https://example.com/webhook",
"slack_webhook_url": "https://hooks.slack.com/...",
"enabled": true,
"monthly_count": 42
}