Skip to navigation

Add, replace, or remove tags on posts already on the team

Requires posts:write. Updates content tags on up to 100 posts that are already on the team, by postIds and/or links. Responds 200 immediately. Does not create posts and does not spend credits.

operation:

  • add merges tags onto each post (case-insensitive; existing spelling wins)
  • set overwrites the post’s tags with tags (an empty list clears them)
  • replace swaps one tag for another (from → to) and leaves the other tags. A post that does not have from is rejected with tag_not_present
  • remove drops the listed tags (case-insensitive)

A leading # is stripped. A link that is not on the target team is rejected with not_on_team. An unknown post id, or one on another team, is not_found. The same post named twice is duplicate_in_batch and only the first reference is written. teamId targets an Enterprise sub-team as on the other content routes.

Rate class content_post_tags (20 / minute, 500 / day per key).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

OR
X-Api-Keystring
API Key authentication via header

Request

This endpoint expects an object.
operationenumRequired

add merges. set overwrites the tag list (tags: [] clears it). replace swaps from for to and leaves the other tags. remove drops the listed tags.

Allowed values:
tagslist of stringsOptional

Content tags for add, set, and remove. A leading # is dropped. Must be non-empty for add and remove.

fromstringOptional<=60 characters

replace only. The tag to swap out. Case-insensitive. A leading # is dropped.

tostringOptional<=60 characters

replace only. The tag to swap in. Other tags on the post stay.

postIdslist of stringsOptional

Post ids on the target team (from GET /posts)

teamIdstringOptional

Enterprise keys only — a sub-team of the key’s enterprise

Response

Tag update applied. Per-post rows say what changed and what was rejected.

dataobjectOptional
metaobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error