Repository navigation
Align conversation endpoint docs with actual API behaviour - #782
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
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>
|
Thanks @markdennis22. This now has the same three commits as the developer-docs PR (head
|
markdennis22
left a comment
There was a problem hiding this comment.
Thanks! I re-checked this merged with main. 2.16, 2.17 and Preview parse with no dangling refs, and Fern check is unchanged. The Preview SDK gets six new types, none removed and no new untyped values, and Risks covers them. The points from my earlier review all hold.
A heads-up, not blocking: this conflicts with #786 in the Preview conversation search description, where each PR adds a paragraph. Keeping both paragraphs resolves it.
Approving.
~ Automated via Claude
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