Skip to content

Add OpenAPI spec for ticket linked conversations endpoints#483

Open
MatthewPelyhes wants to merge 1 commit intomainfrom
work/e3f3ecc7/worker
Open

Add OpenAPI spec for ticket linked conversations endpoints#483
MatthewPelyhes wants to merge 1 commit intomainfrom
work/e3f3ecc7/worker

Conversation

@MatthewPelyhes
Copy link
Copy Markdown

Why?

The API supports linking and unlinking conversations to tracker tickets, but the OpenAPI spec has no definitions for these endpoints. Without spec coverage, they won't appear in generated SDK clients (TypeScript, Java, Python, PHP), API explorers, or documentation.

How?

Added two new endpoint definitions to the Preview spec (descriptions/0/api.intercom.io.yaml), following the existing nested ticket sub-resource patterns (tags, change_type):

  • POST /tickets/{ticket_id}/linked_conversations — link a conversation to a tracker ticket
  • DELETE /tickets/{ticket_id}/linked_conversations/{id} — unlink a conversation from a tracker ticket

Both include full request/response schemas, inline examples, and error response documentation (400, 401, 404).

Implementation Plan

Endpoints Added

POST /tickets/{ticket_id}/linked_conversations

  • operationId: linkConversationToTicket
  • tags: [Tickets]
  • parameters: Intercom-Version header + ticket_id path param
  • requestBody: { conversation_id: string } (required)
  • 200 response: Conversation object via $ref: "#/components/schemas/conversation"
  • 400 response: 5 error examples: parameter_not_found, invalid_ticket_type, already_linked_to_tracker, linked_conversation_limit_exceeded, intercom_version_invalid
  • 404 response: 2 error examples: ticket_not_found, conversation_not_found
  • 401 response: Standard unauthorized

DELETE /tickets/{ticket_id}/linked_conversations/{id}

  • operationId: unlinkConversationFromTicket
  • tags: [Tickets]
  • parameters: Intercom-Version header + ticket_id + id path params
  • No requestBody (all params in path)
  • 200 response: Conversation object
  • 400 response: 2 error examples: invalid_ticket_type, intercom_version_invalid
  • 404 response: 2 error examples: ticket_not_found, conversation_not_found
  • 401 response: Standard unauthorized

Design Decisions

  1. Tags: [Tickets] only — these are ticket sub-resource operations, matching existing patterns like changeTicketType.
  2. Auth: Global bearerAuth — no per-endpoint scope overrides (follows spec convention).
  3. DELETE requestBody: Omitted — no body parameters needed.
  4. Insertion point: Between /tickets/{ticket_id}/tags/{id} and /tickets — sub-resources are grouped before collection endpoints.

Generated with Claude Code

Add two new endpoints to the Preview/Unstable spec:

- POST /tickets/{ticket_id}/linked_conversations
  Links a conversation to a tracker ticket. Returns the linked
  conversation object. Includes error handling for invalid ticket
  types, already-linked conversations, and limit exceeded.

- DELETE /tickets/{ticket_id}/linked_conversations/{id}
  Unlinks a conversation from a tracker ticket. Returns the
  unlinked conversation object.

Both endpoints follow existing nested ticket sub-resource patterns
(tags, change_type) with full error response examples, Intercom-Version
header, and Conversation schema references.

Companion to intercom/intercom#496216.
@MatthewPelyhes MatthewPelyhes self-assigned this May 6, 2026
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.

1 participant