Skip to content

Conversation

@VedranZoricic
Copy link
Contributor

@VedranZoricic VedranZoricic commented Feb 6, 2026

Summary

Intercom PR #468217 updates entity-level tag endpoints (contacts, conversations, tickets) to use VersionedTaggingPresenter, which adds applied_at and applied_by fields to tag responses. This PR updates the OpenAPI spec to match.

What changed

New fields on entity-level tag responses

POST and DELETE tag 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 applied
  • applied_by (object, nullable) — The admin who applied the tag

Both 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}) use TagResponse and don't return applied_at/applied_by. Their schema references are updated from tag to the existing tag_basic schema to reflect this. The full tag schema (with the new nullable fields) is used for entity-level endpoints.

Schema Used by
tag Entity tag endpoints, tag_list items
tag_basic POST /tags, GET /tags/{id}, company.tags.tags[], conversation part tags

tag schema updates

  • applied_at — added nullable: true
  • applied_by — changed to an inline object with nullable: true and allOf reference to reference schema

Endpoints with updated examples

Endpoint Change
GET /contacts/{id}/tags Example now includes applied_at/applied_by
POST /contacts/{id}/tags Example now includes applied_at/applied_by
DELETE /contacts/{id}/tags/{tag_id} Example now includes applied_at/applied_by
POST /conversations/{id}/tags Example now includes applied_at/applied_by
DELETE /conversations/{id}/tags/{tag_id} Example now includes applied_at/applied_by
POST /tickets/{id}/tags Example now includes applied_at/applied_by
DELETE /tickets/{id}/tags/{tag_id} Example now includes applied_at/applied_by

What stays the same

  • GET /contacts/{id}/tags keeps its original { type: "list", data: [...] } response envelope
  • Workspace-level GET /tags response structure is unchanged
  • Conversation object tags field is unchanged

Test plan

  • Verify the spec validates without errors
  • Confirm GET /contacts/{id}/tags example uses type: list / data envelope (not tag.list / tags)
  • Confirm entity-level POST/DELETE examples include applied_at and applied_by
  • Confirm workspace-level endpoints (POST /tags, GET /tags/{id}) reference tag_basic

VedranZoricic and others added 3 commits February 6, 2026 14:11
Update OpenAPI spec to reflect the VersionedTaggingPresenter changes:
- Change GET /contacts/{id}/tags schema from tag_list to tags
- Add applied_at and applied_by fields to all entity tag endpoint examples
  (contacts, conversations, tickets)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Workspace-level endpoints (GET /tags, POST /tags, GET /tags/{id}) and
embedded company tags use TagResponse, not VersionedTaggingPresenter,
so they don't include applied_at/applied_by fields.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
DELETE tag endpoints are idempotent - they return 200 OK even when the
tag wasn't applied. In that case, applied_at and applied_by are null.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@VedranZoricic VedranZoricic requested review from a team and levindixon February 9, 2026 10:58
The original Intercom PR was reverted and replaced with one that keeps
the existing { type: "list", data: [...] } envelope. Update the example
and schema reference (tags -> tag_list) to match, and use the full tag
schema for tag_list items so applied_at/applied_by are included.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@VedranZoricic VedranZoricic enabled auto-merge (squash) February 10, 2026 11:37
Copy link
Contributor

@levindixon levindixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢-it

@VedranZoricic VedranZoricic merged commit 8184aad into intercom:main Feb 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants