Collections
A collection is a named set of publications. Its whole purpose is scoping: search within it, or point an alert at it, so you are asking about a defined slice of the corpus rather than all of it.
"The fifteen shows our buyers actually listen to." "Climate newsletters." "Everywhere our competitor has ever been mentioned." Those are collections.
Two kinds
Global collections are curated by us — an editorial view of a space, kept up to
date as publications come and go. Every team can read them and nobody can edit them.
is_global tells them apart.
Your collections belong to your team. Only your team can see or change them.
Making one
curl -X POST -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Buyer podcasts", "description": "Shows our buyers actually listen to"}' \
"https://sputnikintelligence.com/api/v1/collections"
It is created empty. Find publications, then add them by slug:
curl -X POST -H "Authorization: Bearer $SPUTNIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"source_slugs": ["p2ab-99xz-c1dd", "m4kk-01qq-ll2e"]}' \
"https://sputnikintelligence.com/api/v1/collections/<slug>/sources"
Adding one that is already in is a no-op, so this is safe to retry.
Using one
# Search inside it
curl ... "https://sputnikintelligence.com/api/v1/posts/search?q=pricing&collection=<slug>"
# Read it chronologically
curl ... "https://sputnikintelligence.com/api/v1/posts?collection=<slug>"
An alert search takes the same
collection parameter, so a search you have tested can be lifted straight into an
alert without rewriting it.
Deleting
Deleting a collection removes the set, not the publications in it, and not any posts. Alerts scoped to it will stop being scoped — check them before you delete one they depend on.