Skip to navigation

2.3.0

Shipped in api@2.3.0.

  • Archive and unarchive collections. POST /collections/{collectionId}/archive archives a collection, the same as Archive in the app, and POST /collections/{collectionId}/unarchive restores 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 need posts:write and do not spend credits. The response is the collection, with meta.changed, meta.subcollectionIds, and meta.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 /collections with { "name": "…" } creates an empty collection on your team, without adding posts or spending credits. It needs posts:write, the same scope that creates collections by name when adding posts. type defaults to campaign; pass "type": "group" with a parentId to nest it. If an active collection on the team already has the name (in any casing), the request is a 409 with error.code: collection_name_taken and the matching collection in error.candidates, so use that id instead. Creating a collection while adding posts (collections: [{ "name": "…" }] on POST /content/posts/add or POST /content/accounts/add) works as before.
  • Add posts to collections, or take them out. POST /content/posts/collections changes which collections posts already on the team are in, up to 100 posts per call by id and/or URL. add puts them in the listed collections, remove takes them out, and set replaces every collection they are in (collections: [] clears them). Collections are named by id or name, as on the add routes; add and set create a missing name, and remove never does. It needs posts: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 /tags with { "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 at postCount: 0. Put tags on posts or take them off with POST /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, and PATCH /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 type or parentId now only matches a collection of that type under that parent. A name used elsewhere on the team is 409 collection_name_taken instead of silently reusing that collection. A bare { "name": "…" } matches as before. A group’s parentId must be a campaign, and a group’s id is now a 400.