Add applied_at and applied_by fields to tag endpoint examples #360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Intercom PR #468217 updates entity-level tag endpoints (contacts, conversations, tickets) to use
VersionedTaggingPresenter, which addsapplied_atandapplied_byfields to tag responses. This PR updates the OpenAPI spec to match.What changed
New fields on entity-level tag responses
POSTandDELETEtag endpoints for contacts, conversations, and tickets now return two additional nullable fields:{ "type": "tag", "id": "123", "name": "Manual tag", "applied_at": 1663597223, "applied_by": { "type": "admin", "id": "456" } }applied_at(integer, nullable) — Unix timestamp of when the tag was appliedapplied_by(object, nullable) — The admin who applied the tagBoth fields are null when the tag wasn't actually applied (e.g., DELETE on an already-removed tag, which returns 200 OK).
Schema reference updates
Workspace-level endpoints (
POST /tags,GET /tags/{id}) useTagResponseand don't returnapplied_at/applied_by. Their schema references are updated fromtagto the existingtag_basicschema to reflect this. The fulltagschema (with the new nullable fields) is used for entity-level endpoints.tagtag_listitemstag_basicPOST /tags,GET /tags/{id},company.tags.tags[], conversation part tagstagschema updatesapplied_at— addednullable: trueapplied_by— changed to an inline object withnullable: trueandallOfreference toreferenceschemaEndpoints with updated examples
GET /contacts/{id}/tagsapplied_at/applied_byPOST /contacts/{id}/tagsapplied_at/applied_byDELETE /contacts/{id}/tags/{tag_id}applied_at/applied_byPOST /conversations/{id}/tagsapplied_at/applied_byDELETE /conversations/{id}/tags/{tag_id}applied_at/applied_byPOST /tickets/{id}/tagsapplied_at/applied_byDELETE /tickets/{id}/tags/{tag_id}applied_at/applied_byWhat stays the same
GET /contacts/{id}/tagskeeps its original{ type: "list", data: [...] }response envelopeGET /tagsresponse structure is unchangedtagsfield is unchangedTest plan
GET /contacts/{id}/tagsexample usestype: list/dataenvelope (nottag.list/tags)applied_atandapplied_byPOST /tags,GET /tags/{id}) referencetag_basic