Skip to content

[conversations] add reason_code to Finish Conversation request - #10

Merged
Catchpowle merged 1 commit into
mainfrom
public-api-finish-reason-code
Jul 21, 2026
Merged

[conversations] add reason_code to Finish Conversation request#10
Catchpowle merged 1 commit into
mainfrom
public-api-finish-reason-code

Conversation

@Catchpowle

Copy link
Copy Markdown
Contributor

Adds an optional ReasonCode property to FinishConversationRequest, mapped to the JSON key reason_code via the existing SnakeCaseLower naming policy (matching how reason and timestamp are handled — no explicit [JsonPropertyName] on request-side models). This lets callers pass a validated finish reason code (e.g. customer-ended-chat, customer-unresponsive) to PUT /conversations/{id}/finish. The field is optional and omitted when null, so existing usages compile and serialize unchanged. Added serialization tests covering the snake_case key and the null-omitted case.

Mirrors platform change gradientlabs-ai/wearegradient#30159 and docs gradientlabs-ai/docs#236.

🤖 Generated with Claude Code

Add an optional `ReasonCode` property to `FinishConversationRequest`,
mapped to the JSON key `reason_code` via the existing SnakeCaseLower
naming policy, so callers can pass a validated finish reason code
(e.g. `customer-ended-chat`, `customer-unresponsive`) to
`PUT /conversations/{id}/finish`. The field is optional and omitted
when null, so existing usages compile and serialize unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Catchpowle
Catchpowle requested review from a team as code owners July 21, 2026 13:15
@Catchpowle
Catchpowle merged commit 9ebb14f into main Jul 21, 2026
7 checks passed
@Catchpowle
Catchpowle deleted the public-api-finish-reason-code branch July 21, 2026 13:30
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