Alerts
MarkdownGet an alert when there is a new post that matches one or more search queries.
Alerts are delivered by email. A project holds the list of email addresses and how often they are emailed.
Alerts and Projects
Alerts live in Projects, so that you can organize them.
Project one thing you monitor, usually one customer or competitor
Alert one notification, on or off
Search what it looks for. An alert can have up to 10 searches.
Email is set on the project, not on each alert:
Project
Email addresses who gets the email
Frequency hourly, daily or weekly
A post creates a hit when any one of the alert's searches matches it.
Setting one up
1. Test the query first
Try some searches, and look at the results. An alert is only as good as its query.
curl -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-G --data-urlencode 'q="Acme Corp" OR "acme.com"' \
--data-urlencode 'window=month' \
"https://sputnikintelligence.com/api/v1/posts/search"
If you get too many results, tighten the phrase. If you get nothing, your brand name may be a common word. Pair it with something: "Acme" AND (pricing OR funding). See Search.
2. Create a project
Every alert belongs to a project. A project is one thing you monitor, usually one of your customers or one competitor. It keeps fifty alerts organised, and it lets you switch off a whole customer's monitoring in one move.
curl -X POST -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp"}' \
"https://sputnikintelligence.com/api/v1/projects"
3. Create the alert
You can give it its first search in the same call.
curl -X POST -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme brand mentions",
"project": "<project-slug>",
"search": { "q": "\"Acme Corp\" OR \"acme.com\"", "name": "Brand" }
}' \
"https://sputnikintelligence.com/api/v1/alerts"
4. Set who gets the email
Email is set on the project. A project you create starts with your own address. If nobody is on the list, the alerts still find hits and tell nobody. This is the most common reason someone thinks their alert is broken.
emails replaces the whole list, so send every address you want. email_frequency is hourly, daily (the default) or weekly.
curl -X PATCH -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"emails": ["you@example.com", "colleague@example.com"], "email_frequency": "daily"}' \
"https://sputnikintelligence.com/api/v1/projects/<project-slug>"
Context filter
An alert can have a context filter: one plain-English sentence, up to 500 characters, that says what you want from the posts the searches find. For example:
only about artificial intelligence in the context of its politics
A search for "artificial intelligence" finds every post that mentions it, including a newsletter about homelessness that mentions it once in passing. The filter keeps the passages that are about what you asked for and hides the rest.
How it works:
- Each passage a search finds is scored from 0 to 1 against your filter. A passage is kept at a score of 0.5 or higher and hidden below that.
- A post is listed if at least one of its passages is kept. Only the kept passages are shown under it. A post where every passage is hidden is not listed or emailed.
- Hidden passages are not deleted. On the alert's Hits page, "N hidden by filter" under a post shows its hidden passages with their scores, and a switch at the top lists the posts that were hidden completely. Use them to check the filter. Over the API, pass
include_hidden=truetoGET /alert-hits. - A post appears once its passages have been scored, normally within the hour. Until then it is not emailed or returned by
GET /alert-hits, and the Hits page marks it "Waiting for the filter". If scoring is down for a day, the passages are shown unfiltered rather than held back. - A changed filter applies to new matches only. Passages already scored are not scored again, and removing the filter leaves past passages as they are.
Set it when you create the alert, or later with PATCH /alerts/<slug>:
curl -X PATCH -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"context_filter": "only about artificial intelligence in the context of its politics"}' \
"https://sputnikintelligence.com/api/v1/alerts/<slug>"
Send null or an empty string to remove it.
Try it before saving
A preview scores the alert's passages from the last 7 days (up to 50, newest first) against a filter you give it, and says which would be kept and which hidden. Nothing is saved. In the app it is the Preview button next to the filter field. Over the API:
curl -X POST -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"filter": "only about artificial intelligence in the context of its politics"}' \
"https://sputnikintelligence.com/api/v1/alerts/<slug>/filter-preview"
Each passage comes back with its score and whether it was kept, plus counts of kept, hidden and failed. A new alert has nothing to preview yet. Over MCP it is the preview_alert_filter tool.
Where alerts can deliver
Email. Any address, including addresses outside your team, up to 20 per project. Each address gets its own email, so people on the list do not see each other. One email covers every alert in the project, with the posts grouped under each alert's name. Each post is listed once, with its matched passages under it. When the alert has several searches, each passage says which search found it. Up to 10 posts show per alert and up to five passages per post; the rest are on Sputnik.
Unsubscribing. Every email ends with an unsubscribe link for that address. It opens a page on Sputnik with one button that takes the address off this project's list, and, when the address is on other projects' lists too, a second button that takes it off all of them. No login is needed. The project's address list shows the change straight away, so check it if someone stops getting emails.
How often email goes out
We look for new matches every hour. How often you get an email is a setting on the project:
| Frequency | When it is sent |
|---|---|
hourly |
At 10 minutes past every hour, if there is something new |
daily (default) |
Every day at 13:10 UTC (9:10 in New York) |
weekly |
Every Monday at 13:10 UTC |
Times are UTC. There is no time zone setting yet. Mentions found between emails wait and arrive in the next one, so a daily email holds everything from the last day. A send with nothing new sends no email.
Reading hits over the API
Hits are readable whether or not you set up delivery. This suits an agent that checks on its own schedule.
curl -H "Authorization: Bearer $SPUTNIK_TOKEN" \
"https://sputnikintelligence.com/api/v1/alert-hits?alert=<slug>"
The next_cursor on this endpoint is a resume token. Store it and pass it back to get only what has arrived since. It keeps coming back non-null even when there is nothing new, so poll it on a schedule.
Each hit carries the post, its excerpts and which search found each one. A post appears once per alert, even when several searches match it. A long transcript that mentions your term five times gives five excerpts.
If the alert has a context filter, only hits with at least one kept passage are returned, each with only its kept passages and a hidden_excerpt_count. Add include_hidden=true to also get hidden hits and passages; every passage then carries its filter_score, filter_text (the filter wording it was scored against, kept even if you edit the filter later) and shown. A hit appears once its passages are scored, normally within the hour. The page stops before the oldest hit still waiting, and next_cursor does not move past it, so no hit is skipped. Hits that arrived after it show up on a later poll.
Rules worth knowing
An alert starts from now. A new search finds hits from the next run onward, and the first run looks back one day. It does not sweep the archive. Use search for history.
Editing a search applies forward. Changing a query does not re-run it over the past.
Deleting a search switches it off instead of removing it. Past hits exist because that search found them. Set is_active back to true to restore it.
Adding an address does not replay history. When the first address is added to a project, everything its alerts already found counts as sent. An address added later gets what is waiting for the next email and what is found after that, not everything found before.
Archiving a project switches off every alert in it. Un-archiving the project leaves those alerts off. You turn them back on yourself.
If an alert goes quiet
- Check the project has email addresses (
GET /api/v1/projects/<project-slug>), and check itsemail_frequency: a daily project sends once a day. - Run the query as a search. If search finds nothing this week either, the alert is working.