Skip to content

Document ticket and conversation attribute errors, and fix ticket field shapes - #781

Merged
cathalging merged 5 commits into
mainfrom
cathalging/l2-tickets
Oct 29, 2026
Merged

cathalging merged 5 commits into
mainfrom
cathalging/l2-tickets

Conversation

@cathalging

Copy link
Copy Markdown
Contributor

Why?

The ticket, ticket type and conversation attribute operations in the 2.17 and Preview references leave out most of the errors the API returns, show some impossible examples, and get several field shapes wrong: company_id and is_internal are missing, two request fields are marked required when the API doesn't need them, and the ticket state summary is typed as a full ticket type.

How?

Corrects each operation in both versions to match the API's current behaviour.

Risks

Preview types reach the generated SDKs:

  • New optional ticket.company_id, ticket_type.is_internal and ticket_reply.app_package_code; input_options and conversation attribute admin_id become nullable.
  • ticket_state_detailed.ticket_types items become an inline summary instead of the full ticket type.
  • create_ticket_request.contacts (Tracker types may omit it) and create_ticket_type_attribute_request.description stop being required.
  • List attribute create needs options (at least 2); relationship attribute create needs reference.object_type_id.

Generated with Claude Code

cathalging and others added 4 commits October 29, 2026 09:51
…changes

Add the missing 400, 404, 422 and 500 responses for the ticket, ticket type,
ticket type attribute and conversation attribute endpoints, with examples that
match what the API returns. Add company_id to tickets, is_internal to ticket
types, and app_package_code to ticket replies. Make input_options and admin_id
nullable, correct the ticket state ticket_types item shape, and stop marking
contacts (create ticket) and description (create ticket type attribute) as
required. List attributes now require at least 2 options, and relationship
attributes require a reference with an object_type_id. Applied to 2.17 and
Preview.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Spell out when a ticket can be shared, clarify what internal ticket types mean,
stop the create ticket example sending a channel for a back-office ticket, and
show a null request_id on the conversation attribute errors that return one.
Applied to 2.17 and 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>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@markdennis22 markdennis22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I checked that both versions parse with no dangling refs, that Fern check is unchanged, that the Preview SDK gets no new unknown types, and the described behaviour against the API.

A few questions:

  1. Create a ticket 200 example channel: The change removes channel: messenger from the 200 response example in 2.17 and Preview. Ticket responses always include channel, and a ticket created through the API reports messenger. Could you restore it? Only the request example should drop channel: email.
  2. Delete a ticket 404 code: The reference said ticket_not_found "Ticket not found". The API returns not_found "Resource Not Found", while linking and unlinking a missing ticket return ticket_not_found. Should the reference keep ticket_not_found until the API changes, or describe not_found?
  3. company_id example: The example is UUID-shaped, copied from the request schema. Should it match the company id format used elsewhere in the reference?

Approval is waiting on the fix for 1 and a decision on 2.

~ Automated via Claude

…d example

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cathalging

Copy link
Copy Markdown
Contributor Author

Thanks!

  • 1. Create a ticket 200 example: Restored channel: messenger in the response example.
  • 3. company_id example: Now uses the same company id format as the rest of the reference.
  • 2: Being decided now. I'll update this PR to match.

~ Automated via Claude

@markdennis22 markdennis22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I re-checked the latest changes merged with main: both versions parse with no dangling refs, Fern check is unchanged, and the Preview SDK gets no new unknown types. channel: messenger is back in the Create a ticket 200 example, and the company_id example now matches the rest of the reference.

Approving.

~ Automated via Claude

@cathalging
cathalging merged commit 5a02dda into main Oct 29, 2026
4 checks passed
@cathalging
cathalging deleted the cathalging/l2-tickets branch October 29, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants