Add posts to collections, remove them, or replace their collections
Requires posts:write. Changes which collections up to 100 posts
already on the team are in, by postIds and/or links. Responds
200 immediately. Does not create posts and does not spend credits.
operation:
addputs each post in the listed collections and keeps the ones it is already inremovetakes each post out of the listed collectionssetreplaces every collection the post is in with the listed ones (collections: []takes it out of all of them)
collections takes the same refs as the add routes: { "id": "…" }
or { "name": "…" } (case-insensitive). On add and set a name
that matches no active collection creates a campaign (created: true),
but only when at least one named post is on the team. remove never
creates; an unknown name is 404 with error.code: collection_not_found. A name that matches more than one collection
is 409 collection_name_ambiguous, and an id on another team is 404.
Nothing is written in either case.
Post misses are per-post rows, as on POST /content/posts/tags:
not_on_team (link), not_found (id), duplicate_in_batch,
unsupported_platform, invalid_url. teamId targets an Enterprise
sub-team as on the other content routes.
Rate class content_post_collections (20 / minute, 500 / day per key).
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
add merges. remove drops the listed collections and never creates one.
set replaces every collection the post is in (collections: [] takes it out of all of them).
Must be non-empty for add and remove.
Post ids on the target team (from GET /posts)
Enterprise keys only — a sub-team of the key’s enterprise
Response
Membership update applied. Per-post rows give each post’s collections afterwards and what was rejected.
