Document attaching custom object instances to a contact (PUT /contacts/{id})#594
Open
MatthewPelyhes wants to merge 1 commit into
Open
Document attaching custom object instances to a contact (PUT /contacts/{id})#594MatthewPelyhes wants to merge 1 commit into
MatthewPelyhes wants to merge 1 commit into
Conversation
…acts/{id}
Adds Preview request examples for attaching a single (to-one) and multiple
(to-many) custom object instances via custom_attributes on UpdateContact,
mirroring the rswag examples added in intercom/intercom#542234. Also documents
the relationship-reference semantics on the custom_attributes schema.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 Preview "Update a contact" endpoint (
PUT /contacts/{id}, grouped under Custom Object Instances in the dev docs) supports attaching custom object instances to a contact via a relationship custom attribute, but the spec had no request example showing the to-one case and did not describe the single-id-vs-array semantics. This closes that documentation gap so the auto-generated reference reflects the behaviour shipped in the monolith.How?
On
UpdateContact(Preview), replaces the single request example with two —attach a single custom object instance(to-one, a bare instance id) andattach multiple custom object instances(to-many, an array of ids) — mirroring the rswag examples added in the monolith, and documents the relationship-reference semantics on theupdate_contact_requestcustom_attributesschema (single id = to-one, array = to-many and replaces the whole set; the response surfaces the association as{ "type": "<Type>.list", "instances": [...] }). Examples-only change —custom_attributesis already a free-form object — so no schema shape change is required.Related:
API Versions Affected
Generated with Claude Code