Repository navigation
Align the 2.17 and Preview companies endpoints with what the API does - #758
Merged
Merged
Conversation
Gives company.notes the list shape the API sends, switches the page-number lists to pages_link, splits out the search response, documents the 400s and 503s the API returns, and adds the accepted OAuth scopes to most operations. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The create and update company requests reject an array value with a 400, reference attributes included, which is what the scalar-only schema already says. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With `type` set to `user` or `users`, both retrieve-company operations return a paged `user.list` of the company's users instead of the company, so each 200 now lists that shape too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The search Pagination note said a cursor sent with a different sort returns a 400. Only a cursor from a text sort sent with a number or date sort, or the other way round, gets the 400. Other sort changes are accepted and return a page that doesn't follow on. Puts back the scroll network-timeouts admonition. Also documents the users-mode 400s on retrieving a company by id, adds maximum: 60 to per_page on both retrieve operations, says the company list and user list send pages.next as null on the last page, and says a monthly_spend of 2147483647, or -2147483648 or below, returns a 422. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Applies the 2.17 Companies changes from #758 to the Preview spec, merged operation by operation so Preview-only content is kept: the {id} path parameter name and the update request without the bad_request example. Preview already had notes in the company examples and update_last_request_at in the update request, so those keep their place and take the 2.17 values. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
cathalging
approved these changes
Oct 22, 2026
cathalging
left a comment
Contributor
There was a problem hiding this comment.
Approving. One existing sentence is worth fixing here or in a follow-up, your call: the companies scroll warning (2.17 L9034, Preview L7794). When the scroll fails on a network error, the API returns a generic 500 server_error rather than the quoted message. The open scroll also isn't cleared, so starting a new one within a minute returns 400 scroll_exists. Suggest saying the request returns a 500, and to wait up to a minute before starting a new scroll.
~ Automated via Claude (about: https://github.com/intercom/claude-plugins/blob/main/plugins/base/docs/external-message-attribution.md)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why?
The 2.17 spec for the companies endpoints didn't match the API.
company.noteshad a shape the API never sends, the lists described cursor paging where the API pages by number, and most error responses were missing. The Preview spec had the same problems, and the next version is cut from Preview, so it needs the same fixes.How?
Corrects the companies endpoints and company schemas to match the API's current behaviour, and adds the OAuth scopes each endpoint accepts to its description. The same changes go into the Preview spec, keeping content that only applies to Preview, such as the
{id}path parameter name.Risks
The Preview SDKs are generated from this spec, so these changes affect generated Preview types:
Company.notesbecomes a list object (type,data,url,total_count,has_more) instead of anotesarraynotes.notesCompanyNotelosescreated_at,companyandauthor, gainsurl, and theCompanyNoteCompanytype is removedCompanyList.pagesbecomesPagesLinkinstead ofCursorPagespages.nextas an objectCompanyScroll.pagesis no longerCursorPagesand is alwaysnullpagesnullCompanySearchResponseinstead ofCompanyListCompanyor a newCompanyUserListinstead of onlyCompanyCompanywithout narrowingtypeisuserorusersCompanyUserListas a third response shapetypeisuserorusersandcompany_idornameis setorderbecomes anasc/descenum, and both retrieve operations gain atypeenumordervalues were already rejectedidon the create request and query parameters on list attached contactsNotes for reviewers
fern checkshows 0 errors and the same 317 warnings as main. There are no new dangling refs, and the operations are unchanged.notesin the company examples andupdate_last_request_atin the update request were already there, so they keep their place and take the 2.17 values.Generated with Claude Code