Repository navigation
Align Preview and 2.17 specs with what the API sends and accepts - #735
Conversation
… and 2.17
- Add GET /subscription_types/{id}
- Use the /contacts/{id}/merge_histories path
- Rename visitor.last_request_at, article_statistics.conversations and conversation_part_metadata.quick_reply_option_uuid
- Use automatic as the sync_behavior value when updating content import sources
- Remove formatted_phone from the 2.17 contact search fields
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- GET /companies with company_id or name returns a single company
- Preview PUT /companies/{id} documents its request body
- GET /events returns an event list unless summary=true
- POST /events/summaries takes event_summaries as an array, plus id and email
- Getting a missing custom object instance returns 200 with found: false
- 2.17 article create/update accept parent_ids
- Internal article search results are top-level; list items use an integer id
- News items include published_at
- Content snippet availability fields and create defaults corrected
- Conversation teammates, ticket type attribute lists, phone switch,
SLA status and away status reasons use the actual field names
- 2.17 call transcript returns a JSON array of turns
- IP allowlist endpoints added to Preview
- Preview external pages document audience_ids; contacts include whatsapp_number
- Removed unused AI topics schemas from Preview
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
yasser-aboelgheit-intercom
left a comment
There was a problem hiding this comment.
Thanks, this is a big cleanup. I checked each change against the API's behaviour and the paths, names and shapes all hold up. A few questions before it lands:
update_company_request(Preview):custom_attributes.additionalPropertiesistype: string, but company updates also accept numbers, booleans and null, and the schema's own example sendstrueand155.5. Since this generates a newUpdateCompanyRequestBodytype in the Preview SDKs, could it use the sameanyOf(string / number / boolean, nullable) as the other custom attribute schemas?associated_to_phone_status: the API always sends this key and sendsnullwhen the reason isn't tied to a phone status. Withnullable: truebutnullmissing fromenum, strict validators reject that value. Could we addnullto the enum in both versions?GET /subscription_types/{id}: the operation description, theiddescription's trailing period and the 404 example'srequest_iddiffer from the other copy of this change. Which version should both settle on?- Since the Preview edits change generated SDK types (company and event
oneOfresponses, integer internal article ids, the transcript array, the new request body), would a short Risks note listing those help SDK users? - Smaller: should
update_company_requestalso listremote_created_at,session_countanduser_count, which update accepts? Andsizeis typed integer but its example is'100'.
~ Automated via Claude
- Company custom attribute values, in the create and update requests and the company response, may be strings (or null), integers, numbers or booleans, not only strings - Company request size example is now the integer 100 - Update company request documents remote_created_at, matching create-or-update - associated_to_phone_status enum now includes null, matching the nullable field Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…17-spec-alignment # Conflicts: # descriptions/2.17/api.intercom.io.yaml
|
Thanks! All addressed in 7300eb5:
Also merged main to resolve the conflict with #736 (the |
yasser-aboelgheit-intercom
left a comment
There was a problem hiding this comment.
Thanks, all addressed. Company custom attribute values now cover string, integer, number, boolean and null, null is in the associated_to_phone_status enum, and the Risks section is a good addition. Checked again on the latest head: the specs parse, every $ref resolves, operation IDs are only added, and fern check passes.
One note for whoever lands it: on 2.17 this also widens custom attribute values on the company response from string-only. That's correct, and it only loosens the type, but it does change the released contract. Is it worth a line in the changelog? Approving either way.
~ Automated via Claude
Why?
In a number of places the Preview and 2.17 specs describe paths, fields, response shapes and defaults that differ from what the API actually sends and accepts. SDKs generated from these specs inherit the same mistakes.
How?
Each change below was checked against the API's real behaviour. Operation IDs stay the same.
/contacts/{id}/merge_histories,last_request_at,conversations(article statistics),quick_reply_option_uuid,automatic(sync behaviour),canceled(SLA status), and theadmins,dataandurlproperties on conversation teammates, ticket type attribute lists and phone call redirects.GET /companieswithcompany_idornamereturns a single company.GET /eventsreturns an event list unlesssummary=true.200withfound: false.associated_to_phone_status, not timestamps.event_summariesis an array.parent_ids.PUT /companies/{id}documents its body.GET /subscription_types/{id}, the IP allowlist endpoints in Preview,published_aton news items,audience_idson Preview external pages, andwhatsapp_numberon Preview contacts.formatted_phonefrom the 2.17 contact search fields (Preview-only), and the unused AI topics schemas and example keys.Risks
The Preview SDK types change the next time the SDKs are generated. The 2.17 changes don't reach any SDK.
oneOfresponses:GET /companies(a company or a list),GET /events(a list or a summary) and retrieving a custom object instance (the instance, orfound: false).idbecomes an integer. The delete responseidstays a string.internal_articles.event_summariesbecomes an array.UpdateCompanyRequestBody.conversions→conversations,quick_reply_uuid→quick_reply_option_uuid,teammates→admins,las_request_at→last_request_at,ticket_type_attributes→data, and phone call redirectphone→url.cancelled→canceled,automated→automatic, andassociated_to_phone_statusgainsnull.ai_topicsschemas,created_at/updated_aton away status reasons, andtypeon internal article list items.Generated with Claude Code