2.3.0
Shipped in api@2.3.0.
- Archive and unarchive collections.
POST /collections/{collectionId}/archivearchives a collection, the same as Archive in the app, andPOST /collections/{collectionId}/unarchiverestores it. Archiving a campaign also archives the groups under it, and unarchiving restores them. Pass{ "includePosts": true }to archive or restore the collection’s posts too; by default they stay as they are. Both needposts:writeand do not spend credits. The response is the collection, withmeta.changed,meta.subcollectionIds, andmeta.posts(counts and any posts that failed to update). Changes appear in the team’s activity feed. See Collections and tags. - Archiving a campaign in the app archives its groups. Before, groups were only archived when the campaign’s posts were archived too.
2.2.0
Shipped in api@2.2.0.
- Create collections.
POST /collectionswith{ "name": "…" }creates an empty collection on your team, without adding posts or spending credits. It needsposts:write, the same scope that creates collections by name when adding posts.typedefaults tocampaign; pass"type": "group"with aparentIdto nest it. If an active collection on the team already has the name (in any casing), the request is a409witherror.code: collection_name_takenand the matching collection inerror.candidates, so use that id instead. Creating a collection while adding posts (collections: [{ "name": "…" }]onPOST /content/posts/addorPOST /content/accounts/add) works as before. - Add posts to collections, or take them out.
POST /content/posts/collectionschanges which collections posts already on the team are in, up to 100 posts per call by id and/or URL.addputs them in the listed collections,removetakes them out, andsetreplaces every collection they are in (collections: []clears them). Collections are named by id or name, as on the add routes;addandsetcreate a missing name, andremovenever does. It needsposts:write, does not spend credits, and has its own rate class,content_post_collections(20 / minute, 500 / day). Changes appear in the team’s activity feed. See Collections and tags. - Create and list content tags.
POST /tagswith{ "tags": ["…"] }saves tags on your team before any post has them, the same as creating a tag in the app’s tag picker (posts:write, up to 25 per call, 60 characters each).GET /tags(posts:read) lists every tag on the team with how many posts have it; saved tags on no post are listed atpostCount: 0. Put tags on posts or take them off withPOST /content/posts/tags, as before. That route now also keeps a tag on the team after you remove it from its last post, as the app does.PATCH /tags/{tag}with{ "name": "…" }renames a tag on every post that has it, merging into an existing tag of that name. Creating and renaming tags share a rate class,team_tags(5 / minute, 100 / day). Tag changes from the API and the app are now recorded in the team’s activity feed. See Collections and tags. - Tags are up to 60 characters everywhere. The app, saved tags,
POST /tags, andPATCH /tags/{tag}now take the same 60 characters as the add and tag routes. A tag longer than 30 characters is no longer dropped from the team’s saved tags. - Typed collection refs match in place. A collection ref with
typeorparentIdnow only matches a collection of that type under that parent. A name used elsewhere on the team is409 collection_name_takeninstead of silently reusing that collection. A bare{ "name": "…" }matches as before. A group’sparentIdmust be a campaign, and a group’s id is now a400.
