Skip to content

[api-sync 2026-07-31] gradientlabs-dotnet: split outbound conversation start into chat/email/phone - #12

Merged
gmtuca merged 2 commits into
mainfrom
api-client-sync/2026-07-31
Aug 4, 2026
Merged

[api-sync 2026-07-31] gradientlabs-dotnet: split outbound conversation start into chat/email/phone#12
gmtuca merged 2 commits into
mainfrom
api-client-sync/2026-07-31

Conversation

@gmtuca

@gmtuca gmtuca commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Syncs the SDK to one change in the public API: POST /outbound/conversations was removed and replaced by /outbound/conversations/chat, /email and /phone.

Outbound conversation start split per channel

Outbound.StartConversationAsync and StartOutboundConversationRequest are removed. There is now one method (and one request type) per channel, each still returning StartOutboundConversationResponse with a ConversationId.

Was Now
StartConversationAsync with Channel = ConversationChannel.Web StartChatConversationAsync(StartOutboundChatConversationRequest)
StartConversationAsync with Channel = ConversationChannel.Email StartEmailConversationAsync(StartOutboundEmailConversationRequest)
StartConversationAsync with Channel = ConversationChannel.Voice StartPhoneConversationAsync(StartOutboundPhoneConversationRequest)

Field-level migration:

Was Now
CustomerSource No replacement. CustomerId is always your own customer ID; third-party platform IDs go in CustomerSupportPlatformIdentifiers (Zendesk requires type zendesk_support_user, Salesforce salesforce_contact_id). The CustomerSource type is gone from the spec components and has been deleted here.
SupportPlatform optional Required on chat and email — the highest-priority platform is no longer auto-selected. Not present at all on phone (the handler pins voice/livekit).
Channel Encoded in the endpoint.
Subject / Body Email only, and required together — supplying just one is rejected. Chat takes Body alone; both are optional, and the agent writes the opening message when omitted.
Phone adds required ToPhoneNumber and FromPhoneNumber (E.164; the from-number must already be provisioned for the company).

CustomerSupportPlatformIdentifiers and Resources are optional on all three.

Version

0.1.10.1.2 (patch — the removed endpoint has no known users, so this does not warrant a major bump), plus a CHANGELOG.md entry. No tag created or pushed.

The User-Agent version is derived from the assembly informational version, which comes from <Version>, so the two stay in step automatically — there is no separate constant to update.

Verification

dotnet build   → Build succeeded. 0 Warning(s) 0 Error(s)
dotnet test    → Passed! 76/76 (net8.0) and 76/76 (net10.0)
dotnet format --verify-no-changes → clean (exit 0)

New tests/GradientLabs.Api.Tests/OutboundTests.cs covers the three paths, required/optional field serialisation, omission of unset optionals, and API error propagation. FakeHttpMessageHandler gained LastRequestBody so tests can assert on request payloads.

🤖 Generated with Claude Code

POST /outbound/conversations has been removed from the public API and replaced
by /outbound/conversations/{chat,email,phone}. Replace Outbound.StartConversationAsync
with StartChatConversationAsync, StartEmailConversationAsync and
StartPhoneConversationAsync, each with its own request type.

customer_source no longer exists: CustomerId is always the caller's own customer
ID, and third-party platform IDs go in CustomerSupportPlatformIdentifiers. The
CustomerSource string enum is gone from the spec components, so drop it here too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gmtuca
gmtuca requested review from a team as code owners July 31, 2026 13:25
@gmtuca
gmtuca force-pushed the api-client-sync/2026-07-31 branch from 0e34aba to 63de1ad Compare July 31, 2026 13:43
@gmtuca
gmtuca force-pushed the api-client-sync/2026-07-31 branch from 63de1ad to bb7217d Compare August 4, 2026 14:51
@gmtuca
gmtuca merged commit a16aec5 into main Aug 4, 2026
7 checks passed
@gmtuca
gmtuca deleted the api-client-sync/2026-07-31 branch August 4, 2026 15:46
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