Skip to content

Add descriptions/2.16 spec (WIP)#604

Draft
geetikabagga wants to merge 20 commits into
mainfrom
geetikabagga/openapi-v2.16
Draft

Add descriptions/2.16 spec (WIP)#604
geetikabagga wants to merge 20 commits into
mainfrom
geetikabagga/openapi-v2.16

Conversation

@geetikabagga

Copy link
Copy Markdown

Why?

Publish version 2.16 of the public REST API OpenAPI specification so SDKs and reference docs generate against the new numbered version.

How?

Seeds descriptions/2.16 as a copy of the 2.15 spec, with info.version bumped to 2.16 — so it advertises nothing not yet served. Follow-up commits graduate the endpoints and fields newly promoted to 2.16.

Draft / WIP. Remaining: add the newly-promoted endpoints and fields, reflect breaking changes, keep Preview-only changes out of 2.16, and confirm the spec lints/bundles clean.

Generated with Claude Code

geetikabagga and others added 18 commits July 22, 2026 17:06
Start v2.16 as a copy of the 2.15 spec so it advertises nothing not yet served;
graduated endpoints/fields are layered in via follow-up commits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contact owner_id (string), conversation priority levels, conversation
unassigned assignee (0), ticket assignee (integer), article parent_ids,
dedicated Conversation Attributes API, tags skip-missing, reporting
no-reply conversations, contacts/merge duplicate validation.
- Attachment files on admin ticket reply
- Change ticket type endpoint
- Link/unlink conversation to ticket endpoints
- previous_ticket_state_id on ticket response
- ticket_state_id on convert-conversation-to-ticket request

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…spec

- Content Snippets API (with agent-availability, audience_ids, markdown fields)
- Content Search API
- Content bulk actions API
- Content tagging endpoints (articles, internal articles, content snippets)
- Audiences API
- Data Connectors API

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Deleted conversations list, merge conversation, side conversations endpoints
- Sales agent, channel, external references, QA evaluations on conversations
- brand_id on conversation create; reply_to on conversation source
- retain_metrics parameter on conversation delete
- Conversation source author reshape; display_as plaintext behavior

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Contact banners API; contact merge history (endpoint, field, include_merge_history param)
- email_verified on contact create/update; company notes API and notes field
- update_last_request_at on company create

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…into v2.16 OpenAPI spec

- Admin role in responses; macros API; message status (WhatsApp) endpoints
- Team metrics API; office hours schedules & exceptions APIs
- Admin activity log event types & search endpoints
- Email message metadata history on conversation source
- reporting data export qualified_id

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…spec

- Article version history API; article fin statistics
- Agent availability, audit/suggestion, help-center audience, scheduled publishing fields
- audience_ids on articles and internal articles
- default & locales on help center response

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copies the Preview /contacts/search surface verbatim into 2.16: adds the
contact_search_request schema (sort.order enum ascending|descending),
repoints the requestBody $ref off shared search_request, adds the 400
invalid_sort_order response, and aligns the timestamp prose + adds the
formatted_phone searchable-field row.
Copies the Preview help_center redirects surface verbatim: the
/help_center/help_centers/{id}/redirects list+create and
/redirects/{id} retrieve+delete operations, plus the
help_center_redirect(_list), create_help_center_redirect_request and
deleted_help_center_redirect_object schemas. Distinct from the held
AddArticleUrlRedirects (different resource, schemas and Rails classes).
Adds the body_markdown property (verbatim from Preview) to the 7 article
schemas that gained it: article_content, article_list_item,
internal_article_list_item, and the create/update (internal_)article
request schemas, plus the accompanying 'in HTML / mutually exclusive with
body_markdown' body-description text. Surgical inserts only — held fields
(folder_id, parent_ids) and Preview-only draft fields are deliberately
excluded.
A merged contact now returns 410 Gone with a Link header to the canonical
contact on GET /contacts/{id} and GET /contacts/find_by_external_id/{id}.
Copies Preview's 410 'Contact Merged' response block + the 'Merged contacts
return 410 Gone' description on both retrieve operations, replacing the old
404 wording. Surgical — leaves unrelated formatted_phone example drift and
the pre-existing contact_id/id path-param naming untouched.
Replaces the 2.15-inherited GET /custom_object_instances/{type} operation
(getCustomObjectInstancesByExternalId, external_id required, single-object
response, ObjectNotFound) with Preview's listAll version (external_id
optional, custom_object_instances_paginated_list response, TypeNotFound),
and adds the custom_object_instances_paginated_list schema it references
(its pages_link + custom_object_instance refs already exist in 2.16).
… /messages placement

Graduate the AddWhatsappMessageSupport 2.16-cut change (send-path via the
messages endpoint), copying only the whatsapp surfaces from Preview and
excluding the still-held SMS support:
- createMessage operation description: add whatsapp, keep sms out
- create_message_request.message_type: add `whatsapp` enum value + description
  (sms omitted)
- create_message_request anyOf: add only the `whatsapp` branch (skip `sms`)
- requestBody example: add only admin_whatsapp_message_created (skip
  admin_sms_message_created and invalid_body_supplied_for_sms_message)

Also fix a pre-existing structural defect introduced in 728bd98: the
`/messages` path key had been left empty and the createMessage operation was
mislocated as a POST under `/messages/status`. Relocated the operation back
under `/messages`, restoring the Preview/2.15 layout (/messages -> post,
/messages/status -> get, /messages/whatsapp/status -> get).

Verified: YAML parses, all internal $refs resolve, whatsapp surfaces are
byte-identical to Preview, and no SMS surfaces leaked.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Full structural sweep of descriptions/2.16 found the same defect class fixed
for POST /messages in d50a0ae, present in 10 more paths (0 in 2.15 and
Preview). During earlier graduation commits, each newly-inserted path
appended an orphaned operation as a duplicate HTTP-method key under a
neighbouring path, leaving the correct path key null.

Impact before fix: 10 endpoints dead at their correct URL, ~8 newly-graduated
operations silently shadowed (yaml keeps the last duplicate method key) and
thus invisible to fern/SDK generation, and several operations reachable only
at the wrong URL. No text was lost and no operationId was duplicated, so
fern check, $ref resolution and operationId diffing all passed clean.

Relocated each orphaned operation block back to its correct path key:
- /me (identifyAdmin), /admins (listAdmins), /admins/activity_logs
  (listActivityLogs), /articles/{article_id} (retrieve/update/delete),
  /internal_articles/{internal_article_id} (retrieve/update/delete),
  /away_status_reasons (listAwayStatusReasons),
  /contacts/{contact_id}/unarchive (UnarchiveContact),
  /contacts/{contact_id}/block (BlockContact),
  /data_attributes/{data_attribute_id} (updateDataAttribute),
  /teams/{team_id} (retrieveTeam).

Verified: YAML parses; zero null paths; zero duplicate-method keys; all
$refs resolve; no duplicate operationIds; all 10 repaired paths match the
2.15 baseline exactly; previously-shadowed ops (listMacros, tag-detach,
audiences retrieve, office-hours list, teams metrics, etc.) now visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Take the richer Preview description of conversation_source: add the
`recipients` array (with its `type`, `email` and `drop_reason` item fields)
byte-identical to Preview. 2.15 and prior 2.16 lacked the field entirely.
The email_address_headers drop_reason surface is not present in Preview, so
it is not graduated here.

Verified: YAML parses, recipients block byte-identical to Preview.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Take the richer Preview description of the Articles draft surface (2.15 had
none). Graduated from Preview with the standard stable-version
normalizations:
- article_content + article_list_item: add has_unpublished_changes and
  draft_updated_at, dropping the "Only returned on the `Preview` API version"
  sentence (they are returned on 2.16).
- New paths /articles/{id}/draft (GET retrieveArticleDraft, PUT) and
  /articles/{id}/draft/publish (POST publishArticleDraft), dropping the
  "Set `Intercom-Version: Preview`." sentence from their descriptions.
- Add the publish_article_draft_request schema (byte-identical to Preview).

Verified: YAML parses, all $refs resolve, no null/duplicate-method paths, no
duplicate operationIds, no residual Preview-only markers in the graduated
surfaces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ects in v2.16

Normalization miss from the Help Center Redirects graduation (46de188): four
operation descriptions still instructed callers to set
`Intercom-Version: Preview`, which is wrong in a stable version spec. Removed
the sentence on the two redirect paths (read + read_write scopes), matching
how every other graduated surface drops the Preview-only marker.

Verified: YAML parses; zero residual "Intercom-Version: Preview" in 2.16.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@geetikabagga
geetikabagga marked this pull request as ready for review July 23, 2026 14:40

@shrek-intercom shrek-intercom Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

❌ PR Review Summary: NEEDS HUMAN REVIEW

Summary
🎯 Problem — The PR title and description clearly convey the motivation (publishing a new API version for SDK/docs generation) and approach, though they are slightly verbose with implementation details.
📝 Alignment — The description claims 2.16 is merely a copy of 2.15 with info.version bumped, but the actual file is ~45% larger (35,407 vs 24,471 lines), already containing entirely new endpoints (e.g., /macros, /macros/{id}) with 11,113 lines of content not present in 2.15.
ℹ️ 🧠 Correctness — Disabled for this repository.
🦺 Safety — Any change under descriptions/2.*/ — including adding a new versioned spec — constitutes a change to the released public contract and always requires human review.
🚦 Auto-approval — Within size limit (0/150 LOC).
Per-criterion details

Problem

Clear why (publish new API version for SDK/docs generation) and how (copy previous spec, bump version). The WIP nature and remaining tasks are documented. Slightly verbose with the implementation details, but the motivation is clear and upfront.

Alignment

Based on my analysis, the PR description claims that descriptions/2.16 is "a copy of the 2.15 spec, with info.version bumped to 2.16." However, the actual diff reveals:

  1. 2.16 is 35,407 lines while 2.15 is only 24,471 lines — the new file is ~45% larger
  2. 2.16 contains entirely new endpoints not present in 2.15, including Macros endpoints (/macros/{id}, /macros) with full operation definitions, examples, and error responses
  3. 11,113 lines exist in 2.16 that are not in 2.15 (after normalizing the version string), compared to only 177 lines in 2.15 not in 2.16
  4. There are substantial schema differences, new tags, and other additions beyond a simple version bump

The description explicitly states "it advertises nothing not yet served" and says "Follow-up commits graduate the endpoints and fields newly promoted to 2.16." But the spec already contains significant new content (like the Macros API) that doesn't exist in 2.15.

The PR description claims the 2.16 spec is seeded "as a copy of the 2.15 spec, with info.version bumped to 2.16" and "advertises nothing not yet served," with follow-up commits planned to add new endpoints. However, the actual file is dramatically different from 2.15:

  • 2.16 has 35,407 lines vs 2.15's 24,471 lines (~45% larger)
  • 2.16 already contains entirely new endpoints (e.g., /macros/{id}, /macros) with full specifications, examples, and error responses — these don't exist at all in 2.15
  • After normalizing version strings, there are 11,113 lines in 2.16 not in 2.15, indicating massive additions beyond a version bump

The claim that it's "a copy of the 2.15 spec with info.version bumped" is factually incorrect. The file already contains significant new API surface area. The description also says "Follow-up commits graduate the endpoints and fields newly promoted to 2.16," but these are already present in this commit. This is a material misrepresentation of what the code change actually contains.

Safety

This PR adds a new file at descriptions/2.16/api.intercom.io.yaml, which falls under the descriptions/2.*/ path. The safety criteria explicitly state that any change under descriptions/2.*/ — regardless of whether it's a new version or an edit to an existing one — constitutes a change to the released, frozen public contract and always requires human review. Creating a new numbered release version is a significant action that establishes a new public API contract and affects SDK generation, reference docs, and downstream consumers.

<violated_criteria>
Released version specs — any change under descriptions/2.*/ (or any released 1.x/2.x-era version dir). These are the published, frozen public contract; a released-version edit always needs human review.
</violated_criteria>

Rate this comment 👍 / 👎 to help us improve 🙏 · Disagree with assessment? Establish ground truth here

@geetikabagga
geetikabagga marked this pull request as draft July 23, 2026 15:14
geetikabagga and others added 2 commits July 23, 2026 16:29
PR 540055 cut v2.16, graduating these surfaces out of Unstable/Preview.
Strip their Preview-exclusive designation from descriptions/0 so Preview
only marks items still Preview after the cut:

- Remove "Set `Intercom-Version: Preview`." from graduated article
  draft/version/tagging, help-center-redirects and content endpoints
- Retarget their `intercom_version_preview` header ref to `intercom_version`
- Drop "Only returned on the `Preview` API version." from article draft fields
- De-Preview the Banners and Content tag descriptions and the bulk-content summary
- Restate the reporting-export version note as "from version 2.16 onward"

Still-Unstable surfaces keep their Preview markers (ecommerce catalog upload
header ref + schema, Fin capabilities version example).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cross-checked descriptions/2.16 against the v2.16 promoted set in PR 540055:

- Add 7 tag definitions for graduated APIs that operations referenced but
  were undefined (Audiences, Banners, Calls, Content, Content Snippets,
  Conversations Attributes, Data Connectors), normalizing Preview wording.
- Reunite 8 orphaned schema bodies with their empty top-level keys
  (app, away_status_reason_list, contact_blocked, content_sources_list,
  convert_visitor_request, update_conversation_attribute_request,
  merge_contacts_request, untag_company_request). Earlier graduation commits
  left each key null and its body absorbed as duplicate keys under a neighbour,
  silently corrupting both schemas — YAML-legal and invisible to fern check.
- Remove 3 stray duplicate `example` fragments that overwrote real values.

Result: 0 null paths, 0 duplicate keys, 0 dangling refs (was 33 dup keys).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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