Update Keyword Alert
Updates an existing keyword alert.
Endpoint
PUT /api/keyword-alerts/{platform}/{id}
Path Parameters
Parameter | Type | Description |
---|---|---|
platform | string | The platform of the alert |
id | string | The unique identifier of the alert |
Request Body
Required Parameters
Column name | Type | Description |
---|---|---|
keywords | string | The 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 name | Type | Description |
---|---|---|
excluded_keywords | string | Keywords 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_users | string | (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_users | string | (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_subreddits | string | (Reddit only) Only monitor these specific subreddits. Up to 10 subreddits maximum. Not case sensitive, no 'r/' prefix. Example: marketing, saas, startups |
excluded_subreddits | string | (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_url | string | (Facebook only) The URL of the public Facebook group to monitor. Example: https://www.facebook.com/groups/1234567890/ |
included_languages | string | Only monitor content in these languages. Use ISO language codes. Up to 3 languages maximum. Example: en, fr, es |
excluded_languages | string | Do not monitor content in these languages. Use ISO language codes. Up to 3 languages maximum. Example: en, fr, es |
whole_words_only | boolean | (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_sensitive | boolean | (Reddit and Hacker News only) Match exact case. For example, if you monitor "kwatch", it won't match "KWatch". Use "true" or "false". |
search_posts | boolean | (Reddit, Hacker News, and X (Twitter) only) Monitor keywords in posts. Use "true" or "false". |
search_comments | boolean | (Reddit, Hacker News, and X (Twitter) only) Monitor keywords in comments. Use "true" or "false". |
include_nsfw | boolean | (Reddit only) Include NSFW content. Use "true" or "false". |
api_webhook_url | string | URL to send webhook notifications to. |
slack_webhook_url | string | Slack webhook URL for notifications. |
enabled | boolean | Whether 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
}