Repository navigation
Align conversation endpoint docs with actual API behaviour - #782
Open
cathalging wants to merge 12 commits into
Open
cathalging wants to merge 12 commits into
cathalging wants to merge 12 commits into
Conversation
Document the error responses, request fields, query parameters and search fields that the conversation endpoints really accept and return, correct example values, and drop the `original` requirement from translation schemas where it is optional. Applied to 2.17 and Preview, with the translation and monitor wording fixes also applied to 2.16. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Clarify when skip_reopen applies on admin replies, require body on contact ticket replies and say that quick reply selections need type user, explain how user_input_phone and country work in the phone switch request, and note that email history only applies to conversations started by email. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…_id and search sort Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ssignee_id text Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
markdennis22
left a comment
Contributor
There was a problem hiding this comment.
Thanks! I compared this merged with main. Both versions parse with no dangling refs, Fern check is unchanged, and I checked the changes against how the API behaves. Most of them hold.
A few questions:
- Ticket attribute
valuetype: The newticket.custom_attributes.*.valueon the conversation has notype, so the Preview SDK gets a new untyped value (ConversationListItemTicketCustomAttributesValue). Could it use the sameanyOfasticket_custom_attributes(string, number, boolean, array, file attribute)? titlein the search table: Search acceptstitleas a field, but atitlefilter doesn't match any conversations. Should the table leavetitleout until search supports it, or keep it and say that it doesn't match yet?- Which fields can be sorted: Sorting says
fieldcan be "one of the fields in the table above". Free-text fields such astype,source.subject,source.bodyandsource.author.*can't be sorted, and they don't return a clean400. Could the paragraph andsort.fieldlist the sortable fields, or leave out the text fields, as the ticket search docs already do? A missingfieldalso returns400invalid_field, and an unknown one says "X is not a valid field". sort.order: The schema givesenum: [ascending, descending]but also says any other value is treated asdescending. An SDK or validator built on the enum rejects values the API accepts. Should it keep the enum and drop the sentence, or the other way round?- Attach contact without
customer: The request can't succeed withoutcustomer; leaving it out returns a server error. Shouldcustomerberequired? assignee_id: 0on open and close: "Set0to leave it unassigned" reads as "don't change anything", but0clears both the admin and the team assignee. Leavingassignee_idout can assign the conversation to the acting admin. Would "Set0to unassign it" be closer?- Smaller wording points:
- The create conversation "Sender missing" example shows "Field 'from.type' is required". That message appears when
fromhas notype; a missingfromsays "Field 'from' must be an object". - The message
external_idis only returned for contact-initiated messages. - The phone switch 422 list isn't exhaustive. Any other invalid input returns its own key, such as
send_notificationorcountry.
- The create conversation "Sender missing" example shows "Field 'from.type' is required". That message appears when
- Risks: The deleted conversation
objectgoes from a single value to a two-value enum, which also changes its Preview SDK type. Worth adding to Risks?
Approval is waiting on 1 to 4.
~ Automated via Claude
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… customer Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Thanks @markdennis22. This now has the same three commits as the developer-docs PR (head
|
This branch has not been deployed
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?
Several conversation operations don't match what the API accepts and returns: missing or wrong error responses, undocumented fields and parameters, and some wrong types, enums and examples.
How?
Corrects the conversation, message and phone switch operations in 2.17 and Preview, plus the shared ticket attribute values and two small fixes in 2.16.
Risks
Preview types reach the generated SDKs. The attach contact request schema is renamed (
Assign Conversation RequesttoAttach Contact To Conversation Request), and itscustomerfield becomes a single, required contact object. Phone switchcustom_attributesnarrows to a string, number or boolean, ticket attribute array values narrow to file objects, and the deleted conversationobjectbecomes a two-value enum. The other changes add optional fields, responses and enum values, relax contact replybodyoutside tickets, or correct descriptions.Generated with Claude Code